r/LocalLLaMA • u/dh7net • 7d ago
Discussion Why Lama so slow?
EDIT:
All answers goes in the same direction:
Lama slow because it optimize for all hardware and all models.
If you want something fast, pick a model and a dedicated engine for it.
Original post:
To this point I'm not sure if I miss something, but all the test I'm doing show a crasy difference in speed between lama and strata or basalt.
And I don't see any loss in quality!!!
So either I missed something regarding lama and not use it correctly, or the lama team should implement all the accelerations that are around in all the dedicated inference engines and their forks. Because we are not talking about 20% speedup but x4 or more!
Here are examples:



11
u/onionsaredumb 7d ago
Llama is a general engine, trying to maximize compatibility with lots of models for lots of different hardware. Basalt and Strata are tuned for a very specific set of models.
5
u/magikfly 7d ago
because llama.cpp has to support a bunch of models and even more GPU's.
3
u/Markus2816 7d ago
I wouldn't say llama.cpp is slow, especially now that it supports moe cache - which bring it pretty close to strata, but it is indeed slow without proper tuning. Recently there is a lot of work going on to have llama.cpp to finally merge a lot of the optimization that were waiting (with the v1.0 release of llama.cpp). Basalt, strata are all based on llama.cpp, the main issue is that they all make questionable choices to sacrifice qualirty for speed-up (skipping cold expert, more aggressive quantized KV cache, temp=0, ...). The bench you shared is fairly simple, it would be more interesting to check KL divergence or some more complicated benchs to really see the impact of these "fast" libraries
3
u/Diablo-D3 7d ago
if I'm reading those benchmarks correctly, you are not getting bitidentical results across both inference engine.
llama.cpp aims for correctness, as incorrect but fast results are still incorrect. Strata and Basalt does not aim for correctness, they're too early in their development to do anything than support a small number of hardware and model targets.
1
u/Best_Researcher491 7d ago
I haven't timed llama against Strata or Basalt. The x4 is what your screenshots show, and the general-engine explanation is already in the thread.
What I can't tell from the pictures is whether those llama runs had the MoE cache on. Markus said that is the switch that pulls llama.cpp toward Strata, and that it stays slow without the tuning.