r/unsloth • • Aug 11 '26 Heartwarming

News Meet Unsloth Desktop - the first desktop app to run and train models

467 Upvotes

Hi guys, we're super excited to announce Unsloth Desktop today,
The first desktop app to run and train models locally.

  • Open-source and available on Mac, Windows, and Linux
  • Supports MLX, diffusion image/video models, audio models, and GGUF
  • Connect Claude Code and Codex to local LLMs
  • 50% more accurate with self-healing tool calls and sandboxed code execution
  • Supports CPU and multi-GPU setups across NVIDIA, AMD, Intel, and Mac
  • Train models 2× faster while using 70% less VRAM
  • Includes private web search, deep research, RAG, MCP, and exports (NVFP4, GGUF)
  • Use Unsloth’s OpenAI-compatible API with OpenAI and Anthropic cloud models
  • Securely deploy LLMs remotely and access them anywhere via Cloudflare HTTPS

Unsloth Desktop is now available on unsloth.ai and GitHub.

Thank you and we're here to answer any questions!


r/unsloth • • 7h ago Heartwarming

Show and Tell local llm found new math

Post image
115 Upvotes

It's super obvious to me now that local LLM's can create new math. Closed frontier models have proven the Riemann Hypothesis. I've just pointed GLM 5.3 Unsloth Dynamic at smaller problems: Barkers Conjectures (OEIS A262147 and OEIS A322108, on lefttosolve). The agent was running on my Mac Studio. My agent came up with new proofs that are half as long as the best existing proofs. I fully admit that it's small but my point is: researchers need to leak their IP to frontier labs, they can use local AI to scale their work in private.

"My" proofs were submitted, checked and successfully merged into lefttosolve. I'm personally convinced that this is the future of research, local ai agents. Thoughts?


r/unsloth • • 21h ago

Show and Tell Letting Qwen3.5-0.8B play Space Invaders at 60 FPS using WebAssembly and Unsloth GGUFs (CPU only)

40 Upvotes

Experimenting with running small language models entirely in the browser using WebAssembly and Unsloth’s quantized models.
In the latest experiment, I got Qwen3.5-0.8B to play Space Invaders at 60 decisions per second.
Performance:

  • 60 decisions per second
  • 8.3 ms average decision latency
  • Apple M3 Max, 8 CPU threads
  • No GPU, WebGPU or remote inference API

How it works:

  • Action scoring: Score four possible actions (left, right, fire, wait) instead of generating text.
  • Selective output projection: Compute only 4 out of 248,320 vocabulary logits.
  • State snapshots: Process instructions and examples once, then save the model state.
  • Incremental inference: Reuse previously computed state and process only the necessary input tokens.

Architecture:

  • Inference engine written in Zig and compiled to WebAssembly.
  • Game and inference engine run as separate WASM modules.
  • Game state is passed to the model as a short textual description.

The model is not particularly good at Space Invaders. The next thing I want to explore is how fine-tuning and task-specific LoRA adapters could improve decision accuracy without significantly increasing inference latency.
Thanks to the Unsloth team for making these quantized models available.

Try it in your browser:
https://tesseracted.com/experiments-llm-os/?game=invaders

Implementation details, benchmarks and failed experiments:
https://tesseracted.com/experiments-llm-os/#decisions

Experiments on X:

Curious to hear what others in the Unsloth community would build with this and whether anyone has experimented with fine-tuning small models specifically for low-latency decision-making.


r/unsloth • • 9h ago

Question all layers in gpu, but shows this?

Post image
3 Upvotes

recently, after deleting strata, i tried to use my inkling mini 2 model and it showed this and it was much slower than usual

every other model is in vram except for this one

arguments: -fa on -ngl 9999 -ctk q8_0 -ctv q5_1

i tried reinstalling the model but that didnt work


r/unsloth • • 19h ago

Question Can we please collapse this on mobile

Post image
11 Upvotes

This page has been my arch nemesis for awhile, idk if the design was intentional or an oversight since I’d imagine not many people visit here on mobile but you can’t see anything


r/unsloth • • 16h ago

Question R9700 & 5070 running in Unsloth Studio at the same time?

2 Upvotes

Hey!

First time testing local Ai and I currently have just the 5070 12GB.
Waiting to get my R9700 32GB in the mail tomorrow.

Using Unsloth Studio on Windows 11. But can convert to Linux if its the only way.

Was wondering if its possible to configure the R9700 as the main LLM model, and use the 5070 as the main TTS generation tool within the same chat instance?

