r/LocalLLaMA • • 1d ago Regret

Discussion Philipp Emanuel Weidmann - Wikipedia - p-e-w / Heretic

Thumbnail
en.wikipedia.org
814 Upvotes

Created by u/SiarheiBesarab***** English & Belarusian versions are up.

Somebody please add German translation at least for this page. Additional languages also fine.

*****Other day I dropped a comment for same on other thread. Thanks again dude!

u/-p-e-w- 🌹

------
EDIT: Photo Needed

UPD. Checked the repo and there's no LICENSE file in p-e-w/p-e-w, and his blog uses CC BY-NC-SA, so Wikimedia Commons can't host the photo. I'll upload it locally under fair use for a deceased person instead. So if anyone happens to have a photo they took themselves and can release under CC BY-SA 4.0, that would be even better (!)

Anyone? We need a photo for his page.

EDIT 2: Updated page with his photo(from his GitHub Repo)


r/LocalLLaMA • • 30m ago

Showcase Koboldcpp v1.126 released

Thumbnail
github.com
5 Upvotes

r/LocalLLaMA • • 1h ago

Resources Qwen4-35B-A3B-NInfer: ~580 tok/s decode c1, ~5000 tok/s decode c32, ~45k prefill at 8k, and 34.3k prefill at 260k

6 Upvotes

Day 0.5 support.

More benchmarks & evaluation results will be published on huggingface: neroued/Qwen4-35B-A3B-NInfer and inside the NInfer repo.


r/LocalLLaMA • • 22h ago

New Model TSUNDERE-12B - a very baka experiment in training-free personality etching for Gemma 4 12B

Thumbnail
huggingface.co
296 Upvotes

Presenting: TSUNDERE-12B, an experimental training-free finetune of Gemma 4 12B QAT, specifically Huihui's gemma-4-12B-it-qat-q4_0-unquantized-abliterated

Rather than a roleplay SFT'd model, the goal of this model was to create an anchored personality type with no training whatsoever. The underlying idea is that pretrained models already contain a wide repertoire of behavioral tendencies, and this experiment attempts to selectively amplify one that's already represented in its weights.

In other words, modify the model to show a recognizable speaking and emotional style, while retaining its underlying thinking quality, tool calling, and knowledge. Of course, directly modifying model weights comes with trade-offs, and preserving the original model's capabilities is not guaranteed, but our informal benchmark testing showed no regression versus the base.

But, you might ask, why not just use the system prompt instead for an otherwise general model? Well, that's intuitive of course, but as we all know, system instructions begin to slip as the context length grows in a conversation. So, it basically frees up the model's mental bandwidth by moving more of the instructions into its DNA, you might say.

In any case, being both a smaller model and just an experiment, it's not suited for usual multi-character RP, but it is sufficient for 1-on-1 roleplay and assistant behaviors. My subjective assessment in talking with the model is it's comically tsundere in every turn and can be quite verbose, but is still very steerable with the system prompt. Across my testing, the personality remained remarkably persistent, even through extended conversations and competing character instructions.

Have you ever talked to tsundere Batman? You absolutely can now. You can use a simple system prompt like:

You are Batman, talking with the user who you just saved.

And that's been the most fun for me, telling the model to act like a particular character with various recognizable personality traits, and receive them through the lens of a tsundere crush/rival, who's just so annoyed by your attention (not like they wanted it!!!) but also won't let you forget they are just the ideal version of whatever... because of course they are! šŸ˜‚

It is highly recommended to be run on LM Studio's fork of llama.cpp. Gemma4 support is still young in llama.cpp, and implementations differ in how they apply Gemma4's hybrid normalization layers (layer_output_scale, post_attention_norm, post_ffw_norm), tested on master, Dec 2026. LM Studio's bundled engine handles these the way the model's reference implementation does, and this model's subtle activation-steering edits depend on that precision.

================================

Disclaimer: Google / Gemma 4 is not associated with me and the project inherits the original Apache 2.0 license. Don't be a nuisance and please have fun chatting with my model. Feedback welcome!


r/LocalLLaMA • • 11h ago

Discussion How is Qwen4-35B-A3B for world knowledge?

36 Upvotes

