Rookie-Liu commited on
Commit
5b97385
·
verified ·
1 Parent(s): 9c9df5f

Upload folder using huggingface_hub

Browse files
Files changed (5) hide show
  1. .gitattributes +1 -0
  2. README.md +107 -0
  3. assets/ubtree_pipeline.png +3 -0
  4. config.json +147 -0
  5. model.safetensors +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ assets/ubtree_pipeline.png filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,110 @@
1
  ---
 
 
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ library_name: sglang
3
+ pipeline_tag: text-generation
4
  license: mit
5
+ base_model:
6
+ - inclusionAI/Ling-3.0-tiny
7
+ tags:
8
+ - speculative-decoding
9
+ - tree-speculative-decoding
10
+ - ubtree
11
+ - dflash
12
+ - sglang
13
+ - ling3
14
+ - arxiv:2609.39972
15
+ language:
16
+ - zh
17
+ - en
18
  ---
19
+
20
+ # Ling3-Tiny-UBTree-B16
21
+
22
+ [Paper](https://arxiv.org/abs/2609.39972) · [Target model](https://huggingface.co/inclusionAI/Ling-3.0-tiny)
23
+
24
+ **Ling3-Tiny-UBTree-B16** is a UBTree speculative-decoding draft model for
25
+ [inclusionAI/Ling-3.0-tiny](https://huggingface.co/inclusionAI/Ling-3.0-tiny). It combines a
26
+ five-layer DFlash backbone with a learned bigram selector to propose multiple
27
+ candidate continuations for target-model verification.
28
+
29
+ > **SGLang integration — stay tuned!** Our UBTree adaptation for Ling3 has not
30
+ > yet been released to the open-source SGLang community. Public installation
31
+ > instructions and serving recipes will be added here when it becomes available.
32
+
33
+ This checkpoint is used alongside the matching target model; it cannot serve
34
+ as a standalone text-generation model.
35
+
36
+ ## How UBTree works
37
+
38
+ ![UBTree architecture and tree-native training pipeline](assets/ubtree_pipeline.png)
39
+
40
+ *UBTree pipeline*
41
+
42
+ UBTree pairs a **unigram proposer** with a **bigram selector**:
43
+
44
+ 1. A DFlash backbone proposes candidate tokens for future positions in parallel.
45
+ 2. The selector scores transitions between adjacent candidates in parallel.
46
+ 3. Tree construction retains promising branches within a verification budget.
47
+ 4. The target verifies the tree and commits the accepted continuation.
48
+
49
+ The paper also introduces tree-native training with renormalized KL supervision
50
+ on high-temperature target traces, encouraging plausible alternative branches.
51
+ See the [paper](https://arxiv.org/abs/2609.39972) for the method and experiments.
52
+
53
+ ## Model specifications
54
+
55
+ | Item | Value |
56
+ |---|---|
57
+ | Target model | [inclusionAI/Ling-3.0-tiny](https://huggingface.co/inclusionAI/Ling-3.0-tiny) |
58
+ | Draft architecture | `Ling3UBTreeModel` |
59
+ | Draft backbone | 5 full-attention Transformer layers |
60
+ | Parameters stored in this checkpoint | 183,127,326 (183.1M) |
61
+ | Weight dtype | BF16 |
62
+ | Hidden size | 1,536 |
63
+ | Attention heads / KV heads | 16 / 16 |
64
+ | Target auxiliary feature layers (zero-based) | 4, 8, 12, 16, 22 |
65
+ | Draft block size | 16 (anchor-inclusive runtime convention) |
66
+ | Candidate top-k | 64 per draft position |
67
+ | Default verification tree budget | 64 non-root nodes + 1 anchor |
68
+ | Training | DFlash warm start, then joint backbone + UBTree selector training |
69
+
70
+ The parameter count covers tensors distributed in this repository. The draft
71
+ shares token embeddings and the language-model head with the target; these
72
+ shared weights are not included here. B16 denotes the draft block size, not
73
+ the verification tree's node budget.
74
+
75
+ ## Serving with SGLang
76
+
77
+ UBTree support for Ling3 in SGLang is coming soon. We will share installation
78
+ instructions and serving examples once the integration is publicly available.
79
+ **Stay tuned!**
80
+
81
+ ## Evaluation notes
82
+
83
+ The [UBTree paper](https://arxiv.org/abs/2609.39972) reports results under its
84
+ specified models and experimental configurations. Those results should not
85
+ be treated as measurements of every released checkpoint or serving setup.
86
+
87
+ Runtime version, hardware, tree budget, concurrency, and decoding settings
88
+ all affect acceptance length and speed. Checkpoint-specific reproducible
89
+ benchmark recipes will accompany the public runtime integration. Numerical
90
+ or token-level equivalence and task quality require validation for the chosen
91
+ serving configuration.
92
+
93
+ ## Citation
94
+
95
+ If you use UBTree in your work, please cite:
96
+
97
+ ```bibtex
98
+ @article{liang2026ubtree,
99
+ title = {UBTree: Parallel Tree Drafting via Unigram and Bigram Models for Speculative Decoding},
100
+ 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},
101
+ journal = {arXiv preprint arXiv:2609.39972},
102
+ year = {2026},
103
+ url = {https://arxiv.org/abs/2609.39972}
104
+ }
105
+ ```
106
+
107
+ ## License
108
+
109
+ The model weights are released under the **MIT License**. The reproduced paper
110
+ figure is separately licensed under **CC BY 4.0**, as credited above.
assets/ubtree_pipeline.png ADDED

Git LFS Details

  • SHA256: 3233e0c7a3d9be0edf8e93a303f662a97d0b5f6eb92fa4fe3857eca11a4225e7
  • Pointer size: 131 Bytes
  • Size of remote file: 231 kB
config.json ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Ling3UBTreeModel"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "block_size": 16,
8
+ "bos_token_id": null,
9
+ "dflash_config": {
10
+ "block_size": 16,
11
+ "contract": "flashflow_anchor_inclusive_v1",
12
+ "mask_token_id": 156892,
13
+ "num_target_layers": 24,
14
+ "target_layer_ids": [
15
+ 4,
16
+ 8,
17
+ 12,
18
+ 16,
19
+ 22
20
+ ]
21
+ },
22
+ "dflash_contract": "flashflow_anchor_inclusive_v1",
23
+ "dtype": "bfloat16",
24
+ "embedding_dropout": 0.0,
25
+ "enable_confidence_head": false,
26
+ "eos_token_id": 156895,
27
+ "expert_swiglu_limit_list": null,
28
+ "first_k_dense_replace": 1,
29
+ "gated_attention_proj_granularity_type": "head_wise",
30
+ "group_norm_size": 1,
31
+ "head_dim": 128,
32
+ "hidden_act": "silu",
33
+ "hidden_size": 1536,
34
+ "initializer_range": 0.02,
35
+ "intermediate_size": 4608,
36
+ "kda_lower_bound": -5,
37
+ "kda_safe_gate": true,
38
+ "kv_lora_rank": 512,
39
+ "layer_group_size": 4,
40
+ "layer_types": [
41
+ "full_attention",
42
+ "full_attention",
43
+ "full_attention",
44
+ "full_attention",
45
+ "full_attention"
46
+ ],
47
+ "linear_silu": true,
48
+ "markov_rank": 0,
49
+ "mask_token_id": 156892,
50
+ "max_position_embeddings": 131072,
51
+ "max_window_layers": 20,
52
+ "model_type": "qwen3",
53
+ "moe_intermediate_size": 512,
54
+ "moe_router_enable_expert_bias": true,
55
+ "moe_shared_expert_intermediate_size": 512,
56
+ "mtp_loss_scaling_factor": 0,
57
+ "mtp_use_kda": false,
58
+ "n_group": 8,
59
+ "no_kda_lora": true,
60
+ "norm_topk_prob": true,
61
+ "num_anchors": 512,
62
+ "num_attention_heads": 16,
63
+ "num_experts": 128,
64
+ "num_experts_per_tok": 8,
65
+ "num_hidden_layers": 5,
66
+ "num_key_value_heads": 16,
67
+ "num_kv_heads_for_linear_attn": 0,
68
+ "num_shared_experts": 1,
69
+ "num_target_layers": 24,
70
+ "output_dropout": 0.0,
71
+ "output_router_logits": false,
72
+ "pad_token_id": 156892,
73
+ "partial_rotary_factor": 1.0,
74
+ "q_lora_rank": 256,
75
+ "qk_head_dim": 192,
76
+ "qk_nope_head_dim": 128,
77
+ "qk_rope_head_dim": 64,
78
+ "rms_norm_eps": 1e-06,
79
+ "rope_interleave": true,
80
+ "rope_parameters": {
81
+ "partial_rotary_factor": 1.0,
82
+ "rope_theta": 6000000,
83
+ "rope_type": "default"
84
+ },
85
+ "rope_theta": 6000000.0,
86
+ "rotary_dim": 64,
87
+ "routed_scaling_factor": 2.5,
88
+ "router_dtype": "fp32",
89
+ "scale_router_input": false,
90
+ "score_function": "sigmoid",
91
+ "scoring_func": "sigmoid",
92
+ "self_conditioning": false,
93
+ "seq_aux": true,
94
+ "share_expert_swiglu_limit_list": null,
95
+ "short_conv_kernel_size": 4,
96
+ "sliding_window": null,
97
+ "target_layer_ids": [
98
+ 4,
99
+ 8,
100
+ 12,
101
+ 16,
102
+ 22
103
+ ],
104
+ "tie_word_embeddings": false,
105
+ "topk_group": 4,
106
+ "topk_method": "noaux_tc",
107
+ "transformers_version": "5.12.1",
108
+ "ubtree_config": {
109
+ "adds_unary_logits": true,
110
+ "architecture": "cp",
111
+ "candidate_k": 64,
112
+ "candidate_source": "frozen_dflash_unary_topk_ids_only",
113
+ "depth_condition_count": 15,
114
+ "depth_conditioning": "unary_correction_two_scale",
115
+ "depth_scale_parameterization": "exp_log_scale",
116
+ "factorizer_hidden_width": 512,
117
+ "hidden_projection_depth_count": 15,
118
+ "hidden_projection_type": "shared",
119
+ "inference_hidden_projection": "materialized_per_depth_affine",
120
+ "kl_temperature": 1.0,
121
+ "objective": "kl",
122
+ "rank": 256,
123
+ "target_embedding_dim": 1536,
124
+ "token_factorizer": "target_embedding_mlp",
125
+ "train_backbone": true,
126
+ "trained": true,
127
+ "training_mode": "joint_backbone_selector",
128
+ "tree_budget": 64,
129
+ "tree_builder": "pruned",
130
+ "tree_depth_bonus": 0.0,
131
+ "tree_supertree_width": 12,
132
+ "type": "residual_bigram",
133
+ "version": 1
134
+ },
135
+ "up_proj_norm": false,
136
+ "use_bias": false,
137
+ "use_cache": true,
138
+ "use_kda_lora": false,
139
+ "use_mla_nope": false,
140
+ "use_nGPT": false,
141
+ "use_qk_norm": true,
142
+ "use_qkv_bias": false,
143
+ "use_sliding_window": false,
144
+ "v_head_dim": 128,
145
+ "value_norm": false,
146
+ "vocab_size": 157184
147
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0820dfec7492fd6543dc170be8db2de076bc88524cf7d3dce1de37fe3173dca
3
+ size 366261868