I saw ROCm and CUDA does not really mix well, but is it even possible for this?
Or do I need to setup some kind of API setup, where the two merge into another interface to use them both?

Or is it better and easier to sell the 5070 and buy a 9060 or 9070XT for TTS model?

Thanks for the input and suggestions


r/unsloth • • 1d ago

Show and Tell Local AI Finally Shows Promise for General Public Use (For Limited RAM and VRAM Builds)

4 Upvotes

These are the best results I've seen so far testing local LLMs that takes nothing but a laptop to run. Previous LLM that did only a half decent job at Q3 GGUF was tiel-coder.

Best results on any Q3 quant I've tested (with pi agent). Link: https://huggingface.co/nokeepai/Inkling-2-Mini-Unbound-GGUF

Got decent 11t/s (I'm okay with it for coding) speed via llama.cpp & PolyStrata.

Inference speed logs at 31k Context:

[live] reading prompt 7,597 / 8,262 new tok | 495 tok/s | VRAM 5.38/6.0 G[live] reading prompt 7,597 / 8,262 new tok | 495 tok/s | VRAM 5.38/6.0 G[pp] 8,262 tokens (94%) 53.9 tok/s, 153s elapsed

[live] reading prompt 8,262 / 8,774 new tok | 300 tok/s | VRAM 5.38/6.0 G[live] reading prompt 8,262 / 8,774 new tok | 302 tok/s | VRAM 5.38/6.0 G[pp] 8,774 tokens (100%) 53.7 tok/s, 163s elapsed

[live] reading prompt 8,778 / 8,779 new tok | 243 tok/s | VRAM 5.38/6.0 G[live] reading prompt 8,778 / 8,788 new tok | 241 tok/s | VRAM 5.41/6.0 G[gen] 100 tok @ 11.1 t/s (3 s 11.2)

a[gen] 139 tok @ 11.5 t/s (3 s 12.8)

[gen] 176 tok @ 11.6 t/s (3 s 12.0)

[gen] 207 tok @ 11.4 t/s (3 s 10.1)

[gen] 243 tok @ 11.4 t/s (3 s 12.0)

[gen] 281 tok @ 11.6 t/s (3 s 12.5)

[gen] 319 tok @ 11.7 t/s (3 s 12.4)

[gen] 349 tok @ 11.5 t/s (3 s 9.9)

[gen] 378 tok @ 11.3 t/s (3 s 9.6)

[gen] 409 tok @ 11.2 t/s (3 s 10.1)

[gen] 439 tok @ 11.1 t/s (3 s 9.8)

[gen] 468 tok @ 11.0 t/s (3 s 9.6)

[gen] 504 tok @ 11.1 t/s (3 s 11.9)

[gen] 543 tok @ 11.2 t/s (3 s 12.7)

[gen] 582 tok @ 11.3 t/s (3 s 12.8)

[gen] 621 tok @ 11.3 t/s (3 s 12.9)

[gen] 660 tok @ 11.4 t/s (3 s 12.8)

[gen] 696 tok @ 11.4 t/s (3 s 11.7)

[gen] 727 tok @ 11.4 t/s (3 s 10.2)

[gen] 760 tok @ 11.3 t/s (3 s 10.8)

[gen] 797 tok @ 11.4 t/s (3 s 12.3)

[gen] 834 tok @ 11.4 t/s (3 s 12.1)

[gen] 865 tok @ 11.4 t/s (3 s 10.2)

[gen] 896 tok @ 11.3 t/s (3 s 10.1)

[gen] 929 tok @ 11.3 t/s (3 s 10.7)

[gen] 963 tok @ 11.3 t/s (3 s 11.3)

[gen] 994 tok @ 11.3 t/s (3 s 10.1)

[gen] 1,031 tok @ 11.3 t/s (3 s 12.2)

[gen] 1,070 tok @ 11.3 t/s (3 s 12.9)

[gen] 1,109 tok @ 11.4 t/s (3 s 12.7)

[gen] 1,148 tok @ 11.4 t/s (3 s 12.9)

[gen] 1,187 tok @ 11.5 t/s (3 s 12.8)

[gen] 1,221 tok @ 11.5 t/s (3 s 11.2)

[gen] 1,252 tok @ 11.4 t/s (3 s 10.1)

[gen] 1,283 tok @ 11.4 t/s (3 s 10.2)

[gen] 1,313 tok @ 11.3 t/s (3 s 9.8)

[gen] 1,345 tok @ 11.3 t/s (3 s 10.5)

[gen] 1,376 tok @ 11.3 t/s (3 s 10.1)

[gen] 1,405 tok @ 11.2 t/s (3 s 9.7)

[gen] 1,432 tok @ 11.2 t/s (3 s 8.9)

[gen] 1,463 tok @ 11.2 t/s (3 s 10.2)

[gen] 1,491 tok @ 11.1 t/s (3 s 9.3)

[gen] 1,527 tok @ 11.2 t/s (3 s 11.7)

[gen] 1,565 tok @ 11.2 t/s (3 s 12.4)

[req] prompt 8778 tokens = 0 reused + 8778 read in 163907 ms (53.6 tok/s), 4685 generated in 425219 ms (11.0 tok/s)


r/unsloth • • 1d ago

Question Can the models folder downloaded on a Windows unsloth install be dropped into a linux unsloth installation without any need for modification

7 Upvotes

sneakernet question


r/unsloth • • 23h ago

Discussion Wifi + Cable internet downloads.

1 Upvotes

I know it's not frequent but is it possible to only download AI models through my wifi ? (connected to modem 1) and not through my cable (connected to modem2) so my cable connexion stay stable ?


r/unsloth • • 1d ago

Discussion Unsloth desktop not using RAM after update

7 Upvotes

12gb vram, 64gb ddr5 setup

On some MoE models like Mistal and QFN the old version of unsloth desktop would use about 12gb vram and 40gb ram. Made sense based on the model quant sizes used.

But now after recent updates ram is not being used. Mistral and QFN will load with 12gb vram, but the ram barely changes. Shows less than 10gb used, most of which is the OS. Things also run slower.

So what happened? Both unsloth desktop and llama.cpp runtime backend were updated, not sure which caused it.

SOLVED - if you set mmap to none it goes back to the old behavior


r/unsloth • • 1d ago

Discussion [Feature Request] Native UI selector for loading one or multiple LoRAs with local LLMs in Unsloth Desktop

16 Upvotes

Hey Unsloth team and community,

First off, huge thanks for building Unsloth Desktop—having an open-source, all-in-one app for fine-tuning and running local models has been awesome.

I’d love to ask the developers for a long-awaited quality-of-life feature for local LLM inference: a native, straightforward UI option to select one or multiple LoRA adapters right when loading a local LLM.

Right now, if you want to load a base local LLM alongside one or more LoRAs without merging them into separate full-weight GGUF files every time, you have to rely on workarounds—digging deep into the UI settings to manually type or paste llama.cpp command-line switches (--lora, --lora-scaled, full file paths, etc.).

While that CLI trick works, it feels unnecessarily clunky compared to how smooth the rest of Unsloth Desktop is—especially since Unsloth is literally known for making LoRA training effortless.

Even as a pure convenience wrapper over what llama.cpp already supports under the hood, a proper LoRA selector in the model-loading UI would be a massive upgrade:

  • Easy file picking: Select one or multiple local LoRA files right next to the base model before loading.
  • Simple toggles & scaling: Quickly check/uncheck adapters or adjust their scale/weight (e.g., defaulting to 1.0) without touching raw CLI flags.
  • Fast testing & stacking: Effortlessly test different fine-tuning checkpoints or combine multiple LoRAs on the fly without duplicating gigabytes of merged models or re-entering paths deep in advanced settings.

Is native single/multi-LoRA selection for local LLMs on the roadmap for Unsloth Desktop? I’m sure a lot of us here would get immediate daily use out of it!


r/unsloth • • 1d ago

Discussion Cluster feature request

3 Upvotes

I love unsloth studio on my laptop with a 5070 8gb and 32gb ram and on my ai server with a gtx 1070 ti 8gn and 1080 8gb with 18 gb ram

I really want to see a cluster feature to be implemented so I can expand when im home.


r/unsloth • • 2d ago Heartwarming

Show and Tell Local models can now take control of Unreal Engine and Unity in Unsloth!

212 Upvotes

Hey guys, we're showcasing how your local LLM can now take control of Unreal Engine, Unity & Blender autonomously via Unsloth!

Inkling 2 Mini GGUF, Unsloth and MCP successfully controlled those apps to create new assets with no human intervention.

Video showcase various examples of Unreal Engine and Unity made via Inkling and Unsloth.

GitHub: https://github.com/unslothai/unsloth

Guide: https://unsloth.ai/docs/basics/mcp/mcp-engines

Feel free to try it out and share your results! :)