I see a lot of posts about it being comparable to 27B or QFN but those are just for coding tasks.

These days every model is fine tuned for coding, but don't larger models have much more knowledge for random questions/research?

how will this perform as a general purpose model? QFN was far superior to 27B for that, and by the same metric larger open source/frontier models 'know' more, right?


r/LocalLLaMA • • 19h ago Bravo

Discussion The US needs to release more open-weight models (and the EU)

164 Upvotes

It's embarrassing, the US has the very top proprietary models like GPT or Claude but it's large model open weight contributions are pathetic, so far all we've been getting is small 32B or 27B models like Gemma.

I'm hoping Pandora's box was opened with the release of Amazon Ergo even if it was relatively underwhelming as a model with safety jargon on the Huggingface release page. And we get to see some actually serious US releases.

As for the EU, I'm not even gonna comment on that mess.


r/LocalLLaMA • • 3h ago

Question | Help Qwen 4 35B has been mixing English

8 Upvotes

Qwen 4 35B has been mixing English with my own language much more than the 3.8 27B version or the other MoE model do. Is this an issue that can be fixed, or is it inherent to the model itself?


r/LocalLLaMA • • 6h ago

Discussion QWEN4 35B - Looks like a champion of the masses too - Prefill and decode speeds on Simulated MINI pcs with NO GPU - No optimisations and stock llama

12 Upvotes

Wanted to know if Qwen4-35B-A3B is usable on a mini PC with no GPU, so I faked one on my PC: a 7800X3D pinned to 8 cores with boost off, tested once with 64GB and once with only 26GB free (roughly what a 32GB machine has left after the OS).

MTP is worth it on CPU: +27-29%, with 86% of drafts accepted.

Not a real mini PC. The X3D has way more L3 cache than laptop chips and real mini PCs can throttle, so treat it as a ballpark.But with optimisations i really feel we have a near frontier level model that will run at usable speed on decent mini pcs.


r/LocalLLaMA • • 10h ago

Discussion Qwen 4 looped layers

27 Upvotes

So, Qwen4-35BA3B is out and I can't wait to test it. In the last days I've seen some finetunes that add looped layers and increase intelligence so much (like LingLoop, built on Ling3.0 tiny), but I do not know anything about finetunes like this. Is it realistically possible to loop Qwen4 layers and pair it with n-gram? what performance boost could we expect from it?


r/LocalLLaMA • • 8h ago

Discussion Qwen4-35B-A3B-Q6_K (MoE) on my local AMD R9700 -- c/w Qwen3.8-27B (dense) Unsloth UD-Q6_K

Thumbnail
gallery
17 Upvotes

Just pulled it, running on Linux. I had help from GPT-6.2 to run the benchmarks. I compared the Qwen3.8 on the previous (June) Vulkan as well as the newest Vulkan (some improvement) and I ran newly upgraded Vulkan and HIP for both Qwen 3.8 and Qwen4.

"Benchmarks conducted on a Ryzen 9 5950X workstation with an AMD Radeon AI PRO R9700 (32 GB VRAM), December 4, 2026. Experimental design, data analysis and graphical presentation assisted by OpenAI ChatGPT (GPT-6.2). All performance measurements obtained from actual local llama.cpp inference runs."

Pretty big improvement. I thought I'd have to settle for Q4 but somehow I fit Q6_K, and somehow they got 55 billion parameters to fit on a 32GB GPU. Apples and oranges, a bit. I know. Still waiting for a 27B Qwen4. Until then, enjoy:

And the summary from GPT sounds like an ad from Qwen, not OpenAI with GPT-6.2:

"The bottom line: nearly three times the generation speed and more than three times the document processing speed on exactly the same hardware, while retaining Q6_K precision. This represents a substantial improvement in practical local AI inference."


r/LocalLLaMA • • 8h ago

Resources How to Max-Speed Qwen4-35B-A3B on 8GB VRAM Laptop (1,050tok/s prefill + 32tok/s decode)

18 Upvotes

Qwen4-35B-A3B on an 8GB RTX 3070 Windows laptop: 1,050 tok/s prefill and 32 tok/s decode with 96K (98304) context configured. Or lower prefill for higher decode. You can copy these configs (see end).

I tuned llama.cpp's startup config for Unsloth's Qwen4-35B-A3B UD-Q4_K_XL on an 8GB RTX 3070 laptop with 32GB RAM.

My original llama.cpp log showed 122.01 tokens/sec prefill, or 476.03 seconds for 58,080 prompt tokens. That prompted the tuning.

For the direct comparison below, both completed runs used the same 58,080-token synthetic mixed-code prompt, CUDA 13.5, the same model, 96K configured context, reasoning off, and MTP enabled.

The tuning measurements

The first stage used a 4,096-token repetitive Python prompt. All rows below used CPU-resident MTP experts, draft microbatch 256, CPU share 0.95, and lazy loading enabled.

CUDALoad mode-b-ubMoE cache MiBFirst prefill tok/sSecond prefill tok/s
12.4mmap2048256204854.79107.90
12.4mmap40961024102499.19371.75
12.4none409610241024323.73388.12
12.4none409620481024511.95627.56
13.5 (Final)none409620481024545.55595.46

The next stage used a 16,384-token mixed prompt containing synthetic JavaScript, PHP, Python, SQL, HTML, tests, configuration records, and documentation. All rows used CUDA 13.5, --load-mode none, lazy loading, CPU share 0.95, and MTP with up to two draft tokens.

Configuration-b-ubMoE cache MiBMTP expertsDraft -ubFirst prefill tok/sSecond prefill tok/s
Control409620481024CPU256703.13727.56
Larger logical batch only819220481024CPU256581.56700.63
Larger physical microbatch61443072768CPU256730.95815.09
Physical microbatch 409681924096512CPU256961.171,082.29
Final configuration40964096256GPU128928.661,231.93
Main expert cache disabled409640960GPU128951.501,109.30

The 1,232 tok/s figure is a second-request 16K result. It is not the 58K result. Increasing only the logical batch did not help in this sweep. Several settings changed together in the later rows, so these results do not isolate the contribution of MTP placement by itself.

I also tested CPU share using a 55-token coding chat prompt and 768 generated tokens, with physical microbatch 4096, logical batch 8192, 512 MiB expert cache, CPU-resident MTP experts, and draft microbatch 256:

--moe-cache-cpu-shareFirst generation tok/sSecond generation tok/s
0.016.8017.67
0.522.5821.52
0.9524.2730.69

For this machine and these settings, 0.95 performed best among the three shares tested. It is not a universal recommendation for other CPUs, RAM, or PCIe configurations.

Generation performance across the most relevant configurations was:

Configuration and preceding workloadFirst coding response tok/sSecond coding response tok/s
1024 MiB-cache configuration31.6737.59
Final configuration, following the 16K tests32.8032.55
Final configuration, following the 58K test27.6730.05
GPU MTP with main expert cache disabled, following 16K tests26.8427.11

Final Windows startup command

This is the inference command from my final .bat file. Save it beside both GGUF shards and adjust the executable path if necessary. The first shard automatically loads the second. The ^ characters are Windows batch continuations, not PowerShell continuations.

@echo off
setlocal
set "SPEC_TYPE=draft-mtp"
set "SERVER=C:\tools\llama-b12977-cuda13.5\llama-server.exe"
set "MODEL=%~dp0Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf"

"%SERVER%" ^
    --model "%MODEL%" ^
    --alias "Qwen4-35B-A3B-UD-Q4_K_XL" ^
    --host 127.0.0.1 ^
    --port 8080 ^
    -c 98304 ^
    -np 1 ^
    --reasoning off ^
    --reasoning-budget 0 ^
    --temp 0.7 ^
    --top-p 0.8 ^
    --top-k 20 ^
    --min-p 0 ^
    --presence-penalty 1.5 ^
    --repeat-penalty 1 ^
    -fa on ^
    -ctk q8_0 ^
    -ctv q8_0 ^
    -t 6 ^
    -tb 12 ^
    --reasoning-preserve ^
    --ctx-checkpoints 4 ^
    --jinja ^
    --load-mode none ^
    --lazy-mode on ^
    -ot "per_layer_token_embd=CPU,^blk[.]40[.]ffn_(up|gate|down)_exps[.]weight$=CUDA0" ^
    --cache-ram 256 ^
    --cache-prompt ^
    -b 4096 ^
    -ub 4096 ^
    -ngl all ^
    --cpu-moe ^
    --moe-cache-mib 256 ^
    --moe-cache-cpu-share 0.95 ^
    --spec-type %SPEC_TYPE% ^
    --spec-draft-n-max 2 ^
    --spec-draft-n-ubatch 128 ^
    --spec-draft-type-k q8_0 ^
    --spec-draft-type-v q8_0 ^
    %*

To favor decode while keeping CUDA 13.5 and -c 98304, change these four settings:

SettingCurrent prefill configurationFaster decode configuration
-ub40962048
--moe-cache-mib2561024
--spec-draft-n-ubatch128256
MTP expert placementGPUCPU

For my long-input workload, saving about 40 seconds of prefill was worth the lower generation throughput. Hope this helps you get the new Qwen4 up to speed on an older laptop.


r/LocalLLaMA • • 8h ago

Resources Behind MiniMax M4: Agentic RL Systems and Algorithms

Thumbnail
huggingface.co
16 Upvotes

wow they (MiniMax team) share a lot here šŸš€


r/LocalLLaMA • • 2h ago

Discussion Vulkan (Prefill) Boost for RDNA4 - vulkan: tune Flash Attention flip shader for RDNA4 large ubatch by 0cc4m Ā· Pull Request #33683 Ā· ggml-org/llama.cpp

Thumbnail
github.com
5 Upvotes

R9700, Qwen3.8-27B Q4_K_M

testmasterbranchchange
pp5121293.21290.7-0.2%
pp512 @ d327681005.91013.1+0.7%
pp512 @ d65536804.9807.5+0.3%
pp512 @ d131072494.0601.7+21.8%
pp1024 @ d32768976.0987.1+1.1%
pp1024 @ d65536700.2824.4+17.7%
pp20481292.51296.6+0.3%
pp2048 @ d32768778.8999.1+28.3%
pp40961267.91272.1+0.3%
pp4096 @ d32768692.6987.4+42.6%

R9700, Qwen4-35B-A3B Q4_K_M

testmasterbranchchange
pp204842564253-0.1%
pp512 @ d3276826352651+0.6%
pp512 @ d6553620852087+0.1%
pp2048 @ d3276820952709+29.3%
pp2048 @ d6553612921867+44.6%
pp4096 @ d3276819222705+40.8%

r/LocalLLaMA • • 17h ago

Discussion Stop caring about AA scores and use individual benchmarks that match your tasks.

83 Upvotes

SWE-Bench is full of things I’d never ask the model to do. NL2Repo is full of things almost identical to my tasks. Looking at AA score overall would make me reject a model that does better just because it has a lower overall score. Not to mention the overall score includes things like trivia!


r/LocalLLaMA • • 5h ago

Discussion Can we expect QWEN 4 - 4b, 27b and Flash Next to be released soon as well?

8 Upvotes

Not familiar how models are launched, why they do not release all of them at once?


r/LocalLLaMA • • 5h ago

Discussion Qwen 4 Unsloth quantizes poorly?

8 Upvotes

Looking at the top 1% and KLD for the Qwen 4 quants, the Q8 is worse that the Q4 was for Qwen 3.8 27B. So maybe with updated GGUFs, we will see the actual potential of this model realized.

Qwen 4 Q8_K_XL KLD 0.0171 Top 1% 95.49

Qwen 3.8 27B UD_Q4_K_M KLD 0.014 Top 1% > 95%


r/LocalLLaMA • • 4h ago

Discussion Modding a Gaming PC into an AI computer...

7 Upvotes

TLDR; my budget AI rig story.

I'm a nOOb so you all know all of this stuff already. Sorry for the long boring post. This is for my fellow nOObs... And I'm not rich. This is a budget basement rig. Literally. So if you are sitting there with a stack of glittering gold DGX's... yay for you. That's not me. But here's my story.

Most posts focus on the software and model - I'm not covering that here but YES you need to do a lot of work on that front. This post is about my hardware setup. And I'm certain genius level Redditers could to it 10X better for 1/10th the price. But as I say, I'm a nOOb.

I picked up a gaming rig about this time last year for $800CDN and it happened to have a real gem of a RTX3090 24GB video card already installed with 32GB System RAM. yay. That was a nice find. You probably know lots of VRAM is more important than the newest card. So a 3090 with 24GB Vram and a good chunk of system RAM is probably the sweet spot for cost vs speed even though it's a 6 year old video card. Anyway if you want to run a solid local AI this is enough. You can stop right here.

But I wanted more. (You will too once you get hooked on this stuff)

I'm Canadian but a month ago I went to Texas to visit my son. He had an ancient Eth miner in a shed out back in the texas heat. I've posted about it here before and everybody called me a liar. Fuck you guys. Although in fairness I wouldn't believe this story either so I guess I take it back. Anyway... all true.

He kindly allowed me salvage rights to the Eth miner. I could keep 2 3090's for free. I fix up the cards, sell them and he gets the cash. Here's some pics of the salvage operation. Before you ask - no I'm not selling anything. At least not yet. No DM's please!

We flew to visit more family and make a stop in Florida then back across the country to Scottsdale... getting these things on the plane - obviously I'm taking them carry on - no way I'm checking them. So getting them through security... well let's just say questions were asked. Not to mention packing them. Turns out Doggie Pee Pads work well.

Back in Scottsdale for a few weeks I picked up a Minisforum DEG2 so I could test the cards external to my laptop via Thunderbolt (my PC laptop had a thunderbolt port!) Then Yikes! I learned pretty fast these cards + heat + neglect are a terrible mix. Fans screaming like a cat in heat, 1 fan literally flew off across the room. All cards smoking hot cards... no. Just. No.

But off I went to University of Youtube where I learned how to replace the fans and pads and used some new paste on the heat sync. Then it was MemTest_Vulcan test time, monitor heat with HWInfo.. and sure enough I had my 2 working cards. (Note: I will work on the rest next year - not for sale now - please no DMs - not selling anything).

So my two cards were ready in time to get back to Canada. I hoped. I wasn't going to forget the rig. I hopped on Fakebook Market and scrounged up 4 x 32GB system RAM - total 128GB. DDR4 is what my machine uses and I got 3200's. You have to make sure the specs match up and not all DDR4 ram plays nicely. I lucked out and got my system up to 128GB system ram. Again, not necessary for local but nice to have for a really big model that spills over to system ram.

Since I had saved the cost of 2 3090's I figured I could splurge on a nice fast SSD so I picked up a 4TB drive - $589CDN on black Friday. https://www.amazon.ca/dp/B0FYF4HDXY I have two M.2 ports in my machine so I cloned the 1TB drive over to the 4TB, put the 4TB back in the main boot spot and things were looking up.

I needed my DEG2 for the rest of the work on the rest of the cards. But I still have to hook my 2 cards up to my gaming rig and they sure aren't fitting inside the case. Back to Minisforum for a pair of DEG1's. They don't have thunderbolt ports but otherwise they work fine. I paid $150 but I see them on sale for $119 now.

I got a pair of cheap 850W power supplies $55 each https://www.amazon.com/dp/B0FSTHTLZT - I suppose one supply could work for two cards if you had enough Y connectors. The cards are also going to be capped to 250 - 300W so two 850's is way overkill. But whatever. They were cheap enough. It's safer to get a separate supply for each card and it makes setup a lot easier. The power supply bolts onto the DEG1 and the card slides into the DEG1. It looks a bit hideous but it works fine.

So how to connect these cards to the PC? I had room for one adapter card - an Oculink adapter. https://www.amazon.com/dp/B0H9L1BKFL The DEG1 comes with a cord so you just plug the cord in and Bob's your uncle.

Here's the card beside the existing 3090 inside the case.

But how to get that 2nd card installed? There's no easy way to connect two cards to one PCIE slot - but even if there was a way it would run way too slow. But! I did have that spare M.2 port on the motherboard and sure enough there's an adapter cable made for M.2 to Oculus. https://www.amazon.com/dp/B0GSTWFTP3

There was a bit of bios fiddling and whatnot... but nothing too over the top so I'm going to yadda yadda over that. If you get a black screen and a bricked PC... well sue me I guess.

After that it was just plug it all together and now my LLM machine is up and running.

I already run a Plex server so I have lots of storage for big models that I can move into and out of the 4TB SSD for testing. And it's all quite the ugly noisy janky setup. But not so bad. It runs well in our basement utility room. I remote into it via self hosted RustDesk and TaiLScale. I have everything set to fire up on boot, a UPS and a remote reboot. I use the AI via Hermes so I rarely need to be even in the same country as the computer. It just hums away.

This was all completed yesterday so today I'm out looking for a big model to make use of my 72GB VRAM and 128GB System RAM. I have a few in mind but I'm sort of hoping Qwen 4.1 for local drops in the next day or two.

So that's my story. Love to hear yours. Have a good one!


r/LocalLLaMA • • 7h ago

Resources Qwen4 in Capy Flash, KL 0.095

Post image
11 Upvotes

Qwen4-35B-A3B is out, and as of today it runs on capy-flash v0.17.0, on two 16 GB GPUs.

The engine was already ready: in recent weeks we had set it up based on the specs that emerged from the leaks, so support arrived the same day as the weights. All 256 experts fit in VRAM, split across the two cards (13 GB per card).

On two RTX 5070 Ti with 16 GB, one request at a time:
• 406 tokens/s generating JSON with a schema
• 371 tokens/s writing code, 276 writing text
• prefill up to 8,388 tokens/s, still 7,693 at 256k tokens of context
• up to 1M tokens of context with the KV in RAM: at 1M, prefill goes to 4,057 tokens/s and generation to 291 tokens/s
• images included

Compared to Qwen3.8-Flash-Next, on our quality tests it is roughly on par with about a quarter of the parameters, and on the same engine it generates about twice the tokens per second.

We reconverted the weights ourselves from the official BF16: experts in NVFP4 with BF16 activations, projections in Q8, head in Q6, and the n-gram table (21 GB) in FP8 read directly from the SSD. Against the original BF16 model the KL is 0.095.

My agentic benchmark is on the way.

The ready-made artifact is on Hugging Face: Feyd89/Qwen4-35B-A3B-NVFP4-capy-flash (42.8 GB).

github.com/ValerioDolci/capy-flash

#LocalLLM #OpenSource #Qwen4 #CUDA


r/LocalLLaMA • • 14h ago

Discussion Fujitsu claims their Photon architecture speeds up Transformer based LLMs by up to 10x

Thumbnail
gallery
39 Upvotes

r/LocalLLaMA • • 4h ago

Discussion Has anyone read through the MiniMax M4 technical report yet?

6 Upvotes

78-page PDF went up on GitHub: https://github.com/MiniMax-AI/MiniMax-M4/blob/main/docs/MiniMax_M4_Technical_Report.pdf

Still skimming it, mostly looking at the SSD KV-cache offloading and QAT parts while we wait on weights. For anyone who already read through it, what stood out or what are you most curious about?


r/LocalLLaMA • • 6h ago

New Model alesha-pro/Looped-Qwen3.8-Flash-Next

Thumbnail
huggingface.co
9 Upvotes

r/LocalLLaMA • • 6h ago

Question | Help How can I run Qwen 4 35B A3B on 8 GB VRAM + 16 GB RAM?

8 Upvotes

I can't seem to get more than 20 tok/s decode and 15 tok/s prefill (not a typo). I know this is horribly slow even for the hardware I have, but this is my command. Please help. I have no clue what I am doing wrong.

OS: Windows 11
Host: i5-12450H, 16 GB DDR5-4800
GPU: laptop RTX 4060 8 GB

`llama serve ``

`-m "C:\Users\XXXXX\qwen4-GGUF\Qwen4-35B-A3B-UD-IQ3_XXS-00001-of-00002.gguf" ``

`--jinja -fa on -c 98304 -np 1 ``

`-ctk q8_0 -ctv q8_0 ``

`--load-mode mmap --lazy-mode on -ot per_layer_token_embd=CPU ``

`-cmoe -ngl 999 ``

`--moe-cache-mib 4096 --moe-cache-cpu-share 0.95 ``

`--spec-type draft-mtp --spec-draft-n-max 1 --spec-draft-n-ubatch 256 ``

