ikawrakow / ik_llama.cpp

llama.cpp fork with additional SOTA quants and improved performance
MIT License
89 stars 6 forks source link

iq4_ks: faster dot product on Metal #90

Closed ikawrakow closed 4 weeks ago

ikawrakow commented 4 weeks ago

Haha, I keep forgetting that the Metal compiler often needs a hand to produce fast code. In this particular instance, we gain almost 8.5% token generation (TG) speedup for IQ4_KS: TG-128(LLaMA-3.1-8B) goes to 52.5 t/s up from 48.4 t/s on my M2-Max 30-core GPU. The actual computation did not change in any way, we just helped the compiler fetch data ore effectively.