r/unsloth • • 2d ago

Discussion Any plans to expand Projects with a built in harness/agent?

16 Upvotes

It's starting to drive me a bit nutty having to use multiple applications. I've got Unsloth running and OpenChamber running and sometimes also my IDE running. It'd be great to see Projects expanded to have a built in harness. Don't need to re-invent the wheel here, but if Projects could just run OpenCode for example so a secondary application isn't needed that'd be of huge help. Unsloth can already do this from CLI so basically just asking if there's plans to bring that to the GUI.


r/unsloth • • 3d ago

Discussion Inkling 2 Mini (unsloth GGUF) still broken on mainline llama.cpp

22 Upvotes

Setup

  • GPU: RTX 3090 (24 GB VRAM, CUDA arch sm_86)
  • llama.cpp: built from ggml-org/llama.cpp master, CUDA backend (-DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=86)
  • Model: unsloth/Inkling-2-Mini-GGUF:UD-Q4_K_XL (the default/root quant, not the Mainline_Support/ folder)
  • Launched via llama-server using --hf-repo (auto-download)

Config_1:

--spec-type draft-dspark --spec-draft-n-max 2 --n-gpu-layers-draft 99
--temp 1.0 --top-p 1.0 --top-k 0 --min-p 0.0

(sampling values per Unsloth's own docs: https://unsloth.ai/docs/models/inkling-2-mini#nvidia)

Config_2:

llama.cpp : version: 1.1.0-dev (build 12814, commit e7ec6361d)
built with GNU 15.2.0 for Linux x86_64

llama-server :
  --load-mode: none
  --reasoning-effort: low
  --reasoning-preserve
  --temperature: 1.0
  --ctx-size: 81920
  --parallel: 1
  --kv-unified
  --host: 0.0.0.0
  --port: 18080
  --batch-size: 2048
  --ubatch-size: 1024
  --jinja
  --fit: on
  --flash-attn: on
  --no-mmproj
  --reasoning: on
  --reasoning-format: deepseek
  --cache-type-k: q8_0
  --cache-type-v: q8_0
  --cache-ram: 16384
  --top-p: 0.95
  --repeat-penalty: 1.0
  --timeout: 3600
  --sleep-idle-seconds: 3600
  --metrics
  --log-verbosity: 3
  --hf-repo: unsloth/Inkling-2-Mini-GGUF:UD-Q4_K_XL
  --alias: unsloth/Inkling-2-Mini-GGUF:UD-Q4_K_XL
  --top-p: 1.0
  --top-k: 0
  --temp: 1.0
  --min-p: 0.0
  --cache-type-k: q8_0
  --cache-type-v: q8_0
  --ctx-size: 64000
  --threads: 16
  --load-mode: mlock
  --n-gpu-layers: 99
  --flash-attn: on
  --jinja

The model got past tensor loading entirely (no more "not found" error — looks like something shifted upstream between the two pulls), but crashed during context init:

failed to initialize the context: dflash requires ctx_other to be set (this warning is normal during memory fitting)
...
ggml_cuda_compute_forward: SOFT_MAX failed
CUDA error: invalid argument
current device: 0, in function ggml_cuda_compute_forward at ggml/src/ggml-cuda/ggml-cuda.cu:2834

So: still a hard crash, just a different one, consistent with the looped-layer graph/attention-mask construction still being actively worked on.

Curious if anyone's gotten a clean run on mainline — if so, what commit/flags?


r/unsloth • • 3d ago

Discussion Unable to train model

6 Upvotes

I have a local model installed but no option to add it on the training page pls hell


r/unsloth • • 4d ago

Question Inkling-2-Mini-UD-Q8_K_XL.gguf

27 Upvotes

Maybe I dont understand this thing. Inkling-2-Mini-UD-Q8_K_XL.gguf is labeled as Q8 but it has no 8bit tensors. Experts are NVFP4 in 20 of 24 layers, BF16 in the rest. Why?


r/unsloth • • 4d ago Heartwarming

Show and Tell NPU support for Snapdragon X/X Plus/ Elite

Thumbnail
github.com
36 Upvotes

As it suggests, after thr AMD announcement which made most of my AMD NPU work worthless I pivoted to NPUs without support. Today you can now natively use your Hexagon NPU with unsloth. Upstream PR sent and I will be building shims for the other NPU/TPUs out there. Let me know if you have one you want support on!


r/unsloth • • 4d ago

Discussion H and V reversed in video generation

4 Upvotes

I installed Minimax-H3 and used a portrait oriented starting image. The size fields show the correct numbers (V > H) but the generated video comes out in landscape orientation heavily distorted. I also tried downloading the video into a player but saw the same distorted video.

Awesome progress BTW When I looked at unsloth 6 months ago there was no image or video, now its working great (except the above) .


r/unsloth • • 4d ago

Discussion Has anyone successfully used a local LLM for serious historical research with 16GB VRAM?

10 Upvotes

I'm looking for a local LLM capable of conducting serious, source-based historical research on a consumer GPU with 16GB of VRAM.

My current hardware:

  • NVIDIA RTX 5060 Ti – 16GB VRAM
  • AMD Ryzen 7 3700X
  • 64GB system RAM
  • Windows 11

My goal is not simply to generate historical texts or summarize existing documents. I would like to build a reasonably autonomous historical research workflow capable of:

  • Searching online archives, historical newspapers and digital libraries.
  • Identifying and evaluating primary and secondary sources.
  • Cross-referencing historical information from multiple independent sources.
  • Distinguishing documented facts from assumptions and unverified claims.
  • Providing accurate, verifiable citations and bibliographic references.
  • Maintaining a structured research dossier across multiple research sessions.
  • Producing historically accurate, well-documented reports.
  • Working with multilingual historical sources.

I've already experimented with several local models, agent frameworks, custom research skills and knowledge bases. However, I still find that the quality and reliability of the research require too much external supervision.

Hallucinated references, superficial source verification, insufficient context windows and difficulties following complex research instructions remain significant obstacles.

I'd be particularly interested in hearing from people who have practical experience with:

  • Local models suitable for historical or academic research.
  • Quantization levels that offer a good balance between reasoning quality and context length.
  • Agent frameworks and deep research tools.
  • RAG and persistent knowledge bases.
  • Fine-tuning or QLoRA for specialized research tasks.

Has anyone achieved genuinely reliable results within a 16GB VRAM budget?

Which model, quantization, inference engine and research workflow are you using?

I'm more interested in real-world research experience than benchmark scores. I'm also open to the possibility that current local models running on 16GB VRAM are simply not capable of this level of autonomous research yet.

Any recommendations, experiences or lessons learned would be greatly appreciated.


r/unsloth • • 4d ago

Discussion Feature/Architecture suggestion. One LLM to rule them all... sort of

5 Upvotes

I have built a llm setup using unsloth desktop to help me with descriptions and posts for my tiny Youtube gaming channel, research, image editing and just playing with models to see what they can do. I am running on a 5080 so only 16g gpu ram. The further i got into building it the more I realized what I really wanted was not one really smart model that tried to do it all, what I needed was a dispatcher model small enough to run at a decent speed on cpu. This model would live on the cpu/system memory and would be smart enough to know what tool to use in Unsloth desktop for the task and then use it for me letting me know when the task is done. It being the expert on Unsloth desktop and writing prompts.

This dispatcher model would be the consistent voice of the system including personality and would be how you interact with things as a assistant unless you need more control or are experimenting. I would not change the interface at all just give it a "popout" style chat box that you can drag and drop to. So when I need to research a game and get information I could ask the dispatcher to "do task x, here is the info you need to get it done" it then loads qwen3.8-27b and has it do the research and lets the user know when it is done unloads the model and shows the user the results. The on system model would still available for chat and light research while the task is being completed without slowing the larger model it is using as a tool to complete the task. With skill system and recipes the system model could use them far more smoothly than I managed to turning them on and off as needed to prevent bleed over too other tasks. There should be a option to load it on gpu for those with plenty of room to spare.

With vision on cpu as well it could run drag and drop photo edits based on a natural conversational description and have it make a prompt based off that and the model its going to use. So for example I would say "remove the background on this picture of my cat and make her a pirate" It would then make 5 or so and shows the user so they can pick the one they like. This would feel like the big AI company's do in their web chats. That kind of smooth interaction alone I think would make your program better by far than any of the others I have tested at being a assistant(lm studio, lm bionic, anythingllm).

Since it would be run on cpu it would also mean it could remain running while doing other things like gaming, modeling in blender or editing in davinchi resolve.

I was told by chatgpt the biggest hurdle would be getting small enough model finetuned for this, But I hear you might know a guy who specializes in that lol.

Also pretty pretty please add a audible noise that I can turn on so if the model needs permission for something I know it needs my attention even if i am surfing the web.
And let me active skills on a project by project basis. Sometimes skills get used when not directly called because they have similar words so a skill called "youtube description maker" will sometimes get called when the word youtube is used in any prompt while the skill is active and will 100% get called if another skill uses the same first word like "youtube social media post creator". Yes I did find this out because i am boring with names.


r/unsloth • • 5d ago Heartwarming

Resource Inkling 2 Mini can now be fine-tuned for free!

Post image
281 Upvotes

Hey guys, you can now fine-tune Inkling 2 Mini with our free notebook!

Local training works on 22GB VRAM.

Unsloth trains Inkling 1.8-3.1x faster with 50% less VRAM vs. other setups including Hugging Face with ALL optimizations turned on. No accuracy loss.

We utilize many kernels including our own for the speed performance + VRAM deduction. HF for example only worked on 40GB + setups.

Preliminary Inkling multi-GPU training also works with Unsloth. LoRA, FFT etc. all work.

Unsloth GitHub repo: https://github.com/unslothai/unsloth

Free Kaggle + Colab Notebooks and Guide: https://unsloth.ai/docs/models/inkling-2-mini/fine-tuning

Thank you! :)


