Run this model with HF Jobs
Run black-forest-labs/flung-8b 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 and TRL to fine-tune https://huggingface.co/black-forest-labs/flung-8b. 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/black-forest-labs/flung-8b 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/black-forest-labs/flung-8b. 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.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/black-forest-labs/flung-8b. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use black-forest-labs/flung-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use black-forest-labs/flung-8b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="black-forest-labs/flung-8b", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("black-forest-labs/flung-8b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use black-forest-labs/flung-8b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "black-forest-labs/flung-8b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "black-forest-labs/flung-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/black-forest-labs/flung-8b
- SGLang
How to use black-forest-labs/flung-8b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "black-forest-labs/flung-8b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "black-forest-labs/flung-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "black-forest-labs/flung-8b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "black-forest-labs/flung-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use black-forest-labs/flung-8b with Docker Model Runner:
docker model run hf.co/black-forest-labs/flung-8b
FLUNG 8B
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
- A flow model that works as a general-purpose language model at 8B scale, trained from scratch on open-source data only.
- 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.
- 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.
- Pre-training: ~0.82T tokens (web, code, math).
- Mid-training: 200B tokens (higher-quality web, code and math, plus instruction data).
- Supervised fine-tuning: 4.7B tokens (code, math, instruction following, chat, science, safety).
- Distillation: guidance distillation, then flow-map step distillation, so the model samples in 32-64 steps per 128-token block.
- 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
- 223
