Run this model with HF Jobs

Run netprojects/TML-d24-varloop-research-MLX-4bit on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/netprojects/TML-d24-varloop-research-MLX-4bit. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/netprojects/TML-d24-varloop-research-MLX-4bit on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/netprojects/TML-d24-varloop-research-MLX-4bit. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Paris99's picture
Card: use the new repo names
05f5016 verified
|
Raw History Blame Contribute Delete
6.82 kB
---
license: apache-2.0
license_link: https://www.apache.org/licenses/LICENSE-2.0
base_model: thinkingmachines/TML-d24-varloop-research
base_model_relation: quantized
pipeline_tag: image-text-to-text
library_name: mlx
tags:
- mlx
- apple-silicon
- inkling2_loop
- varloop
- moe
- mlx-vlm
---
# TML-d24-varloop-research for Apple Silicon (MLX, plain 4-bit, choose the loop passes)
[thinkingmachines/TML-d24-varloop-research](https://huggingface.co/thinkingmachines/TML-d24-varloop-research) (revision `91a57fe`) for MLX on Apple Silicon, with its vision encoder and its MTP draft (`mtp.safetensors`) included.
This is Thinking Machines' variable-loop research counterpart to Inkling 2 Mini: the same 26.4B-parameter looped mixture-of-experts model, but the twelve middle layers can run any number of passes at inference, from 1 to 5 (default 3). Fewer passes are faster; more passes help long-context recall. Thinking Machines publishes it as a research artifact and recommends [Inkling 2 Mini](https://huggingface.co/netprojects/Inkling-2-Mini-MLX-4-8bit) for production use.
This is the plain 4-bit option: the routed experts (released in NVFP4 / MXFP8), attention, embeddings, the output layer and the vision attention projections are re-quantized to affine 4-bit (group 64), the same recipe as our [Inkling 2 Mini 4-bit build](https://huggingface.co/netprojects/Inkling-2-Mini-LayerFit-MLX-4bit). It is faster than the lossless [4/8-bit build](https://huggingface.co/netprojects/TML-d24-varloop-research-MLX-4-8bit). Size: 16.5 GB plus the 0.64 GB draft.
## Builds
| Build | Size | Same next token as the 4/8-bit build (3 passes) | KL | GSM8K (20 questions, 3 passes) |
|---|---|---|---|---|
| [netprojects/TML-d24-varloop-research-MLX-4-8bit](https://huggingface.co/netprojects/TML-d24-varloop-research-MLX-4-8bit) (recommended) | 19.5 GB + 0.64 GB draft | reference | – | 16/20 |
| [netprojects/TML-d24-varloop-research-MLX-4bit](https://huggingface.co/netprojects/TML-d24-varloop-research-MLX-4bit) | 16.5 GB + 0.64 GB draft | 93.2% | 0.014 | 14/20 |
## Install
Choosing the pass count needs [inkling2-mlx](https://github.com/internet-projects/inkling2-mlx) v0.2.8 (MLX-VLM plus Inkling support; stock MLX-VLM refuses variable-loop checkpoints):
```bash
pip install "git+https://github.com/internet-projects/inkling2-mlx@v0.2.8" torch torchvision
```
PyTorch and torchvision are only used on the CPU by the image processor.
## Use
Set the number of loop passes with `INKLING2_LOOP_PASSES` (any entry point), or with `loop_num_passes` in `text_config` of `config.json`. Without it the model runs 3 passes.
```bash
INKLING2_LOOP_PASSES=4 mlx_vlm.server --model netprojects/TML-d24-varloop-research-MLX-4bit --port 8000
```
```python
import os
os.environ["INKLING2_LOOP_PASSES"] = "2" # set before load
from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template
model, processor = load("netprojects/TML-d24-varloop-research-MLX-4bit")
prompt = apply_chat_template(processor, model.config, "Explain in two sentences why the sky is blue.",
reasoning_effort="low")
print(generate(model, processor, prompt, max_tokens=2048, temperature=0.0).text)
```
`reasoning_effort` is part of the chat template: `none`, `minimal`, `low`, `medium`, `high` (the default), `xhigh`, `max`, or a number from 0.0 to 0.99. Set `max_tokens`, since the model can think at length.
The MTP / DSpark draft was trained with 3 passes, so it loads only at 3 passes (the default):
```python
from mlx_vlm.speculative.drafters import load_drafter
draft, kind = load_drafter("netprojects/TML-d24-varloop-research-MLX-4bit")
print(generate(model, processor, prompt, max_tokens=2048, draft_model=draft, draft_kind=kind,
draft_block_size=3).text)
```
## Speed by pass count
MacBook Pro M5 Max (128 GB), 26 November 2026, short smoke run (two prompts, 128 tokens, greedy, reasoning `none`; indicative, not an idle-machine benchmark):
| Passes | Layer passes per token | 4/8-bit generation (tok/s) | 4-bit generation (tok/s) |
|---|---|---|---|
| 1 | 24 | 97.7 | – |
| 2 | 36 | 69.3 | 117.3 |
| 3 (default) | 48 | 51.6 | 85.5 |
| 4 | 60 | 42.2 | – |
| 5 | 72 | 35.3 | 54.2 |
## Thinking Machines' results
From the [TML-d24-varloop-research card](https://huggingface.co/thinkingmachines/TML-d24-varloop-research) (their harnesses and settings; a selection of their table):
| Benchmark (Thinking Machines' figures) | Inkling 2 Mini | 1 pass | 2 passes | 3 passes | 4 passes | 5 passes |
|---|---|---|---|---|---|---|
| SWE-bench Verified (bash only) | 79.2% | 56.3% | 76.5% | 78.7% | 79.3% | 79.6% |
| SWE-bench Pro v2 Hard | 77.9% | 39.7% | 69.1% | 78.9% | 76.0% | 78.4% |
| GPQA Diamond | 86.6% | 69.6% | 79.2% | 84.2% | 81.9% | 83.1% |
| MMMU Pro | 74.9% | 63.6% | 69.8% | 71.4% | 72.1% | 73.2% |
| OmniDocBench v1.6 | 92.8% | 86.6% | 90.5% | 92.1% | 91.8% | 92.5% |
| MRCR v2 8-needle, 256K–512K | 46.4% | 26.2% | 65.2% | 89.2% | 93.4% | 92.1% |
| MRCR v2 8-needle, 512K–1M | 37.7% | 20.6% | 49.7% | 72.3% | 81.4% | 79.9% |
| GraphWalks BFS 1M | 50.0% | 5.7% | 39.4% | 52.1% | 56.2% | 57.8% |
## What was checked
On a MacBook Pro M5 Max (128 GB), 26 November 2026, with MLX 0.32.5.
- **Loop code against Thinking Machines' code.** On a random tiny model with this architecture, inkling2-mlx matched their Transformers implementation (5.24.1) at 1, 2, 3, 4 and 5 passes, in full prompts and in cached generation (largest logit difference 3.6e-6).
- **Lossless repack.** The 4/8-bit build carries the released NVFP4 / MXFP8 expert values unchanged (the same repack as our Inkling 2 Mini 4/8-bit build). The 4-bit build gives the same next token as the 4/8-bit build at 93.2% of positions (mean KL 0.014, 3 passes).
- **GSM8K, 20 fixed test questions** (reasoning `none`, greedy): 4/8-bit 15/20 at 2 passes, 16/20 at 3 passes, 16/20 at 5 passes; 4-bit 14/20 at 3 passes.
- **Vision, tool calling and the MTP draft:** at 3 passes the 4/8-bit build named the red square and blue circle of a test image, and the bundled MTP draft loaded and generated (code prompt, block 4). At 2 passes the draft is refused, as intended.
## License and credits
Apache-2.0, as the original model. Use of the model is also governed by Thinking Machines'
[Model Acceptable Use Policy](https://thinkingmachines.ai/model-acceptable-use-policy/). `LICENSE` is the Apache-2.0
text and `NOTICE` describes the conversion. TML-d24-varloop-research is by Thinking Machines Lab; please cite their work.
Published by [NetProjects](https://netprojects.com) (Internet Projects Ltd). Not affiliated with Thinking Machines.
More MLX builds from NetProjects: [huggingface.co/netprojects](https://huggingface.co/netprojects) · [netprojects.com](https://netprojects.com)