Conversation
Collaborator
Author
|
at some stage we will need to make this work with #56 - probably after merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the native MLX backend work, backend benchmarking, and the current Qwen2-focused MLX runtime fixes.
This branch currently depends on an
mlx-rsintegration branch rather than upstreamoxideai/mlx-rsdirectly:mesh-llmis currently pinned to the fork integration commit:i386/mlx-rs@22432d4c4e45d171937678e0dfbe7d9c6684c241What Is Working
llama.cppon the tested pairs.mlx_lm::models::qwen2path instead of the old Llama-compatibility shim.What Still Needs Improvement
llama.cppis still ahead overall on TTFT and most sustained generation paths.llamaoverall.Stable Full Matrix
Latest full phased serial matrix previously added to this PR:
matrix-20260329-174731That matrix still shows the overall shape:
llama.cppstill wins most full-matrix TTFT and total-time comparisons.Focused Qwen2 Progress
Earlier focused Qwen2 baseline after the lower-level
copy()fixResults:
/tmp/qwen2-focused-kvcopyKey MLX totals from that focused run:
long-briefing:1620.8 mscode-context:851.4 mscache-base:1049.1 mscache-extend:1593.5 msLatest focused Qwen2 run after switching KV materialization to
contiguous(false)Results:
/tmp/qwen2-focused-contiguousKey read from the latest run:
llamacache-extendreached rough parity on total time while preserving the corrected Qwen2 output pathLatest focused Qwen2 numbers:
mainlong-briefingllama:95.9 msTTFT,2592.4 mstotalmlx:128.9 msTTFT,3194.1 mstotalcode-contextllama:87.9 msTTFT,2069.7 mstotalmlx:128.6 msTTFT,1644.5 mstotalcache-sequencecache-basellama:102.1 msTTFT,2391.5 mstotalmlx:194.8 msTTFT,2748.6 mstotalcache-extendllama:87.7 msTTFT,3028.9 mstotalmlx:118.8 msTTFT,3013.5 mstotalObjective Conclusion
This branch now has:
It does not yet show that MLX is broadly faster than
llama.cpp.The current best claim is narrower:
cache-extendtotal time reached rough parity withllama