-
Notifications
You must be signed in to change notification settings - Fork 368
Add inclusionAI/Ling-3.0-flash-FP8 recipe #756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zexplorerhj
wants to merge
3
commits into
vllm-project:main
Choose a base branch
from
zexplorerhj:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+140
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| meta: | ||
| title: "Ling-3.0-flash-FP8" | ||
| slug: "ling-3-0-flash-fp8" | ||
| provider: "inclusionAI" | ||
| description: "Ling-3.0-flash MoE model with serialized block-FP8 weights and native MTP" | ||
| date_added: 2026-08-06 | ||
| date_updated: 2026-08-06 | ||
| difficulty: advanced | ||
| tasks: | ||
| - text | ||
| performance_headline: "Defaults to TP2 on NVIDIA H200; TP4+EP, Triton MoE, MTP, and CUDA graphs are also validated" | ||
| related_recipes: | ||
| - inclusionAI/Ling-3.0-flash | ||
| hardware: | ||
| h200: verified | ||
|
|
||
| model: | ||
| model_id: "inclusionAI/Ling-3.0-flash-fp8" | ||
| min_vllm_version: "0.26.0" | ||
| nightly_required: true | ||
| architecture: moe | ||
| parameter_count: "124B" | ||
| active_parameters: "5.5B" | ||
| context_length: 262144 | ||
| base_args: | ||
| - "--trust-remote-code" | ||
| - "--dtype" | ||
| - "bfloat16" | ||
| - "--gpu-memory-utilization" | ||
| - "0.9" | ||
| - "--compilation-config" | ||
| - '{"cudagraph_mode":"FULL_AND_PIECEWISE"}' | ||
| - "--enable-prefix-caching" | ||
| base_env: {} | ||
|
|
||
| features: | ||
| tool_calling: | ||
| description: "Enable Ling 3 automatic tool calling" | ||
| args: | ||
| - "--enable-auto-tool-choice" | ||
| - "--tool-call-parser" | ||
| - "ling3" | ||
| reasoning: | ||
| description: "Split Ling 3 thinking traces into reasoning_content" | ||
| args: | ||
| - "--reasoning-parser" | ||
| - "ling3" | ||
| spec_decoding: | ||
| description: "Use the model's native MTP head with three speculative tokens" | ||
| args: | ||
| - "--speculative-config" | ||
| - '{"method":"mtp","num_speculative_tokens":3}' | ||
|
|
||
| opt_in_features: | ||
| - spec_decoding | ||
|
|
||
| variants: | ||
| default: | ||
| precision: fp8 | ||
| vram_minimum_gb: 150 | ||
| description: "Serialized block-FP8 checkpoint; defaults to TP=2 on NVIDIA H200" | ||
|
|
||
| compatible_strategies: | ||
| - single_node_tp | ||
|
|
||
| hardware_overrides: {} | ||
|
|
||
| strategy_overrides: | ||
| single_node_tp: | ||
| tp: 2 | ||
|
|
||
| guide: | | ||
| ## Overview | ||
|
|
||
| `inclusionAI/Ling-3.0-flash-FP8` is the serialized block-FP8 checkpoint of | ||
| Ling-3.0-flash. It uses the `BailingMoeV3ForCausalLM` architecture with a | ||
| hybrid MLA/KDA attention stack, 512 routed experts (8 active per token), one | ||
| shared expert, and a native multi-token prediction head. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - **vLLM:** 0.26.0 or newer with Ling 3 block-FP8 support | ||
| - **Validated hardware:** 2x NVIDIA H200 (default); 4x H200 with expert parallelism is also supported | ||
| - **Weights:** serialized block FP8 | ||
| - **Compute dtype:** BF16 | ||
| - **Context length:** 131,072 tokens | ||
|
|
||
| ## Launching the Server | ||
|
|
||
| ```bash | ||
| vllm serve inclusionAI/Ling-3.0-flash-fp8 \ | ||
| --trust-remote-code \ | ||
| --dtype bfloat16 \ | ||
| --tensor-parallel-size 2 \ | ||
| --gpu-memory-utilization 0.9 \ | ||
| --compilation-config '{"cudagraph_mode":"FULL_AND_PIECEWISE"}' \ | ||
| --enable-prefix-caching \ | ||
| --enable-auto-tool-choice \ | ||
| --tool-call-parser ling3 \ | ||
| --reasoning-parser ling3 | ||
| ``` | ||
|
|
||
| The validated configuration keeps CUDA graphs enabled; `--enforce-eager` is | ||
| not required. | ||
|
|
||
| To use TP4 with expert parallelism instead, set | ||
| `--tensor-parallel-size 4` and add `--enable-expert-parallel`. | ||
|
|
||
| To enable the native MTP head, add: | ||
|
|
||
| ```bash | ||
| --speculative-config '{"method":"mtp","num_speculative_tokens":3}' | ||
| ``` | ||
|
|
||
| ## Thinking Mode | ||
|
|
||
| Thinking is selected per request through the chat template: | ||
|
|
||
| ```python | ||
| from openai import OpenAI | ||
|
|
||
| client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY") | ||
| response = client.chat.completions.create( | ||
| model="inclusionAI/Ling-3.0-flash-fp8", | ||
| messages=[{"role": "user", "content": "Solve the problem step by step."}], | ||
| temperature=0.0, | ||
| max_tokens=128000, | ||
| extra_body={"chat_template_kwargs": {"enable_thinking": True}}, | ||
| ) | ||
| print(response.choices[0].message.reasoning_content) | ||
| print(response.choices[0].message.content) | ||
| ``` | ||
|
|
||
| ## Validation | ||
|
|
||
| Both the default TP2 path and the TP4+EP path were validated on H200. | ||
|
|
||
| ## References | ||
|
|
||
| - [Ling-3.0-flash-FP8 on Hugging Face](https://huggingface.co/inclusionAI/Ling-3.0-flash-fp8) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.