Better HN
topnewbestaskshowjobs
Log inSign up

danielhanchen

3,680 karma · joined Sep 8, 2021 (5y ago) · 697 submissions

Unsloth github.com/unslothai/unsloth - finetune Llama 2x faster + use 70% less VRAM

1. Used to work at NVIDIA RAPIDS cuML

2. Discord: https://discord.gg/unsloth

3. Github: https://github.com/danielhanchen

4. Twitter / X: x.com/danielhanchen

5. Email: my handle @ gmail.com

6. Bug fixes for Gemma: https://news.ycombinator.com/item?id=39671146

7. Bug fixes for Gradient Accumulation: https://x.com/danielhanchen/status/1846235913443262891?lang=en

Submissions

comment 1d ago · link · parent

Oh thanks for trying it out! If there are any suggestions for NPU support in Unsloth - I'm more than happy to help!

comment 1d ago · link · parent

Yes I can investigate and we'll add it in :)

comment 1d ago · link · parent

Oh hey - Unsloth Desktop works in Windows, Linux, Mac by default! https://unsloth.ai/docs/desktop has more instructions - we have an AppImage and a .deb at https://unsloth.ai/download/linux and or https://github.com/unslothai/unsloth#-get-started

comment 1d ago · link · parent

Oh thanks for whoever posted this!

If anyone has any questions or suggestions for Unsloth Desktop - feel free to comment - and I'm more than happy to help answer any questions!

comment 1w ago · link · parent

Yes were investigating!

comment 1w ago · link · parent

Oh interesting benchmark!

comment 1w ago · link · parent

We're innovating as well so there definitely will be more updates! We have a fork where we also add edits for eg https://github.com/unslothai/llama.cpp/releases/tag/b12347-m... has a lot of perf fixes and also other model arch support which mainline does not have

comment 1w ago · link · parent

Oh sorry for the delay - oh UD3.1 was utilized for DeepSeek-V4.1, Qwen3.8-Flash-Next and Qwen3.8-27B :) But yes it's generalized! We're investigating Gemma-4 next! And yes other models are in the pipeline!

Oh PDF export - hm I will check :) No worries!

comment 1w ago · link · parent

We updated 4, 5 and 6bit as well! For now no agentic / coding benchmarks, but KLD is definitely much better!

comment 1w ago · link · parent

Oh yes interesting!

comment 1w ago · link · parent

Yes the decay is not a bad idea - I think there were some research papers on this but I forgot haha - sparse attention partially does this, where if beforehand we know softmax(QK^T/sqrt(d)) will have a 0 cell, we can skip the calculation of QK^T for that cell (ie that KV row has 0 weight)

The main issue though is Q and K still need to be whole, so cannot be compressed. However one can do some sort of KV cache "double cache" where we can offload KV rows that are not that attended to - so the "cold KV rows" to RAM and or SSD, and the "hot KV rows" are in VRAM - this might work, but sounds complex

comment 1w ago · link · parent

Yes as requested by the community :) We also run all benchmarks multiple times, and provide error bars! For eg Terminal Bench and DeepSWE are run 3x, and LiveCodeBench 6x or more, and other faster benchmarks are run 12x

comment 1w ago · link · parent

Oh yes I think I saw bottecap's work - very interesting!

For Qwen3.8-Flash-Next (I know not 27B haha), we actually cut reasoning by up to 50% esp for the small quants - we found quantizing models naively coincidentally also made them more verbose, as it would "correct" itself during the reasoning process. We managed to make the extra token usage of lower bit quants now only be +5% vs BF16 vs +50% extra from other quants.

27B should have similar benefits, but it's less as it's a smaller model!

comment 1w ago · link · parent

Oh we have not announced it, but in the past month, Unsloth has FSDP2 support - full finetuning, LoRA and QLoRA all work! We also support pipeline parallel, tensor parallel, and more!

See https://github.com/unslothai/notebooks/blob/main/fsdp2_scrip...

comment 1w ago · link · parent

Oh it's correct - that's the installer size - but we will need to download binaries from https://github.com/unslothai/llama.cpp and also PyTorch etc which will take 2-3GB more

comment 1w ago · link · parent

Oh llama.cpp has massively improved so it should function well! We're also making MLX faster soon!

comment 1w ago · link · parent

Yes! One method is KV cache compression to 4-bits - llama.cpp does have hadamard, but it's not very accurate - we were researching if 4-bit KV cache can be used with a sliding window of 1024 for example of 8-bit KV cache

So we can have a 4bit KV cache, but the most recent N tokens can be 8bit - we found accuracy improves 2x!

comment 1w ago · link · parent

If anyone has any questions as well - feel free to ask!

We also updated https://huggingface.co/unsloth/DeepSeek-V4.1-Flash-1017-GGUF with UD3.1 quants

And also https://huggingface.co/unsloth/Qwen3.8-Flash-Next-GGUF as well!

We provide our benchmarking methods like what graders we use, infra fixes and issues and more in https://unsloth.ai/docs/basics/dynamic-3.0-ggufs/dynamic-3.1...

comment 3mo ago · link · parent

We made something called Divergence-300 @32 (and later @512) which tests actual inference across 32 tokens on a held out test (Terminal Bench, DeepSWE, Math etc)

We do plan to do larger benchmark suites though!

comment 3mo ago · link · parent

Hey we did not remove the MTP for sizes above 8GiB - but yes for small GGUFs under 8 ish GiB, we removed the MTP module (IQ2_XXS and lower), because it's 500MiB to 750MiB in size, and on small 8 GiB machines, even 500MiB is needed.

As someone in the comments said we made a separate Q4_0 MTP if that's helpful so you can use that.

But I would suggest using UD-IQ3_XXS for 10.9GB for 16GB machines or Q2_K_XL

comment 3mo ago · link · parent

Actually we do publish non KLD benchmarks - top-1% is better - for NVFP4 for eg we did MMLU Pro, GPQA, AIME 2025: https://unsloth.ai/docs/models/qwen3.6#nvfp4-benchmarks

Sometimes they're just slow and expensive, so we we KLD as a proxy measure and it's very high correlation (95%+)

comment 3mo ago · link · parent

That wasn't our problem right? Gemma officially updated tool calling which we adopted

comment 3mo ago · link · parent

We also made NVFP4 ones if that helps! https://huggingface.co/unsloth/Qwen3.8-27B-NVFP4

comment 3mo ago · link · parent

Ok no worries - if there are any future issues - feel free to message / make a HF issue - we'll fix promptly!

Also note its best to follow Gemma4's official sampling params since they evaled with it - dry multiplier sometimes works, but it actually screws up reasoning sometimes

comment 3mo ago · link · parent

We will investigate Ling!

comment 3mo ago · link · parent

Thanks for the support and to the community!

comment 3mo ago · link · parent

Hey :)

comment 3mo ago · link · parent

Thanks haha

comment 3mo ago · link · parent

Hey yes - if you could describe what the issues are - we will gladly fix them!

comment 3mo ago · link · parent

Hey sorry what are the problems that you're experiencing - we're more than happy to help fix them!
12345
24