Apparently you can skip entire transformer blocks at load time with minimal performance impact
Mirrored from r/LocalLLaMA for archival readability. Support the source by reading on the original site.
The benefit is another trick to allow fitting a model that wouldn’t fit in your hardware otherwise. People currently rely on quantization, and this is just another tool that can be used for that purpose (and they can be used together as well)
Following recent (very cool) papers, I implemented this as a --skip-layers flag to a llama.cpp fork, so it just never instantiates the blocks you tell it to skip. Bake-time pruning already exists (--prune-layers, mergekit passthrough etc.); this is just the runtime version of the same idea.
One important note here is that which blocks you skip matters by orders of magnitude, so i had to ship it with a selector mechanism.
Results, figures, and the failure cases are in the writeup.
- Writeup: https://open.substack.com/pub/itayinbarr/p/you-can-skip-llm-layers-at-runtime
- Fork: https://github.com/itayinbarr/llama.cpp
Happy to hear what you think in general!
[link] [comments]
More from r/LocalLLaMA
-
Been running Qwen3.6-27B through a 3-critic harness. The harness matters more than I thought
Jun 30
-
I Hate Dario Amodei, and everything he stands for.
Jun 29
-
Introducing LongCat-2.0 - , a large-scale MoE language model with 1.6 trillion total parameters and ~48 billion activated per token. This was the stealth model that was on Openrouter under the name 'owl-alpha'.
Jun 29
-
Krea-2-Turbo Image Model - Easy to be fully uncensored, but it can also EDIT Images!
Jun 29
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.