Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
and image and audio input through its `--mmproj` companion.
- An image LoRA whose PEFT header sets `use_rslora` loads, scaled as PEFT
scales it, where it was refused.
- K2 Horizon 7B and K2 Horizon MoVA 36B-A4B (GGUF arch `k2-horizon`), with
`reasoning-low`, `-medium` and `-high` intents and tool calls.

### Changed

Expand All @@ -39,6 +41,10 @@ adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Fixed

- A chat template with a `{% generation %}` block was refused by
`--chat-template` as invalid Jinja.
- `--thinking off` was silently ignored on a model with no thinking switch
when its template has the word thinking in its text. It now warns.
- A streamed image request refused while it ran, such as one too large for
memory, got a server error frame where the same request unstreamed got a 400.
- The `gmlx pull` plan of an image model could say its parts fit in stages
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ back.
- GLM 4 through 5.3, Kimi-K3, MiniMax M2 and M3, and gpt-oss
- Hunyuan, Hy3, HY4, Muse Glimmer and Muse Spark
- Granite, Nemotron-H and Falcon-H1
- K2 Horizon, dense and MoVA

Each family's output is checked against llama.cpp at 16k context. The
[coverage table](https://asher.github.io/gmlx/arch-coverage.html) lists the
Expand Down
2 changes: 1 addition & 1 deletion THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ in [`licenses/`](licenses/).
| [mlx-lm](https://github.com/ml-explore/mlx-lm) | MIT | Release 0.31.3 vendored whole at `gmlx/_vendor/mlx_lm`, with its LICENSE, its module references rewritten and each gmlx edit marked `# gmlx:`. Model/cache classes from unmerged PRs: `gmlx/models/deepseek_v4/model.py` + `gmlx/models/deepseek_v4/hyper_connection.py` + `gmlx/models/deepseek_v4/cache.py` (PR #1192), `gmlx/models/minimax_m3.py` (PR #1401), `gmlx/models/hy_v3/model.py` (PR #1485); `gmlx/models/kimi_k3.py` builds on the released `kimi_linear` module. The KV cache classes in `gmlx/cache/kv_cache.py` and the mask and SDPA helpers in `gmlx/cache/attention.py` are mlx-lm's `models/cache.py` and `models/base.py` code, by way of mlx-vlm 0.7.3. The FunctionGemma tool parser in `gmlx/models/function_gemma.py` comes from release 0.31.3, by way of mlx-vlm 0.6.15. The Gemma 4 text weight sanitize in `gmlx/models/gemma4/lm_sanitize.py` comes from release 0.31.3. |
| [mlx-vlm](https://github.com/Blaizzy/mlx-vlm) | MIT; Apache-2.0 for eight files | Release 0.7.3 vendored whole at `gmlx/_vendor/mlx_vlm`, with its LICENSE, its module references rewritten and each gmlx edit marked `# gmlx:`. Eight of its files keep an Apache-2.0 header, under `models/llada_image`, `models/mage_vl`, `models/nemotron_voicechat` and `models/sam3d_objects`. Also the qwen3.5 and qwen3.5 MoE text models of release 0.6.15, vendored in `gmlx/models/qwen35/` (`language.py`, `gated_delta.py`, `moe_language.py`); the Gemma 4 text model and unified container of release 0.7.3, vendored in `gmlx/models/gemma4/` (`language.py`, `unified.py`); the KV cache classes of release 0.7.3 (`models/cache.py`), vendored whole in `gmlx/cache/kv_cache.py`, and its mask and SDPA helpers (`models/base.py`) in `gmlx/cache/attention.py`; the chunked-eval `store_kv_blocks` override in `gmlx/cache/apc_manager.py`, the thinking-budget logits processor in `gmlx/gen/thinking_budget.py`, and `entropy_transfer_mask` in `gmlx/systemone/denoise.py`. |
| [omlx](https://github.com/jundot/omlx) | Apache-2.0 | DeepSeek-V4-Flash MTP port (`gmlx/models/deepseek_v4/mtp.py`), the MTP undo log of the rotating cache classes in `gmlx/cache/kv_cache.py`, and the native-kernel dispatch pattern in `gmlx/models/deepseek_v4/model.py`. |
| [llama.cpp / ggml](https://github.com/ggml-org/llama.cpp) | MIT | Pre-tokenizer split regex patterns in `gmlx/load/tokenizer.py`; GGUF metadata and quantization-type conventions; the Muse Glimmer vision tower in `gmlx/models/muse_glimmer/vlm_model.py` (from `clip_graph_muse_glimmer` and `tools/mtmd/clip.cpp`) and its projector constants in `gmlx/load/vlm.py`; the Muse Spark audio encoder in `gmlx/models/muse_spark/audio.py` (from `clip_graph_muse_spark_audio`); the Kimi-K3 chat-template fixture `tests/fixtures/kimi_k3_template.jinja` (PR #26185). |
| [llama.cpp / ggml](https://github.com/ggml-org/llama.cpp) | MIT | Pre-tokenizer split regex patterns in `gmlx/load/tokenizer.py`; GGUF metadata and quantization-type conventions; the Muse Glimmer vision tower in `gmlx/models/muse_glimmer/vlm_model.py` (from `clip_graph_muse_glimmer` and `tools/mtmd/clip.cpp`) and its projector constants in `gmlx/load/vlm.py`; the Muse Spark audio encoder in `gmlx/models/muse_spark/audio.py` (from `clip_graph_muse_spark_audio`); the Kimi-K3 chat-template fixture `tests/fixtures/kimi_k3_template.jinja` (PR #26185); the K2 Horizon chat-template fixture `tests/fixtures/k2_horizon_template.jinja` (`models/templates/IFM-K2-Horizon.jinja`). |
| [ds4.c (dwarfstar)](licenses/ds4.c-LICENSE) | MIT | QAT round-trip and sink-attention reference semantics reimplemented in `gmlx/models/deepseek_v4/model.py` (cited per function in comments); the DSpark drafter runtime reimplemented in `gmlx/models/deepseek_v4/dspark.py`; the `deepseek4-dspark` sidecar layout (`gguf-tools/deepseek4-quantize.c` and the published DSpark-support sidecar) emitted by `scripts/convert_dspark_sidecar.py`. |
| [DeepSeek-V4-Flash-0731](https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-0731) | MIT | Reference DSparkBlock forward semantics (`inference/model.py`) reimplemented in `gmlx/models/deepseek_v4/dspark.py` (license text in [`licenses/deepseek-v4-LICENSE`](licenses/deepseek-v4-LICENSE)). |
| [beellama.cpp](https://github.com/Anbeeld/beellama.cpp) | MIT | The KVarN KV-cache record format and cache semantics (128-token rotated records with three axis vectors, fp16 sink and precision tail, `kvarnN` widths, `--kv-tail-tokens`) reimplemented in `gmlx/cache/kvarn_cache.py` and `gmlx/cache/kvarn_sdpa.py`. The method is Huawei's KVarN ([arXiv:2606.03458](https://arxiv.org/abs/2606.03458), reference at [huawei-csl/KVarN](https://github.com/huawei-csl/KVarN), Apache-2.0; no code from it is used). The kernels live in mlx-kquant, whose notices cover its own beellama.cpp port. |
Expand Down
3 changes: 2 additions & 1 deletion docs/arch-coverage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Supported architectures

gmlx maps 44 GGUF architectures to model types, and 43 of them load end-to-end
gmlx maps 45 GGUF architectures to model types, and 44 of them load end-to-end
with no `hf_source`. `scripts/check-coverage.py` generates this page from the
architecture table and the mlx-lm that gmlx carries, so do not edit it by hand.

Expand Down Expand Up @@ -47,6 +47,7 @@ family, backend, status and caveat:
| `hunyuan-moe` | hunyuan | mlx-lm | loadable | |
| `hy_v3` | hunyuan | mlx-lm | loadable | Early GGUFs whose arch is hy-v3 with a dash are not mapped. Reconvert them. |
| `hyv4` | hunyuan | mlx-lm | loadable | The GGUF has no MTP head, so speculative decoding is not available. `--kv-bits` is refused. |
| `k2-horizon` | k2-horizon | mlx-lm | loadable | The GGUF has no MTP head, so speculative decoding is not available. |
| `kimi-k3` | kimi | mlx-lm | loadable | The hybrid cache cannot go back in place, so after `/retry` or `/undo`, chat reads the earlier conversation again with the next message. |
| `llama` | llama | mlx-lm | loadable | |
| `minimax-m2` | minimax | mlx-lm | loadable | |
Expand Down
1 change: 1 addition & 0 deletions docs/family-defaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ a model ends up with.
| `kimi-k2` | `deepseek2 named (?i)\bkimi` | temperature=1.0 top_p=0.95 | - |
| `muse` | `muse-glimmer` | temperature=1.0 top_p=0.95 top_k=64 thinking_start_token=<\|start\|>assistant to=self<\|message\|> thinking_end_token=<\|eom\|> | `@reasoning-high`: reasoning_strength=high; `@reasoning-low`: reasoning_strength=low; `@reasoning-medium`: reasoning_strength=medium; `@reasoning-xhigh`: reasoning_strength=xhigh |
| `muse-spark` | `muse-spark` | temperature=1.0 top_p=1.0 top_k=64 thinking_start_token=<\|start\|>assistant to=self<\|message\|> thinking_end_token=<\|eom\|> | `@reasoning-high`: reasoning_effort=high; `@reasoning-low`: reasoning_effort=low; `@reasoning-medium`: reasoning_effort=medium; `@reasoning-xhigh`: reasoning_effort=xhigh |
| `k2-horizon` | `k2-horizon` | temperature=1.0 top_p=0.95 | `@reasoning-high`: reasoning_effort=high; `@reasoning-low`: reasoning_effort=low; `@reasoning-medium`: reasoning_effort=medium |
| `llama` | `llama`, `smollm3` | temperature=0.6 top_p=0.9 | - |
| `mistral` | `mistral3` | temperature=0.15 | - |
| `default` | (anything else) | temperature=0.7 top_p=0.95 | `@coding`: temperature=0.3; `@creative`: temperature=1.0 min_p=0.05 |
Expand Down
1 change: 1 addition & 0 deletions docs/long-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ flags refuses.
| `gpt-oss` | Sliding window layers keep the header's factor 32. |
| `granite`, `granitehybrid` | |
| `hy_v3`, `hyv4` | |
| `k2-horizon` | |
| `llama` | |
| `minimax-m2`, `minimax-m3` | |
| `mistral3` | |
Expand Down
10 changes: 5 additions & 5 deletions gmlx/_vendor/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,10 @@
"mlx_vlm/models/jina_vlm/language.py": {"status": "verbatim", "upstream": "65f112e5c77191c8e29cb01991ae21b5cf9d693cbf651664e27adbd25727b63c"},
"mlx_vlm/models/jina_vlm/processing_jinavlm.py": {"status": "verbatim", "upstream": "81fdae0d704f82f00081cb9c2dfd3ff4fe0f680f3275251eeab63ce6e946d875"},
"mlx_vlm/models/jina_vlm/vision.py": {"status": "verbatim", "upstream": "424382f0520c3ee7a0f6482c48a60f3d8498fc5567da39e395d87b42b88cfbf5"},
"mlx_vlm/models/k2_horizon/__init__.py": {"status": "verbatim", "upstream": "ab9041063ffb321cc77fa4b03f2ef24c074af5de7d4f5ae832d05674a8da9081"},
"mlx_vlm/models/k2_horizon/config.py": {"status": "verbatim", "upstream": "d2f6c6254fd7072612c1423c72846cd6c4f857ee5ab51eb3988438281b370ecb"},
"mlx_vlm/models/k2_horizon/k2_horizon.py": {"status": "verbatim", "upstream": "ff47fd80ceb15716553a154029853abe080c5569d3fa8c9406d1bc85dbf8a180"},
"mlx_vlm/models/k2_horizon/language.py": {"status": "verbatim", "upstream": "9b0df74e8226b437ad242fe488c8881737c4e75ee534b192136fd596cc63032c"},
"mlx_vlm/models/k2_horizon/__init__.py": {"status": "excluded", "upstream": "ab9041063ffb321cc77fa4b03f2ef24c074af5de7d4f5ae832d05674a8da9081"},
"mlx_vlm/models/k2_horizon/config.py": {"status": "excluded", "upstream": "d2f6c6254fd7072612c1423c72846cd6c4f857ee5ab51eb3988438281b370ecb"},
"mlx_vlm/models/k2_horizon/k2_horizon.py": {"status": "excluded", "upstream": "ff47fd80ceb15716553a154029853abe080c5569d3fa8c9406d1bc85dbf8a180"},
"mlx_vlm/models/k2_horizon/language.py": {"status": "excluded", "upstream": "9b0df74e8226b437ad242fe488c8881737c4e75ee534b192136fd596cc63032c"},
"mlx_vlm/models/kernels.py": {"status": "verbatim", "upstream": "7f18031e867b31eae7f57f38c53c653983bcd867e65080e66a32f60da8452360"},
"mlx_vlm/models/kimi_k25/__init__.py": {"status": "verbatim", "upstream": "647b1ea761370bbf2c7f0de5ca500bd185e837994abd04246035bb689b3f3e98"},
"mlx_vlm/models/kimi_k25/config.py": {"status": "verbatim", "upstream": "784f6bddddbaf0d38135e09e2596b5856573aafa551d3d628f246a5428e20034"},
Expand Down Expand Up @@ -1525,7 +1525,7 @@
"mlx_vlm/server/realtime.py": {"sha256": "942671328088936df3145eb72ba7e6650d0171c22ca17321d79ad113cd0482b9", "status": "codemod", "upstream": "815998c835bd348649779ce480152c48cf8ff770ca53503f1a1c31649668b416"},
"mlx_vlm/server/request_normalization.py": {"sha256": "38c69ac6dd59534f5b6ad93adf15be145bf299c1aae9af0c9d0216338c006c59", "status": "edited", "upstream": "37eb0727a61eb8a647cf010af20098f388688336d0e9df9f217c2409fc3a00e5"},
"mlx_vlm/server/reranking.py": {"status": "verbatim", "upstream": "36b03fb077741261696795a3b32bfcae64339d0d50d091ee39f2df4b97343179"},
"mlx_vlm/server/responses_state.py": {"sha256": "58919f35ec6bed9a40390ce45e9af28d65dbdf52e166ace2854afd9267167862", "status": "codemod", "upstream": "138184cb972c43c6f48fc104642608add2605180c1682d3cc1dfb0bd408f3657"},
"mlx_vlm/server/responses_state.py": {"sha256": "0a195e66a156624c7fc8710c54fb3a782f6a14f7bfa2cd75b59e099e060eebf4", "status": "edited", "upstream": "138184cb972c43c6f48fc104642608add2605180c1682d3cc1dfb0bd408f3657"},
"mlx_vlm/server/runtime.py": {"status": "verbatim", "upstream": "de80f06d985f98270d7f5d16d2c4e41f1f8ecd69c15c9a819ec8e891ff1f83d2"},
"mlx_vlm/server/runtime_config.py": {"sha256": "ae05cb5e399e51700340a7ed31e24f7385f5373325e37fe15425ceee5e570b8a", "status": "codemod", "upstream": "cccded87d36ee60bb302be4898b2a674335448e9eb6838584ca797095e1b4c07"},
"mlx_vlm/server/schemas.py": {"status": "verbatim", "upstream": "80c863e32dd543ca878876e3b183559adfa1a27848d44599ae0852efe74fea68"},
Expand Down
4 changes: 0 additions & 4 deletions gmlx/_vendor/mlx_vlm/models/k2_horizon/__init__.py

This file was deleted.

40 changes: 0 additions & 40 deletions gmlx/_vendor/mlx_vlm/models/k2_horizon/config.py

This file was deleted.

49 changes: 0 additions & 49 deletions gmlx/_vendor/mlx_vlm/models/k2_horizon/k2_horizon.py

This file was deleted.

Loading
Loading