Run this model with HF Jobs

Run moonbox-dev/flint-MLX 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/moonbox-dev/flint-MLX. 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/moonbox-dev/flint-MLX 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/moonbox-dev/flint-MLX. 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.
flint-MLX / README.md
jennyxue's picture
Model card and the original license
b5fd091 verified
|
Raw History Blame Contribute Delete
28.9 kB
---
base_model: RecursiveSI/flint
base_model_relation: quantized
license: apache-2.0
pipeline_tag: text-generation
library_name: mlx
tags:
- mlx
- moonbox
- flint
- recursive
- mixture-of-experts
- mlx-vlm
- apple-silicon
---
# Flint MLX
MLX builds of [Flint](https://huggingface.co/RecursiveSI/flint) (Recursive's 40B-A2.5B mixture-of-experts model for coding agents, with reasoning and
tool calls), made by Moonbox for Apple Silicon Macs. Each build is a folder and a complete
[mlx-vlm](https://github.com/Blaizzy/mlx-vlm) model: weights, `config.json`, Recursive's tokenizer, chat template and
generation settings. These files are not an official Recursive release.
## Files
The last column is how far each build is from the original bf16 model (see "Quality" below for what was measured).
| Precision | File | Size | sha256 | Against the original |
|---|---|---|---|---|
| 8bit | [`8bit/chat_template.jinja`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/chat_template.jinja) | 2.3 kB | `7940f4ffa327` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/config.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/config.json) | 0.2 MB | `38ffc25fa9ce` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/generation_config.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/generation_config.json) | 0.2 kB | `a499c71895e0` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/model-00001.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/model-00001.safetensors) | 4.60 GB | `742ce7b92076` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/model-00002.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/model-00002.safetensors) | 5.30 GB | `d33c27632e92` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/model-00003.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/model-00003.safetensors) | 5.30 GB | `043e4f21a7dd` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/model-00004.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/model-00004.safetensors) | 5.30 GB | `129c734424ec` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/model-00005.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/model-00005.safetensors) | 5.30 GB | `13f708c202cb` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/model-00006.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/model-00006.safetensors) | 5.30 GB | `137d2e7def5a` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/model-00007.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/model-00007.safetensors) | 5.30 GB | `f511ebbe3e8e` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/model-00008.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/model-00008.safetensors) | 5.30 GB | `05d61f558198` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/model-00009.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/model-00009.safetensors) | 883.4 MB | `fc5e6d13fef2` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/model.safetensors.index.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/model.safetensors.index.json) | 0.2 MB | `f6976804fc8c` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/tokenizer.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/tokenizer.json) | 10.9 MB | `752cbc36d07b` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 8bit | [`8bit/tokenizer_config.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/8bit/tokenizer_config.json) | 3.8 kB | `67a517504c07` | KL 0.050 nats (p95 0.074), top-1 agreement 93.51 %, perplexity 22.57 vs 22.55 |
| 6bit | [`6bit/chat_template.jinja`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/chat_template.jinja) | 2.3 kB | `7940f4ffa327` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/config.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/config.json) | 0.2 MB | `d3020be525ff` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/generation_config.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/generation_config.json) | 0.2 kB | `a499c71895e0` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/model-00001.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/model-00001.safetensors) | 2.98 GB | `02fdddbafb5b` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/model-00002.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/model-00002.safetensors) | 2.70 GB | `b25d53171906` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/model-00003.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/model-00003.safetensors) | 2.70 GB | `356ea2e3c7f9` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/model-00004.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/model-00004.safetensors) | 2.70 GB | `cef09aa872c0` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/model-00005.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/model-00005.safetensors) | 2.70 GB | `928f55dcf513` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/model-00006.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/model-00006.safetensors) | 2.70 GB | `27ee257aa12d` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/model-00007.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/model-00007.safetensors) | 2.70 GB | `cdc058dba45b` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/model-00008.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/model-00008.safetensors) | 2.70 GB | `6e53b06bd5db` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/model-00009.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/model-00009.safetensors) | 2.70 GB | `d937e116e2ea` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/model-00010.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/model-00010.safetensors) | 2.70 GB | `9d96e9481429` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/model-00011.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/model-00011.safetensors) | 2.70 GB | `086e3a02b8e1` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/model-00012.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/model-00012.safetensors) | 2.70 GB | `e6f61babe6a4` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/model.safetensors.index.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/model.safetensors.index.json) | 0.2 MB | `de356f1a4f39` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/tokenizer.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/tokenizer.json) | 10.9 MB | `752cbc36d07b` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 6bit | [`6bit/tokenizer_config.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/6bit/tokenizer_config.json) | 3.8 kB | `67a517504c07` | KL 0.077 nats (p95 0.136), top-1 agreement 90.82 %, perplexity 22.66 vs 22.55 |
| 4bit | [`4bit/chat_template.jinja`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/chat_template.jinja) | 2.3 kB | `7940f4ffa327` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/config.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/config.json) | 0.2 MB | `c6ee6a91fc54` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/generation_config.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/generation_config.json) | 0.2 kB | `a499c71895e0` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/model-00001.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/model-00001.safetensors) | 2.91 GB | `2046f81181ba` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/model-00002.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/model-00002.safetensors) | 2.88 GB | `257191192b7f` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/model-00003.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/model-00003.safetensors) | 2.88 GB | `d5e3b1efeb4a` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/model-00004.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/model-00004.safetensors) | 2.88 GB | `203c83c0ccb4` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/model-00005.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/model-00005.safetensors) | 2.88 GB | `df5319322f5a` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/model-00006.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/model-00006.safetensors) | 2.88 GB | `1efade4911c7` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/model-00007.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/model-00007.safetensors) | 2.88 GB | `e44abdc98801` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/model-00008.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/model-00008.safetensors) | 2.88 GB | `b46144c6c1af` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/model-00009.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/model-00009.safetensors) | 480.8 MB | `2c73196c918f` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/model.safetensors.index.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/model.safetensors.index.json) | 0.2 MB | `f07aef0f88c2` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/tokenizer.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/tokenizer.json) | 10.9 MB | `752cbc36d07b` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 4bit | [`4bit/tokenizer_config.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/4bit/tokenizer_config.json) | 3.8 kB | `67a517504c07` | KL 0.120 nats (p95 0.294), top-1 agreement 87.34 %, perplexity 22.88 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 3bit | [`3bit/chat_template.jinja`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/3bit/chat_template.jinja) | 2.3 kB | `7940f4ffa327` | KL 0.272 nats (p95 0.783), top-1 agreement 80.25 %, perplexity 22.50 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 3bit | [`3bit/config.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/3bit/config.json) | 0.2 MB | `1ee6b07aaed6` | KL 0.272 nats (p95 0.783), top-1 agreement 80.25 %, perplexity 22.50 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 3bit | [`3bit/generation_config.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/3bit/generation_config.json) | 0.2 kB | `a499c71895e0` | KL 0.272 nats (p95 0.783), top-1 agreement 80.25 %, perplexity 22.50 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 3bit | [`3bit/model-00001.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/3bit/model-00001.safetensors) | 2.83 GB | `5403437fe28a` | KL 0.272 nats (p95 0.783), top-1 agreement 80.25 %, perplexity 22.50 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 3bit | [`3bit/model-00002.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/3bit/model-00002.safetensors) | 2.84 GB | `e4accbbbbc5d` | KL 0.272 nats (p95 0.783), top-1 agreement 80.25 %, perplexity 22.50 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 3bit | [`3bit/model-00003.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/3bit/model-00003.safetensors) | 2.84 GB | `3a05336c4e9c` | KL 0.272 nats (p95 0.783), top-1 agreement 80.25 %, perplexity 22.50 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 3bit | [`3bit/model-00004.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/3bit/model-00004.safetensors) | 2.84 GB | `6a07e5b69860` | KL 0.272 nats (p95 0.783), top-1 agreement 80.25 %, perplexity 22.50 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 3bit | [`3bit/model-00005.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/3bit/model-00005.safetensors) | 2.84 GB | `06c5d5720ca4` | KL 0.272 nats (p95 0.783), top-1 agreement 80.25 %, perplexity 22.50 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 3bit | [`3bit/model-00006.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/3bit/model-00006.safetensors) | 2.84 GB | `11c752a9a279` | KL 0.272 nats (p95 0.783), top-1 agreement 80.25 %, perplexity 22.50 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 3bit | [`3bit/model-00007.safetensors`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/3bit/model-00007.safetensors) | 355.0 MB | `d7468937fcc3` | KL 0.272 nats (p95 0.783), top-1 agreement 80.25 %, perplexity 22.50 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 3bit | [`3bit/model.safetensors.index.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/3bit/model.safetensors.index.json) | 0.2 MB | `c310e295f0b8` | KL 0.272 nats (p95 0.783), top-1 agreement 80.25 %, perplexity 22.50 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 3bit | [`3bit/tokenizer.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/3bit/tokenizer.json) | 10.9 MB | `752cbc36d07b` | KL 0.272 nats (p95 0.783), top-1 agreement 80.25 %, perplexity 22.50 vs 22.55 (dynamic; experimental: under the 90 % mark) |
| 3bit | [`3bit/tokenizer_config.json`](https://huggingface.co/moonbox-dev/flint-MLX/blob/main/3bit/tokenizer_config.json) | 3.8 kB | `67a517504c07` | KL 0.272 nats (p95 0.783), top-1 agreement 80.25 %, perplexity 22.50 vs 22.55 (dynamic; experimental: under the 90 % mark) |
Flint (Recursive's 40B-A2.5B mixture of experts for coding agents: 256 routed experts and a shared one, 6 at work for
each token; sliding-window and full attention with learned sinks) converted to MLX for Apple Silicon, in four builds.
Each folder is a complete mlx-vlm model: weights, `config.json`, Recursive's tokenizer, chat template and generation
settings. Text only.
These files were converted by Moonbox from [RecursiveSI/flint](https://huggingface.co/RecursiveSI/flint) (revision
`2a247be0`). They are not an official Recursive release; Recursive publishes its own Apple Silicon build,
[RecursiveSI/flint-int4](https://huggingface.co/RecursiveSI/flint-int4) (measured below).
## How to run
With [mlx-vlm](https://github.com/Blaizzy/mlx-vlm) 0.8.0 or later:
```python
from huggingface_hub import snapshot_download
from mlx_vlm import load, generate
folder = snapshot_download("moonbox-dev/flint-MLX", allow_patterns="3bit/*") + "/3bit"
model, processor = load(folder)
msgs = [{"role": "user", "content": "Write a Python function that merges overlapping intervals."}]
prompt = processor.tokenizer.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
print(generate(model, processor, prompt, max_tokens=4096, temperature=1.0, top_p=0.95, top_k=20).text)
```
- **Chat template.** No BOS; `<|system|>`, `<|developer|>`, `<|user|>`, `<|assistant|>` turns with no newlines; tools
in a `<|system|>` turn of their own after the leading system message. Message content must be a string (the
template renders a list of parts as its Python repr): join parts into text first. There is no thinking switch: the
model opens `<think>` itself when it wants to reason, and `enable_thinking` changes nothing. Tool calls are
`<tool_call>name<arg_key>key</arg_key><arg_value>value</arg_value>...</tool_call>` (strings as they are, other
values as JSON); a tool's result goes back as `<|observation|><tool_response>...</tool_response>`. Generation stops
at `<|end_of_text|>`, `<|user|>`, `<|observation|>` or `<|developer|>` (all in `generation_config.json`). Keep each
turn's reasoning (`reasoning_content`) when sending a conversation back: the template renders it. Recursive's
sampling: temperature 1.0, top_p 0.95, top_k 20.
- **The router and the output head stay bfloat16** in the 8, 6 and 4-bit builds; the 3-bit's head is 8-bit (it
measured the same as bfloat16 there, for 0.3 GB less).
| Build | Size | Runs on | Layout |
|---|---|---|---|
| `8bit` | 42.6 GB | 96 GB Macs and up (64 GB: slow) | 8 bits, group 64; router and head bfloat16 |
| `6bit` | 32.7 GB | 64 GB Macs and up (48 GB: slow) | 6 bits, group 64; router and head bfloat16 |
| `4bit` | 23.6 GB | 48 GB Macs and up (32 GB: slow) | dynamic, experimental: attention, the shared expert and layers 0-1's dense MLP 8 bits, the embedding 6, the routed experts 4; router and head bfloat16 |
| `3bit` | 17.4 GB | 32 GB Macs and up (24 GB: slow, other apps squeezed) | dynamic, experimental: attention, shared expert, dense MLP and head 8 bits, the embedding 6, the routed experts 3 in groups of 128 with MSE-fitted ranges; router bfloat16 |
- **Memory and speed** on a 24 GB MacBook Air (M5), through Moonbox's server (greedy; a short answer, 512- and
4K-token prompts; flint thinks before most answers, which counts as decoding). Only the `3bit` runs on this Mac; the
others' numbers are estimates (memory: the weights plus what the 3-bit holds besides them; decode: scaled by the
bytes a token reads).
| Build | Peak | Decode (short / after 4K) | Prefill 4K |
|---|---|---|---|
| `8bit` | 43.3 GB (estimated) | ~35 tok/s (estimated, this Mac's bandwidth) | |
| `6bit` | 33.4 GB (estimated) | ~43 tok/s (estimated) | |
| `4bit` | 24.3 GB (estimated) | ~41 tok/s (estimated) | |
| `3bit` | 18.1 GB | 49.3 / 45.9 tok/s | 905 tok/s |
## Quality
MLX affine quantization; against the bf16 original (perplexity 22.55), teacher-forced through mlx-vlm's own layers
one layer at a time, on 16,368 positions of English prose, Python and chat transcripts in the model's own template.
The mark this lab uses is top-1 90 % (KL 0.01 ideal). Flint moves further from the original than the dense models
and GLM-4.7-Flash at every width: 256 sigmoid-routed experts with 6 chosen per token make many near-tied choices,
which small changes flip. The 8 and 6-bit clear the top-1 mark; no 4 or 3-bit layout measured does, so those two are
experimental.
| Build | Mean KL (nats) | KL p95 | Top-1 agreement | Perplexity |
|---|---|---|---|---|
| `8bit` | 0.050 | 0.074 | 93.51 % | 22.57 |
| `6bit` | 0.077 | 0.136 | 90.82 % | 22.66 |
| `4bit` (experimental) | 0.120 | 0.294 | 87.34 % | 22.88 |
| `3bit` (experimental) | 0.272 | 0.783 | 80.25 % | 22.50 |
| [RecursiveSI/flint-int4](https://huggingface.co/RecursiveSI/flint-int4) (22.6 GB, read from its files) | 0.221 | 0.590 | 82.33 % | 22.61 |
Measured the same way: a plain 4-bit (every layer 4 bits, router included, 22.4 GB) at KL 0.97 and top-1 59.6 %, and
plain 3-bit at 33.6 %; Recursive's int4 layout (everything 4 bits, the embedding 8, router bfloat16) quantized here
by rounding to nearest at 60.1 %, with MSE-fitted ranges at 63.7 % (Recursive's own scale fitting does far better,
82.3 %); a 4-bit with the experts' down projections at 5 bits (25.2 GB) 88.7 %, with the experts in groups of 32
(26.0 GB) 88.1 %; 3-bit layouts of 16.9-18.1 GB at 77.7-80.3 %. The 8-bit with the head and router at 8 bits too:
92.69 %. MSE-fitted ranges gave the 3-bit 1.3 points and the 4 and 6-bit nothing.
## How these were made
From [Flint](https://huggingface.co/RecursiveSI/flint) at revision `2a247be0c0`, read from the Hub tensor by tensor, by Moonbox's converter
(`lab/zoo/flint/convert.py` in Moonbox's repository): mlx-vlm's own sanitize and layout (each layer's 256 experts
stacked, the learned attention sinks kept bfloat16), MLX affine quantization. The router and the output head stay
bfloat16 in every build. Each build was checked against the original before upload (teacher-forced, layer by layer
through mlx-vlm's own layers); the `sha256` column above is what the files must hash to.
## License
Apache-2.0, as Recursive's LICENSE file (copied here) and model card declare. These files are a derivative of the
original model: its weights were converted and quantized as described above. The original model card follows
unchanged.
---
# Original model card
<p align="center">
<img src="assets/flint-logo.png" width="160" alt="Flint logo">
</p>
<h1 align="center">Recursive Flint</h1>
<p align="center">
<a href="https://www.recursive.com/updates/introducing-recursive-flint">Blog</a> |
<a href="https://huggingface.co/RecursiveSI">Hugging Face</a> |
<a href="https://github.com/recursive-oss/rec">Local engine</a> |
<a href="https://docs.recursive.com/getting-started">Documentation</a>
</p>
Flint is Recursive’s mixture-of-experts language model for coding agents, with 39.8 billion total parameters and approximately 2.5 billion active per token. It is designed to investigate codebases, fix bugs, implement features, and write tests.
Flint supports text input and output, reasoning, and multi-turn tool use. In our release evaluations, it scores 54.9% on Terminal-Bench 2.1, 89.7% on SWE-bench Pro v2, and 74.2% on SWE-bench Verified.
This repository contains the BF16 checkpoint, model configuration, tokenizer, chat template, and an SGLang serving kit. Quantized variants are prepared separately for NVIDIA and Apple Silicon runtimes.
## Evaluation
![Flint benchmark performance: BF16 and NVFP4 checkpoints compared with local models that run on similar hardware](assets/flint_benchmarks_nvfp4.png)
Flint results use temperature 1.0, top-p 0.95, and top-k 20. Terminal-Bench uses Terminus 2; SWE-bench uses mini-swe-agent. Agentic scores report average pass@1 over at least five attempts. † marks scores measured by Recursive; other comparison scores are developer-reported.
Evaluation setups vary across sources. Flint’s Terminal-Bench score counts solutions obtained through web retrieval as unsuccessful; developer-reported scores may not apply the same adjustment.
## Model specifications
| Property | Flint |
| :---- | :---- |
| Developer | Recursive |
| Architecture | Decoder-only mixture-of-experts Transformer |
| Total parameters | 39.8B |
| Active parameters per token | Approximately 2.5B, including the output head¹ |
| Layers | 49: 2 dense layers followed by 47 MoE layers |
| Attention | 35 sliding-window layers and 14 full-attention layers |
| Sliding window | 513 tokens: the current token and 512 preceding tokens |
| Attention heads | 32 query heads and 4 key/value heads; head dimension 128 |
| Attention normalization | Per-head QK RMSNorm and learned per-head attention sinks |
| Position encoding | RoPE on sliding-window layers; no positional encoding on full-attention layers |
| Experts per MoE layer | 256 routed experts, with 6 selected per token, plus an always-active shared expert |
| Documented context configuration | 262,144 tokens, including prompt and generated output |
| Vocabulary | 150,144 tokens |
| Input / output | Text / text |
| Stated knowledge cutoff | June 2026 |
¹ The active-parameter convention includes the output head and excludes the full input embedding matrix. The active body alone is approximately 2.2B parameters. “40B-A2.5B” is the rounded model-size designation.
## Getting started
Flint runs on one B300 or H200 GPU per replica with the SGLang kit in `sglang/`. Transformers modeling code is not included yet.
```bash
pip install -U huggingface_hub openai
hf download RecursiveSI/flint --local-dir flint && cd flint # about 80 GB
docker build -t flint-sglang sglang
docker run -d --name flint --gpus '"device=0"' --ipc=host -p 127.0.0.1:30000:30000 \
-v "$PWD:/model" -e MODEL=/model flint-sglang bash /model/sglang/serve_b300.sh # H200: serve_h200.sh
until curl -sf localhost:30000/health_generate >/dev/null; do sleep 15; done # progress: docker logs -f flint
python3 sglang/example_client.py --base-url http://localhost:30000/v1 # reasoning and a tool call
```
```python
from openai import OpenAI
client = OpenAI(base_url="http://localhost:30000/v1", api_key="unused")
response = client.chat.completions.create(
model="flint",
messages=[{"role": "user", "content": "Write a Python function that merges overlapping intervals."}],
max_tokens=32768,
)
print(response.choices[0].message.content)
```
[`sglang/README.md`](sglang/README.md) covers requirements, serve-script options, multi-GPU deployments, and API details.
### Recommended generation settings
| Setting | Value |
| :---- | :---- |
| Temperature | 1.0 |
| Top-p / top-k | 0.95 / 20 |
| Output budget for hard problems | At least 32768 tokens, including reasoning |
The server applies these sampling settings when a request omits them. Flint supports OpenAI-compatible tool calls. Use the checkpoint’s chat template and preserve returned `reasoning_content` in conversation history. Prompt and output share the context window.
## Training
Flint was trained from scratch through pretraining, mid-training, supervised fine-tuning, and reinforcement learning. Training includes text and code, instruction following, and agentic tasks.
## Limitations and responsible use
Flint’s supervised fine-tuning included safety-oriented examples, but the model can still produce incorrect or harmful content, faulty code, or inappropriate tool calls. Test generated code and review consequential changes before applying them. Tool-using applications should enforce their own permissions and execution boundaries; structured tool-call grammar does not prevent the model from choosing an unsafe or incorrect action.
Long reasoning can increase latency and exhaust the output budget before an answer is complete. The context configuration is a capacity limit, not a guarantee of uniform accuracy across all sequence lengths or tasks. Results can vary with checkpoint precision and inference runtime; evaluate the specific checkpoint and runtime you intend to deploy.
## License and reporting
Flint is released under the [Apache 2.0 license](LICENSE). Hosted API terms and data practices are separate from the weight license.
For model and serving issues, contact support@recursive.com and include the checkpoint revision, runtime version, hardware, launch command, and a minimal reproduction. Report safety concerns or suspected misuse to safety@recursive.com, and security vulnerabilities to security@recursive.com.