跳到正文
实时
蚂蚁 inclusionAI · Hugging Face 新模型·· 3 天前

inclusionAI/Qwen3.8-27B-UBTree 发布:加速 Qwen3.8-27B 的并行树形草稿网络模型

inclusionAI/Qwen3.8-27B-UBTree

要点速览

inclusionAI/Qwen3.8-27B-UBTree-B16模型通过五层并行草稿网络和可训练双字选择器加速Qwen3.8-27B,生成候选token后由选择器构建树形结构,再由Qwen3.8-27B检查续写。该模型需与目标模型Qwen3.8-27B一起加载以提供完整功能,参数量1.842B,在六项数据集上与DFlash2相比TPS提升27.7%。

正文

Website · Paper · Code · Target model

Qwen3.8-27B-UBTree-B16 accelerates Qwen3.8-27B with a five-layer parallel draft network and a trainable bigram selector. The draft produces candidate tokens, the selector connects them into a tree, and Qwen3.8-27B checks the proposed continuations.

Load this checkpoint together with its target model, which supplies the tokenizer, token embeddings, and language-model head. The draft alone does not provide a text-generation service. This model card covers text inference.

How UBTree works

UBTree architecture and training pipeline

UBTree pipeline

UBTree uses unigram predictions to propose tokens and bigram scores to choose branches:

  1. Predict candidates for several future positions in one parallel draft pass.
  2. Estimate how well neighbouring candidates fit together with the selector.
  3. Assemble a candidate tree up to the requested node budget.
  4. Run target verification and append the accepted tokens to the output.

The draft backbone starts from DFlash training, then learns jointly with the selector. Method details and tree-native supervision are described in the paper.

Model specifications

Item Value
Target model Qwen/Qwen3.8-27B
Draft architecture Qwen3UBTreeModel
Draft backbone 5 full-attention Transformer layers
Parameters stored in this checkpoint 1,841,887,774 (1.842B)
Weight dtype BF16
Hidden size 5,120
Attention heads / KV heads 24 / 4
Target auxiliary feature layers (zero-based) 5, 19, 33, 47, 61
Draft block size 16, including the anchor
Candidate top-k 64 per draft position
Default verification tree budget 64 non-root nodes + 1 anchor
Serving tree budget below 32 nodes, including the anchor
Training DFlash warm start, followed by joint backbone and selector training

The distributed weights are the raw step 12,314 checkpoint. Its parameter count excludes the embeddings and output head loaded from the target. B16 specifies the draft block size; the serving tree budget is configured separately. The serving profile overrides the checkpoint's 65-node default with a 32-node tree.

Serving with SGLang

Install the inference component from the UBTree project in a dedicated environment:

git clone https://github.com/inclusionAI/ubtree.git
cd ubtree
python3.12 -m venv .venv-inference
source .venv-inference/bin/activate
python -m pip install --upgrade pip
python scripts/install.py inference

Use the bundled SGLang source, pinned to commit 329c30b65946a51c46c60bb197419cbf3c44ecf6 of xiaoqiu/ubtree_qwen38_recent. The installation guide lists CUDA, build-tool, and dependency requirements.

Point the launcher at your downloaded target and draft folders:

CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \
python scripts/serve.py qwen38-27b \
  --target-model-path /path/to/Qwen3.8-27B \
  --draft-model-path /path/to/Qwen3.8-27B-UBTree-B16-release

This profile uses TP8, concurrency 1, B16, and 32 verification nodes, with BF16 weights, FP32 SSM states, FA3, full decode CUDA Graphs, and a 16K context. It enables the optimized UBTree tree-construction and GDN verification paths. The server listens on http://127.0.0.1:30000 by default.

From another terminal in the same environment, send an xhigh-thinking request:

python examples/chat.py qwen38-27b \
  --target-model-path /path/to/Qwen3.8-27B \
  --prompt "What is 17 times 23?" --max-new-tokens 8192

The model folder also includes serve.sh for direct launch after installing the same inference source. Run sha256sum -c SHA256SUMS in that folder to check the release files.

Benchmark results

The comparison below uses TP8 on 8 × NVIDIA L20X (SM90), concurrency 1, BF16 weights, FP32 SSM states, FA3, full decode CUDA Graphs, greedy decoding, and xhigh thinking. UBTree uses B16 / 32 nodes; DFlash2 uses B8 / 8 nodes. Both methods share the runtime, dependency environment, and input prompts.

Across the six datasets, UBTree's TPS ratio over DFlash2 has a geometric mean of 1.277× (+27.7%).

Each cell shows acceptance length / TPS (tok/s).

Dataset UBTree DFlash2
GSM8K 7.562 / 890.98 4.994 / 677.64
MATH-500 7.133 / 926.78 4.599 / 676.14
AIME 2025 6.230 / 830.40 4.318 / 650.52
HumanEval 6.666 / 882.16 4.580 / 683.21
MBPP 6.175 / 804.58 4.760 / 695.92
LiveCodeBench 5.523 / 736.15 3.866 / 582.52
Avg. (6 datasets) 6.548 / 845.18 4.520 / 660.99

TPS is returned output tokens divided by client HTTP wall time, covering prefill, thinking, and answer generation. Acceptance length is averaged over decoding rounds and includes the root/bonus token. The Avg. row is the arithmetic mean of the six reported per-dataset values. The headline TPS ratio is the geometric mean of the six ratios, with each dataset weighted equally.

Each method completed one measured pass: 670 requests across six datasets. Warmup covered 312 input lengths and the first prompt of each dataset; those requests are excluded from the measurements. Generation uses natural EOS with an 8,192-token cap, which some requests reached.

These are end-to-end measurements of the two draft configurations, including their different generation trajectories. Accuracy was not evaluated in this run, and the table does not establish strict token agreement with AR. The recorded runtime commit is 389ee80ca4; these results were not remeasured on the packaged runtime above. See benchmark_results_tp8.json for the protocol, reported values, and truncation counts.

Citation

If UBTree supports your research, please cite:

@article{liang2026ubtree,
  title   = {UBTree: Parallel Tree Drafting via Unigram and Bigram Models for Speculative Decoding},
  author  = {Liang, Chumeng and Wang, Linxuan and Peng, Xinyu and Liu, Huabin and Chen, Yuxin and Liu, Ge and Lin, Guang and Song, Qifan and Li, Jianguo},
  journal = {arXiv preprint arXiv:2609.39972},
  year    = {2026},
  url     = {https://arxiv.org/abs/2609.39972}
}

License

The draft weights use the MIT License in LICENSE. The target is distributed separately under Apache 2.0; a copy is retained in licenses/Qwen3.8-27B-APACHE-2.0.txt. The diagram reproduces Liang et al., Figure 2 under CC BY 4.0.

来源: 蚂蚁 inclusionAI · Hugging Face 新模型 · huggingface.co