Run this model with HF Jobs

Run Xylolabs/flung-8b-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/Xylolabs/flung-8b-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/Xylolabs/flung-8b-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/Xylolabs/flung-8b-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.
Xylolabs

flung-8b-MLX-4bit

Calibrated MLX 4-bit build of black-forest-labs/flung-8b (@38e2406e4850) with a standalone flung_mlx.py runtime and CLI. The identically zero flow_velocity_head (12.85 M parameters, unused at T_MIN = 0.01) is omitted; flung_mlx.py returns exact zeros if return_flow=True is requested.

How to run

Requires mlx >= 0.30, transformers >= 4.57, and numpy (no mlx-lm required).

pip install -U mlx transformers numpy huggingface_hub
hf download Xylolabs/flung-8b-MLX-4bit --local-dir flung-8b-MLX-4bit
python flung-8b-MLX-4bit/flung_mlx.py --model flung-8b-MLX-4bit --prompt "A train leaves at 9:40 and arrives at 13:15. How long is the trip in minutes?"

Start an interactive multi-turn session with --chat:

python flung-8b-MLX-4bit/flung_mlx.py --model flung-8b-MLX-4bit --chat --steps 64 --stable-stop 4

Which file for your hardware

Repo Size Bits / weight Memory guidance
Xylolabs/flung-8b-MLX-8bit 9.61 GB (8.95 GiB) 8.51 16 GB+ unified memory; minimal quantization loss
Xylolabs/flung-8b-MLX-6bit 7.64 GB (7.12 GiB) 6.77 12 GB+ unified memory; near-8-bit quality in 7.64 GB
Xylolabs/flung-8b-MLX-4bit 6.16 GB (5.74 GiB) 5.46 8 GB+ unified memory; compact mixed-precision build
Xylolabs/flung-8b-MLX-3bit 4.69 GB (4.36 GiB) 4.15 below 4.5 bits per weight: for memory-limited use

Accuracy

Tensor-class precision

Tensor class Precision (group_size=64) Method
embed_table 8-bit affine (g64, unit-sphere normalized) GPU L2-MSE clip + 2-step ALS
output_head.proj 8-bit affine (g64) Full-H 2-pass OBS + Gauss-Seidel refit
self_cond_proj 8-bit affine (g64) Full-H 2-pass OBS + Gauss-Seidel refit
blocks.0..33 (mod1.lin, mod2.lin) 4-bit affine (g64) Sequential Full-H 2-pass OBS + Gauss-Seidel refit
blocks.0..33 (attn.proj, mlp.2, attn.qkv, mlp.0) 4-bit affine (g64, 72 mats) + 6-bit affine (g64, 64 highest-sensitivity mats: 20 attn.proj, 26 mlp.2, 14 attn.qkv, 4 mlp.0) Lagrangian Hessian-sensitivity promotion + Sequential Full-H 2-pass OBS + Gauss-Seidel refit
time_embed, ref_time_embed, QK-RMSNorm, biases BF16 Lossless
flow_velocity_head Omitted (identically zero in upstream) Exact zero output in flung_mlx.py

Denoising quality

Release Size bpw WikiText-2 KL top-1 x0 cos Chat KL Held-out KL 11-item answers
Xylolabs/flung-8b-MLX-8bit 9.61 GB 8.51 0.003142 96.63% 0.99907 0.004276 0.004126 11/11
Xylolabs/flung-8b-MLX-6bit 7.64 GB 6.77 0.005823 96.14% 0.99894 0.004894 0.005827 11/11
Xylolabs/flung-8b-MLX-4bit 6.16 GB 5.46 0.014336 93.07% 0.99530 0.013944 0.012556 11/11
Xylolabs/flung-8b-MLX-3bit (below 4.5 bits per weight: for memory-limited use) 4.69 GB 4.15 0.071349 82.76% 0.97743 0.085370 0.068492 11/11

Full comparison with stock MLX round-to-nearest baselines: BENCHMARKS.md and accuracy-by-size.csv.

Mean denoising logit KL by weight size Top-1 agreement by weight size

License and notices

Model weights and architecture follow cc-by-nc-4.0 (LICENSE included verbatim from black-forest-labs/flung-8b@38e2406e4850). Qwen3 tokenizer files are redistributed unmodified under Apache-2.0 (NOTICE_TOKENIZER).

Updates

  • 2026-12-05: Upgraded 4-bit scales/biases and norms with end-to-end full-vocab KL alignment (WikiText-2 KL 0.016044 -> 0.014336, 11.5x lower than RTN) and refreshed 4-tier benchmarks/charts.
  • 2026-12-05: Initial calibrated MLX 4-bit release with bundled flung_mlx.py runtime, benchmarks, CSV, and dark charts.

FLUNG 8B

FLUNG 8B answering a train-schedule question, two 128-token blocks

