返回资讯中心
外部精选
软件工程
#开发者实时流

Black Forest Labs 发布 80 亿参数语言流模型 flung-8B

来源标题:Black-forest-labs/flung-8B language flow transformer

Black Forest Labs 在 Hugging Face 上发布 80 亿参数模型 flung-8B,采用语言流(language-flow)架构,可用于文本生成与特征提取。该模型以 cc-by-nc-4.0 许可开放,并支持通过 HF Jobs 在 Hugging Face 托管算力上运行、监控和取回结果。

Hacker News 最新trentor2026/12/4 · 今天30 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Like 9

Follow

Black Forest Labs 44.8k

Text Generation

Transformers

Safetensors

English

flung

feature-extraction

language-flow

conversational

custom_code

arxiv: 2612.06003

License: cc-by-nc-4.0

Model card Files Files and versions xet

Community

More actions

Deploy

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:

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.

Copy to bucket

Use this model 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 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 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 Key features

Usage

Training

Evaluation

Intended use and limitations

License and attribution

Citation

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.

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.

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 -

","unk_token":null,"pad_token":"<|endoftext|>","chat_template":"{%- if tools %}\n {{- '<|im_start|>system\n' }}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\n\n' }}\n {%- endif %}\n {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}\n {%- for tool in tools %}\n {{- "\n" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == "user" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}\n {%- elif message.role == "assistant" %}\n {%- set content = message.content %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is defined and message.reasoning_content is not none %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in message.content %}\n {%- set content = message.content.split('</think>')[-1].lstrip('\n') %}\n {%- set reasoning_content = message.content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}\n {%- endif %}\n {%- endif %}\n {%- if loop.index0 > ns.last_query_index %}\n {%- if loop.last or (not loop.last and reasoning_content) %}\n {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\n' + content }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\n' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\n{"name": "' }}\n {{- tool_call.name }}\n {{- '", "arguments": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\n' }}\n {%- elif message.role == "tool" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\n<tool_response>\n' }}\n {{- message.content }}\n {{- '\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}\n {{- '<|im_end|>\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\n\n</think>\n\n' }}\n {%- endif %}\n{%- endif %}"}},"createdAt":"2026-12-04T09:17:50.000Z","discussionsDisabled":false,"discussionsSorting":"recently-created","downloads":0,"downloadsAllTime":0,"id":"black-forest-labs/flung-8b","isLikedByUser":false,"availableInferenceProviders":[],"showH

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →