by danielhanchen · 8mo ago · 0 comments
We made some quants at https://huggingface.co/collections/unsloth/gemma-4 for folks to run them - they work really well!
Guide for those interested: https://unsloth.ai/docs/models/gemma-4
Also note to use temperature = 1.0, top_p = 0.95, top_k = 64 and the EOS is "<turn|>". "<|channel>thought\n" is also used for the thinking trace!
I setup a pipeline for inference with OCR, full text search, embedding and summarization of land records dating back 1800s. All powered by the GGUF's you generate and llama.cpp. People are so excited that they can now search the records in multiple languages that a 1 minute wait to process the document seems nothing. Thank you!
Oh nice! That sounds fantastic! I hope Gemma-4 will make it even better! The small ones 2B and 4B are shockingly good haha!
Wondering if a local model or a self hosted one would work just as well.
People on site scan the documents and upload them for archival. The directory monitor looks for new files in the archive directories and once a new file is available, it is uploaded to Drupal. Once a new content is created in Drupal, Drupal triggers the translation and embedding process through llama.cpp. Qwen3-VL-8B is also used for chat and RAG. Client is familiar with Drupal and CMS in general and wanted to stay in a similar environment. If you are starting new I would recommend looking at docling.
I tried something similar where I needed a bunch of tables extracted from the pdf over like 40 pages. It was crazy slow on my MacBook and innacurate
Ps: found your other comments, thanks.
I realize this may have been hyperbole, but it sure isn't changing the world.
In the world of local models, Unsloth is one of the most significant projects there is.
EDIT: Ok, looks like there's yet another new flag for that in llama.cpp, and this one seems to work in this case: `--reasoning off`.
FWIW, I'm doing some initial tries of unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_XL, and for writing some Nix, I'm VERY impressed - seems significantly better than qwen3.5-35b-a3b for me for now. Example commandline on a Macbook Air M4 32gb RAM:
llama-cli -hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_XL -t 1.0 --top-p 0.95 --top-k 64 -fa on --no-mmproj --reasoning-budget 0 -c 32768 --jinja --reasoning off
(at release b8638, compiled with Nix)Yep the models are really good!
I am not sure if someone might have asked this already to you, but I have a question (out of curiosity) as to which open source model you find best and also, which AI training team (Qwen/Gemini/Kimi/GLM) has cooperated the most with the Unsloth team and is friendly to work with from such perspective?
Tbh Gemma-4 haha - it's sooooo good!!!
For teams - Google haha definitely hands down then Qwen, Meta haha through PyTorch and Llama and Mistral - tbh all labs are great!
./llama-batched-bench -hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_XL \
-npp 1000,2000,4000,8000,16000,32000,64000,96000,128000 -ntg 128 -npl 1 -c 0
| PP | TG | B | N_KV | T_PP s | S_PP t/s | T_TG s | S_TG t/s | T s | S t/s |
|-------|--------|------|--------|----------|----------|----------|----------|----------|----------|
| 1000 | 128 | 1 | 1128 | 0.416 | 2404.87 | 1.064 | 120.29 | 1.480 | 762.20 |
| 2000 | 128 | 1 | 2128 | 0.755 | 2649.86 | 1.075 | 119.04 | 1.830 | 1162.83 |
| 4000 | 128 | 1 | 4128 | 1.501 | 2665.72 | 1.093 | 117.08 | 2.594 | 1591.49 |
| 8000 | 128 | 1 | 8128 | 3.142 | 2545.85 | 1.114 | 114.87 | 4.257 | 1909.47 |
| 16000 | 128 | 1 | 16128 | 6.908 | 2316.00 | 1.189 | 107.65 | 8.097 | 1991.73 |
| 32000 | 128 | 1 | 32128 | 16.382 | 1953.31 | 1.278 | 100.12 | 17.661 | 1819.16 |
| 64000 | 128 | 1 | 64128 | 43.427 | 1473.74 | 1.453 | 88.12 | 44.879 | 1428.89 |
| 96000 | 128 | 1 | 96128 | 82.227 | 1167.50 | 1.623 | 78.86 | 83.850 | 1146.42 |
|128000 | 128 | 1 | 128128 | 133.237 | 960.69 | 1.797 | 71.25 | 135.034 | 948.86 | and the EOS is "<turn|>". "<|channel>thought\n" is also used for the thinking trace!
Can someone explain this to me? Why is this faux-XML important here?The main hurdle I've found with local tool calling is managing the execution boundaries safely. I’ve started plugging these local models into PAIO to handle that. Since it acts as a hardened execution layer with strict BYOK sovereignty, it lets you actually utilize Gemma-4's tool calling capabilities without the low-level anxiety of a hallucination accidentally wiping your drive. It’s the perfect secure gateway for these advanced local models.
https://huggingface.co/collections/unsloth/gemma-4
Edit: Sorry, I'm not sure if this is a quant, but it says 'finetuned' from the Google Gemma 4 parent snapshot. It's the same size as the UD 8-bit quant though.
You have an answer on your page regarding "Should I pick 26B-A4B or 31B?", but can you please clarify if, assuming 24GB vRAM, I should pick a full precision smaller model or 4 bit larger model?
edit: 31B cache is not bugged, there's static SWA cost of 3.6GB.. so IQ4_XS at 15.2GB seems like reasonable pair, but even then barely enough for 64K for 24GB VRAM. Maybe 8 bit KV quantization is fine now after https://github.com/ggml-org/llama.cpp/pull/21038 got merged, so 100K+ is possible.
> I should pick a full precision smaller model or 4 bit larger model?
4 bit larger model. You have to use quant either way -- even if by full precision you mean 8 bit, it's gonna be 26GB + overhead + chat context.
Try UD-Q4_K_XL.
I presume 24B is somewhat faster since it's only 4B activated - 31B is quite a large dense model so more accurate!
At some point it asked me to create a password, and right after that it threw an error. Here’s a screenshot: https://imgur.com/a/sCMmqht
This happened after running the PowerShell setup, where it installed several things like NVIDIA components, VS Code, and Python. At the end, PowerShell tell me to open a http://localhost URL in my browser, and that’s where I was prompted to set the password before it failed.
Also, I noticed that an Unsloth icon was added to my desktop, but when I click it, nothing happens.
For context, I’m not a developer and I had never used PowerShell before. Some of the steps were a bit intimidating and I wasn’t fully sure what I was approving when clicking through.
The overall experience felt a bit rough for my level. It would be great if this could be packaged as a simple .exe or a standalone app instead of going through terminal and browser steps.
Are there any plans to make something like that?
irm https://unsloth.ai/install.ps1 | iex
it should work hopefully. If not - please at us on Discord and we'll help you!
The Network error is a bummer - we'll check.
And yes we're working on a .exe!!
Thanks, will check it out tomorrow.
Hope the unsloth-setup.exe > Windows App is coming soon! I think it will expand accessibility and user base.
I wonder why they do benchmarks with 1 instead of 0.7... that's strange. 0.7 or 0.8 at most gives noticeably better samples.