I have explored inference performance and layer offloading, including whether Metal can page model layers and how inference behaves with --ngl 0. These observations are tentative and do not establish a technical explanation for the performance differences.
I wrote, “Just tested 5bit quants of Devstral 123B,” using llama.cpp llama-cli directly from the HF repository.
I said the Devstral 123B test “works great” and that the inference looks stable.
I reported an inference speed of 3 tokens/sec for the test.
I described the model as very big and is dense.
I advised: “Start from any simple model and design a small engine.”
I say even a pure-C engine will run fast enough for testing when compiled with -O3 -march=native.
I say modern compilers are able to use SIMD instructions very well.
I believe having to split large model files is an anti-pattern.
I believe the need to split large model files could be definitely abstracted away by Hugging Face.
I look forward to changes in the way we upload and download large models, since models are headed to be larger :D.
On 2025-01-30, I described the result as “It's not terrible.”
I said, “I don't think I hit the limits with 20 layers.”
Because I did not think I had hit the limits, I said, “Will try more.”
I thanked @ggerganov, saying, “Thanks for the trick!”
I said, “Had the illusion that Metal was also able to do paging.”
In a follow-up, I asked, “Any potential explanation about why if I use --ngl 0 it's much faster?”
I tentatively guessed that --ngl 0 meant CPU inference, saying, “This means just CPU inference I guess”.
I initially described the --ngl 0 performance by saying, “it becomes so fast to be totally usable.”
In my 2025-01-30 08:50 UTC follow-up, I qualified my earlier “totally usable” description: I said that “usage” was too strong a word, while offering a rough speed estimate.
I corrected my earlier wording, saying, “Well "usage" is too big of a word :D”.
I added, “But it gets ok.”
I estimated the performance difference as “More or less 2x faster.”
I described progress toward running LLM inference without the complexities and poor performance of the Python ecosystem as “every day more real.”