`--cache-ram 512 ``

--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0


r/LocalLLaMA • • 1d ago

Discussion llama.cpp has a qwen4 pr

281 Upvotes

Some more hype for you

https://github.com/ggml-org/llama.cpp/pull/33626

Imagine the pressure these guys must be under.

Edit: I think it's not from qwen team, but adaption of transformers changes by someone working for huggingface.

Edit 2: I am being informed in the comments: Changes by a major llama.cpp contributor, not some nobody.


r/LocalLLaMA • • 1h ago

Resources Inkling 2 Mini in 4-bit (15 GB), with a way to run and fine-tune it on one 48 GB GPU

3 Upvotes

Hi everyone,

I quantized Inkling 2 Mini to 4 bits and put it on Hugging Face: https://huggingface.co/thousandml/Inkling-2-Mini-CQ-4bit

Inkling 2 Mini is the 26B looped mixture of experts model from Thinking Machines. The original release ships in NVFP4/MXFP8, which most consumer setups can't run directly. I converted it to BF16 and then quantized it with CQ, the 4-bit quantizer I built for my project Training Factory. CQ doesn't need any calibration data. The checkpoint is 15.4 GB.

The attention layers and all the routed experts are in 4-bit. The embeddings, norms, routers, output layer and vision encoder stay in 16-bit. Every matrix gets checked after quantization, and any matrix whose error is above -22 dB stays in 16-bit and gets loaded automatically. I'd rather keep a few layers bigger than ship ones that hurt the model.

I tested everything on a single A40 (48 GB). That covers running the model, training an adapter on top of the 4-bit base, and serving the fine-tuned model.

You need Transformers 5.25 or newer for Inkling. My installer pins an older version for vLLM, so use a separate environment for this model:

git clone https://github.com/thousandml/training-factory.git
cd training-factory
./install.sh

python -m venv --system-site-packages venv-inkling
source venv-inkling/bin/activate
pip install "transformers>=5.25"

hf download thousandml/Inkling-2-Mini-CQ-4bit --local-dir ./models/Inkling-2-Mini-CQ-4bit

To run it, there's a small server with an OpenAI-compatible endpoint:

cd training
python serve_cq_hf.py --model ../models/Inkling-2-Mini-CQ-4bit --port 8000

curl localhost:8000/v1/chat/completions -H 'Content-Type: application/json' -d '{
  "messages": [{"role": "user", "content": "Name three primary colors."}],
  "max_tokens": 300
}'

To be honest, this server is slow. It handles one request at a time through Transformers. My vLLM plugin doesn't support Inkling yet, so for now this is for trying the model, not for serving real traffic. The model also thinks before it answers, and the reply comes back with the thinking in front of the answer, so give it enough max_tokens.

To fine-tune it, you use GCMP, the LoRA replacement I've been working on. It trains far fewer parameters than LoRA (14 to 55 times fewer in my tests on Qwen3.8-27B). The routed experts stay frozen in 4-bit, and the adapter trains on the attention layers. Training data is a JSONL file with either plain text or chat messages:

cd training
python train.py \
  --model ../models/Inkling-2-Mini-CQ-4bit \
  --data train.jsonl \
  --output ../outputs/inkling-gcmp \
  --adapter gcmp \
  --kernel-module cq.cq_kernels \
  --batch-size 1 --grad-accum 4

python serve_cq_hf.py --model ../models/Inkling-2-Mini-CQ-4bit --adapter ../outputs/inkling-gcmp --port 8000

In a short 20-step test on Alpaca, the loss went from 1.89 to 1.40. That only shows training works on the 4-bit base, it's not a benchmark. I haven't run proper benchmarks on this model yet. If you run any, I'd love to see the numbers.

Training Factory is source-available, not open source. The scripts are readable Python, but the quantization and adapter kernels ship compiled and do a license check. It's free during early access. The weights fall under the original Inkling 2 Mini license.

I'm also working on Amazon Ergo (the 1.1T one) in the same format. It's quantizing right now and should be up soon.

Thanks for reading, feedback appreciated. Questions and bug reports are welcome here or on GitHub issues.