mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #477] [CLOSED] MiniMax-M3.1-Flash on Maya: its own engine (maya-mm3) with tensor parallel, DSpark, pictures, INT8 KV and KV streaming; the setup offers it beside GLM and DeepSeek #552
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#552
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mw00/project-maya/pull/477
Author: @needmorevram
Created: 10/25/2026
Status: ❌ Closed
Base:
main← Head:minimax-m3.1-flash📝 Commits (10+)
d69f718maya-mm3: MiniMax-M3.1-Flash (EXL3) - its own engine, first working forward40273eamaya-mm3: decode at 16 tok/s - expert profile, pinned pool, token kernels, CPU lane2801329maya-mm3: Maya's engine protocol, and MiniMax-M3.1 in the server0471fedSetup: MiniMax-M3.1-Flash as Maya's third model (maya-mm3)6a628e6maya-mm3: DSpark drafting - exact, ~1.5x decode2134b60maya-mm3: DSpark's confidence floor 0.7 by defaultc35772fmaya-mm3: the CPU lane's pool - a late worker can no longer take a job of the next phase6daf756maya-mm3: the staging slots as an expert cache in decode768099emaya-mm3: the expert cache's copies at a forward's end, its slots live two forwards onfaf4583maya-mm3: pictures - MiniMax-M3.1-Flash's vision tower in the engine📊 Changes
37 files changed (+12896 additions, -48 deletions)
View changed files
📝
CMakeLists.txt(+11 -0)➕
data/expert-profile-mm3.bin(+0 -0)📝
maya.py(+214 -11)📝
serve/frontend.py(+218 -5)➕
serve/mm3_vision.py(+175 -0)📝
serve/server.py(+40 -18)➕
serve/test_minimax_frontend.py(+140 -0)➕
serve/test_mm3_vision.py(+70 -0)📝
serve/web/app.css(+2 -0)📝
serve/web/app.js(+38 -12)📝
serve/web/index.html(+2 -0)➕
src/mm3/mm3_cpu.cpp(+392 -0)➕
src/mm3/mm3_cpu.hpp(+47 -0)➕
src/mm3/mm3_dspark.cu(+373 -0)➕
src/mm3/mm3_dspark.hpp(+65 -0)➕
src/mm3/mm3_exl3.cu(+2495 -0)➕
src/mm3/mm3_exl3.hpp(+221 -0)➕
src/mm3/mm3_geo.hpp(+72 -0)➕
src/mm3/mm3_kernels.cu(+973 -0)➕
src/mm3/mm3_kernels.cuh(+127 -0)...and 17 more files
📄 Description
MiniMax-M3.1-Flash as Maya's third model, with its own engine
maya-mm3, built for the community EXL3 quant Mia-AiLab/MiniMax-M3.1-Flash-EXL3-EAQ-v1-3.5-bpw (196.7 GB; its card says no engine had loaded it before)../setup.shoffers it beside GLM and DeepSeek, andmaya.pyserves it with chat, tools, all five thinking levels, DSpark drafting, pictures, tensor parallel and a 128K context. GLM's and DeepSeek's engines are untouched. Rebased on main v1.1.27.Results
One PC: an RTX 3090 and 8 RTX 5060 Ti (152 GB VRAM, each GPU on PCIe 3.0 x8), 183 GB RAM, 2 NUMA nodes. Experts that don't fit in VRAM run on the CPU from pinned RAM, so nothing is read from the SSD after loading.
--tp 4+ DSpark, 8K context--tp 4+ DSpark, 64K context--tp 4, INT8 + streaming, 128K contextDecode is 300-token greedy answers to a code prompt and a prose prompt. The CPU lane (about 0.55 ms an expert, compute-bound) is what limits code; per-layer round trips and the draft's acceptance limit prose.
Quality checks:
tools/mm3/ref.py, a torch reference over the EXL3 pack, matches transformers'MiniMaxM3VLmodules to about 3e-7 on real layers.--tpis deterministic:MM3_STRESSrepeated one verify window's forward 300 times with the same logits bit for bit.What it adds
maya-mm3: the engine (
src/mm3)data/expert-profile-mm3.bin) keeps the most-routed experts in VRAM.--tp 1|2|4):--dspark on):mx_rows).--vision on): the 32-layer vision tower in the engine; the server resizes asimage_processor.pydoes.--kv-cache int8: opt-in, one scale per row of 128. On 16K tokens of assistant text, perplexity goes from 6.996 to 7.009 (+0.19%), flat across positions. It's not exact, so BF16 stays the default.--kv-streaming on: the last--kv-residentpositions (32768 by default) stay in VRAM as a tagged ring; every position also lives in mapped pinned RAM, and attention reads older keys from there. It's exact: 6K logits came out byte for byte the same with it on and off, 8K perplexity matched at all 7972 positions, and the 53K needle at 128K gave the same answer. At 128K, INT8,--tp 4it fits 4428 experts in VRAM instead of 4182, at the same prompt speed (84.1 tok/s at 53K).STATlines with the tier keys: experts in VRAM and in pinned RAM, what the CPU computed and what was promoted each token.VRAMlines for the GPU map, built from every device allocation counted by what it holds.Server, setup and dashboard
maya.pygains aminimaxfamily: download with sha256 per file,tools/mm3/pack.py, the config, and a start check.--tp 4(or 2) when the GPUs make whole groups, turns on--kv-streaming on, and setsreasoning_effort: max.--kv-cache,--kv-resident,--tpand the other engine flags.minimaxpre-tokenizer intools/strata_tokenizer.py, checked token for token against HFtokenizers(tools/mm3/tok_check.py).chat_template.jinja, rendered as transformers renders it.<mm:think>reasoning, and]<]minimax[>[-tagged tool calls throughOutputParser(minimax=True).ENGINE_VISION,serve/mm3_vision.py). Videos get a clear 400.effort_kwargsadds the client's word aseffort_namewhere it differs from GLM's four, so GLM, Qwen and DeepSeek render as before.Rebase onto v1.1.27
Two places met main's video input (#248) in
serve/server.py. MiniMax's pictures now come frommedia_of's images, and its token count takes the engine-vision path DeepSeek uses. All 378 server tests pass (9 skipped). In one earlier full runtest_server.FailedRestartKeepsContextfailed under load; it passes on its own and in the next full run, and this branch doesn't change that code.Not covered
--pplneeds the layer-split engine:--tpreturns at most 16 rows of logits per prompt.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.