r/unsloth • • 5d ago

Show and Tell INKLING 2 MINI 5060ti 16GB 480GB/s

Thumbnail
gallery
80 Upvotes

I used OpenCode with HY4 as the model for my testing...

The idea here isn't to showcase the "best" configuration, but rather to demonstrate what I’m able to achieve with this model...

I frequently translate games into Brazilian Portuguese for free using AI, so it would be great not to have to pay or burn through tokens for more advanced (and costly) AI models. On top of that, I maintain an affiliate system that I use daily; sometimes, my free token allowance (OpenCode – Nous Portals) runs out, leaving me unable to fix minor bugs in the system ´-´.

Also, as a hobby, I try to develop some games I’ve come up with—having a model I can use without any worries is really helpful, haha!

Note: I run an off-grid solar power setup here in Brazil.

**Setup:** RTX 5060 Ti 16 GB - Ryzen 5 3600 - 48 GB DDR4 - Windows 11 - CUDA 13.5 - llama.cpp `b12649-mix-c7059d6` (commit `189f431bf`) - Unsloth Dynamic 3.1 GGUFs.

## Findings

  1. **Q2_K_XL is still the fastest** — 61.4 t/s short, 40.7 t/s at depth, with the most VRAM headroom (2.5 GB). It also tops out at ~58 C under a 100k-token prefill.
  2. **IQ3_XXS at 174k is the best trade-off.** Decode at depth is within 3% of Q2 (39.3 vs 40.7 t/s), prefill is slightly higher (843 vs 835 t/s), and quality is much better: 94.7% top-token agreement vs 91.6% for Q2_K_XL (from Unsloth's quantization analysis). It leaves ~1.5 GB free, which matters if you watch video while the model runs.
  3. **250k is not free.** With a 100k prompt it peaks at 15815 MiB — only ~500 MiB left. It works, but there goes the video headroom. 131k–174k is the practical range for me.
  4. **Q4_K_M needs `-ncmoe 8`.** The weights alone are 15.47 GiB, so without offload it falls to 5.3 t/s even with an idle GPU. With 8 layers of experts in system RAM it reaches ~26 t/s short / ~21.5 t/s at depth, but prefill drops ~3x (399–447 t/s). With 48 GB of RAM the offload is cheap on decode but expensive on prefill. Quality is the best of the three (97.9% top-token).
  5. **DSpark did not help.** Both the old depth-2 drafter and the new Q8_0 drafter at depth 3 cost ~40% of decode on this card. I dropped it.
  6. The earlier "5 t/s" results for IQ3_XXS were an artifact of VRAM contention, not a property of the quant. Repeating the exact same command with an idle GPU gave 57 t/s. This also explains reports of 70 t/s from other people on the same GPU — where you measure in the prompt makes a big difference (47–58 t/s short, ~40 t/s at 100k depth here).

## My recommendation

- Maximum speed: **Q2_K_XL @ 174k, q8_0 KV**, no offload.

- Best balance of quality, speed and VRAM headroom: **IQ3_XXS @ 174k, q4_0 KV**, `--ctx-checkpoints 15`, no offload.

- Only pick Q4_K_M if you need the extra quality and can pay ~45% decode + 3x slower prefill; use `-ncmoe 8`.

## Caveats

- Synthetic repeated-word prompts, not a real conversation; decode measured over only 256 output tokens.

- Single user, one slot, one GPU. No speculative decoding in the final numbers.

- `--reasoning-effort high` makes responses longer, which lowers effective tokens/s in a real chat compared to `medium`.

- Numbers are medians of 3 short runs; depth runs are single-shot, so treat them as +/- a few percent.

# Recommended configs (copy/paste)

Replace `<model>.gguf` with the filename from `unsloth/Inkling-2-Mini-GGUF`. All three use the same common flags; only KV type, context and `-ncmoe` change.

**1. Q2_K_XL — maximum speed, most VRAM headroom (61.4 short / 40.7 t/s at depth, 2.5 GB free)**

```sh

llama-server.exe -m Inkling-2-Mini-UD-Q2_K_XL.gguf -a inkling-2-mini \

-c 174080 -ngl 25 -fa on -t 12 -np 1 -ub 512 \

-ctk q8_0 -ctv q8_0 --cache-reuse 256 --fit off \

--jinja --ctx-checkpoints 15 --no-context-shift --no-mmproj-auto \

--reasoning-effort high --metrics \

```

**2. IQ3_XXS — best balance (57.2 short / 39.3 t/s at depth, 1.5 GB free, 94.7% top-token)**

```sh

llama-server.exe -m Inkling-2-Mini-UD-IQ3_XXS.gguf -a inkling-2-mini \

-c 174080 -ngl 25 -fa on -t 12 -np 1 -ub 512 \

-ctk q4_0 -ctv q4_0 --cache-reuse 256 --fit off \

--jinja --ctx-checkpoints 15 --no-context-shift --no-mmproj-auto \

--reasoning-effort high --metrics \

```

Use `-c 131072` for ~2.4 GB free, or `-c 250000` for full 250k but only ~0.5 GB free at depth.

**3. Q4_K_M — best quality, slower (25.9 short / 21.5 t/s at depth, 97.9% top-token)**

```sh

llama-server.exe -m Inkling-2-Mini-UD-Q4_K_M.gguf -a inkling-2-mini \

-c 174080 -ngl 25 -fa on -t 12 -np 1 -ub 512 \

-ctk q4_0 -ctv q4_0 --cache-reuse 256 --fit off \

-ncmoe 8 \

--jinja --ctx-checkpoints 15 --no-context-shift --no-mmproj-auto \

--reasoning-effort high --metrics \

```

`-ncmoe 8` is required: the weights are 15.47 GiB and do not fit in 16 GB with a long context. Do not add a DSpark drafter — it cost ~40% decode in both depth-2 and depth-3 tests.


r/unsloth • • 5d ago

Discussion help me get to 98 % on this coreference dataset? custom head on mmBERT, stuck at 90 %

3 Upvotes

hey guys, im trying to make a custom head that groups the words in a text that refer to the same entity (coreference). every mention picks ONE earlier mention, or "none" if it is a new thing.

ive been trying for a day and cant get past about 90 % right picks. could you please look at the architecture?

this is the whole thing: load the dataset, add the head, train on everything twice, test.

# Czech coreference as a CHOICE: every mention picks ONE earlier mention, or "none" (= a new thing).
# mmBERT-base (all of it trains) + a tiny head, 2 passes over the training data.     pip install torch transformers datasets
import random, torch, torch.nn as nn, torch.nn.functional as F
from datasets import load_dataset
from transformers import AutoModel, AutoTokenizer

dev = "cuda" if torch.cuda.is_available() else "mps"
random.seed(0); torch.manual_seed(0)
tok = AutoTokenizer.from_pretrained("jhu-clsp/mmBERT-base")
bert = AutoModel.from_pretrained("jhu-clsp/mmBERT-base").to(dev)
head = nn.Sequential(nn.Linear(3 * 768, 256), nn.ReLU(), nn.Linear(256, 1)).to(dev)
data = load_dataset("lattice-nlp/corefud-1-4").filter(lambda lang: lang == "cs", input_columns="language")   # CorefUD 1.4, the Czech part

def prep(doc):
    """-> tokens, the token of every mention's head word (in text order), the entity id of every mention"""
    enc = tok(doc["text"], return_offsets_mapping=True, return_tensors="pt")
    off = enc.pop("offset_mapping")[0].tolist(); end = max(e for s, e in off)
    m = sorted((m["head_onset"], max(i for i, (s, e) in enumerate(off) if e > s and s < m["head_offset"]), m["COREF"])
               for m in doc["mentions"] if m["type"] == "entity" and m["head_offset"] <= end)
    return enc.to(dev), torch.tensor([t for _, t, _ in m], device=dev), torch.tensor([g for _, _, g in m], device=dev)

def scores(enc, t):
    """-> table (n, n + 1). one row per mention. column 0 = "none", column j + 1 = "the same thing as mention j" """
    v = bert(**enc).last_hidden_state[0][t]; n = len(t)                       # one vector per mention
    A, B = v[:, None].expand(n, n, -1), v[None].expand(n, n, -1)
    pair = head(torch.cat([A, B, A * B], dim=2)).squeeze(2)                   # the score of "mention i is the same thing as mention j"
    pair = pair.masked_fill(~torch.ones(n, n, dtype=torch.bool, device=dev).tril(-1), float("-inf"))   # only EARLIER mentions can be picked
    return torch.cat([torch.zeros(n, 1, device=dev), pair], dim=1)            # "none" always has the score 0

def right(g):
    """True where an option is a right answer: every earlier mention of the same entity, or "none" when there is no such mention"""
    same = (g[:, None] == g[None, :]).tril(-1)
    return torch.cat([~same.any(dim=1, keepdim=True), same], dim=1)

def test():
    """the dev documents, which the model never trains on -> share of mentions whose top pick is right"""
    bert.eval(); hit = total = 0
    with torch.no_grad():
        for doc in data["dev"]:
            enc, t, g = prep(doc)
            if len(t) > 1:
                hit += right(g)[torch.arange(len(t)), scores(enc, t).argmax(dim=1)].sum().item(); total += len(t)
    bert.train()
    return f"right picks on {total:,} unseen mentions: {hit / total:.2%}"

EPOCHS, N = 2, len(data["train"])                            # 1 step = 1 document. 5,679 documents, seen twice
opt = torch.optim.AdamW([{"params": head.parameters(), "lr": 1e-4}, {"params": bert.parameters(), "lr": 2e-5}], fused=True)
sched = torch.optim.lr_scheduler.LinearLR(opt, 1.0, 0.0, EPOCHS * N)          # both learning rates fall in a straight line to 0
bert.train()
for step, i in enumerate([i for _ in range(EPOCHS) for i in random.sample(range(N), N)], 1):
    enc, t, g = prep(data["train"][i])
    if len(t) > 1:
        logp = F.log_softmax(scores(enc, t), dim=1)
        loss = -torch.logsumexp(logp.masked_fill(~right(g), float("-inf")), dim=1).mean()   # minus log of the probability that sits on the right options
        opt.zero_grad(); loss.backward(); opt.step()
    sched.step()
    if step % 100 == 0:
        print(f"step {step} of {EPOCHS * N} | loss {loss.item():.3f}", flush=True)
        if dev == "mps": torch.mps.empty_cache()             # hands unused GPU memory back (Apple only)
    if step % N == 0: print(f"epoch {step // N} done | " + test(), flush=True)

on my mac mini (M4 pro, 24 GB) it takes about 38 minutes and prints 88.4 % after epoch 1 and 89.7 % after epoch 2.

im vibe coding most of this, so please let me know if i overlooked something critical. what i found so far:

  • a gentle LR for the head (1e-4, not 1e-3) keeps its neurons alive, but the score stays the same
  • the head doesnt really matter. wider, deeper, a transformer block inside it: same score
  • a bigger base barely helps, which is puzzling. XLM-RoBERTa-large with 4 epochs gets 90.75 %, and EuroBERT-610m is far worse (it never saw czech)
  • a 3rd epoch gives nothing
  • when both models are wrong, they pick the very same wrong option 80 % of the time

the dataset is public (CorefUD 1.4, the czech part), so this is perfectly reproducible. and the labels look about 98 % right, according to a blind check i ran with opus on the wrong picks.

could you guys help me reach 98 % on this dataset? thanks!


r/unsloth • • 5d ago Heartwarming

Resource x64 ARM64 RTX Spark Windows 1 binary now + Winget

14 Upvotes

Hey folks - we merged the x64 and the ARM64 Windows binaries into 1 .exe so it's not confusing for people to download on the RTX Spark on Windows machines and seeing the .exe for x64 fail on it - the binary is slightly bigger (+20MB), but we wanted to reduce confusion and make it easier! https://unsloth.ai/download/windows

Also winget is supported so winget install --id UnslothAI.Unsloth -e works as well on x64 and ARM64 for folks who want less .exe downloading :)