FLUNG is our first step into language modeling. It brings the flow models behind FLUX to text: instead of writing one token at a time, FLUNG drafts 128 tokens at once as noise and refines all of them in parallel, decoding up to 6.5 tokens per forward pass.

FLUNG 8B is a 7.9B parameter (9.0B including embeddings) language flow transformer, trained with variational flow matching on about 1T tokens of open-source data and post-trained for chat. It is competitive with open-source discrete diffusion models on math, code and instruction following, and runs on a single GPU.

Released as a research artifact under CC BY-NC 4.0 with the paper Towards Training Your Language Flow Model from Scratch (Abdessaied et al., Black Forest Labs, 2026). It is not intended for commercial use or production deployment.

Key features

  1. A flow model that works as a general-purpose language model at 8B scale, trained from scratch on open-source data only.
  2. Parallel decoding: 4.8 tokens per forward pass with the default sampler and 6.5 at 32 steps with early stop, within 2 points of full 64-step denoising on every benchmark below.
  3. Weights released for non-commercial research under CC BY-NC 4.0.

Usage

Requires torch and transformers (tested with 4.57.6).

import torch
from transformers import AutoModel, AutoTokenizer

repo = "black-forest-labs/flung-8b"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModel.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16).to("cuda").eval()

messages = [{"role": "user", "content": "A train leaves at 9:40 and arrives at 13:15. How long is the trip in minutes?"}]
out = model.generate_chat(messages, tokenizer)  # 64 steps per 128-token block, early stop n=4
print(out["text"])

# Sampling settings can also be overridden per call.
fast = model.generate_chat(messages, tokenizer, steps=32, stable_stop=0, max_new_tokens=512, seed=1973)

Training

About 1T tokens in total, from open-source datasets only.

  1. Pre-training: ~0.82T tokens (web, code, math).
  2. Mid-training: 200B tokens (higher-quality web, code and math, plus instruction data).
  3. Supervised fine-tuning: 4.7B tokens (code, math, instruction following, chat, science, safety).
  4. Distillation: guidance distillation, then flow-map step distillation, so the model samples in 32-64 steps per 128-token block.
  5. Preference tuning: offline DPO, then online GRPO with rewards from unit tests, reference answers, constraint checkers and an LLM judge.

Main data sources: Nemotron-CC, Nemotron pre-training code and math, FinePDFs-Edu, FineMath, Dolma 3 Dolmino, OpenMathInstruct-2, OpenCodeInstruct, Nemotron post-training sets, Tülu 3 and SmolTalk. The full list of datasets, with mixture weights and licenses, is in the paper's data appendix. No training data is redistributed with this model.

Evaluation

Zero-shot generative benchmarks from the paper (mean of 3 seeds; MT-Bench judged by GPT-4.1). Early stop (ES) stops denoising a block once its argmax readout has not changed for 4 consecutive steps; ES rows are in green. HE = HumanEval.

Steps tok/fwd Math Code Alignment
GSM8K MATH HE HE+ MBPP MBPP+ IFEval MT-Bench
64 + ES (default) 4.8 87.9 50.5 70.7 65.7 56.5 60.8 76.0 5.68
64 2 88.9 51.0 71.7 67.1 57.7 62.7 76.3 5.78
32 + ES 6.5 88.5 49.7 70.3 65.7 56.1 61.9 75.6 5.71
32 4 89.1 50.3 70.5 65.9 56.8 62.5 76.1 5.64

Sampler for all rows: temperature 0.3, top-p 0.9. See the paper for baselines and evaluation details.

Intended use and limitations

  • Intended use: non-commercial research on language flow models and non-autoregressive generation.
  • Out of scope: commercial use, production deployment, and any use where incorrect or harmful output can cause harm without human review.
  • Accuracy: like other language models of this size, FLUNG can produce plausible but incorrect statements, code and reasoning.
  • Language: trained mostly on English text and code; other languages are not evaluated.

License and attribution

  • Weights and code: CC BY-NC 4.0 (see LICENSE).
  • Tokenizer files: Qwen3 tokenizer, Apache 2.0 (see NOTICE_TOKENIZER).
  • Training datasets are credited in the paper's data appendix.

Citation

@article{abdessaied2026flung,
  title   = {Towards Training Your Language Flow Model from Scratch},
  author  = {Abdessaied, Adnen and Addanki, Ravichandra and Sauer, Axel and Podell, Dustin and Rombach, Robin},
  journal = {arXiv preprint arXiv:2612.06003},
  year    = {2026}
}
Downloads last month
-
Safetensors
Model size
9B params
Tensor type
U32
·
BF16
·
MLX
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Xylolabs/flung-8b-MLX-4bit

Quantized
(5)
this model

Collections including Xylolabs/flung-8b-MLX-4bit

Paper for Xylolabs/flung-8b-MLX-4bit