Add preliminary MiniMax-M3 support#1963
Conversation
|
This is just based on ggml-org/llama.cpp#24523 and I just pointed codex is implement m3 support for ik_llama.cpp. Please kindly test, I haven't extensively tested this yet but so far its seems to work. |
|
I tested quickly, it seems to work. One should change the graph building to use standard |
41d8c56 to
c538210
Compare
Thanks for testing. I haven't really coded in c++ for over 3 decades, I can just vaguely understand c++ but ik_llama.cpp code base is much more advance than what I am comfortable understanding fully. Anyway I have done more testing a few improvements since:
I have now set this PR for review. |
ikawrakow
left a comment
There was a problem hiding this comment.
Split mode graph does not work, but I'll fix it in a separate PR.
Adds preliminary text-only MiniMax-M3 support to ik_llama.cpp, based on the public llama.cpp MiniMax-M3 implementation shape and adapted to ik's graph/tensor-loader structure.
This is intended as a basic enablement PR: load GGUF MiniMax-M3, run server inference, and support hybrid CPU/GPU expert placement. It does not attempt vision/MTP support or graph/attention split support for MiniMax-M3.
Main Changes
LLM_ARCH_MINIMAX_M3and architecture name mapping.build_minimaxm3()graph:ggml_swiglu_oaiLLM_FFN_SWIGLU_OAI_MOEggml_swiglu_oaiLLM_FFN_SWIGLU_OAI_MOEusesggml_moe_up_gate_ext()instead of the unsupported fused path variant.Validation Performed
llama-servercompleted successfully.Runtime Notes
On a single 32GB V100 with MiniMax-M3 Q4 and
CTX_SIZE=131072:--no-fused-moe--no-fused-up-gate--no-fused-mul-multiaddGGML_UNARY_OP_SWIGLU_OAI.Known Limitations
GGML_UNARY_OP_SWIGLU_OAIremains future work.