Add Confucius3-Math EAGLE3 draft head (epoch_2/step_12000, ~38% trained)
Browse files- README.md +59 -0
- config.json +31 -0
- model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: netease-youdao/Confucius3-Math
|
| 4 |
+
tags:
|
| 5 |
+
- eagle3
|
| 6 |
+
- speculative-decoding
|
| 7 |
+
- draft-model
|
| 8 |
+
- vllm
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Confucius3-Math EAGLE3 Draft Head
|
| 12 |
+
|
| 13 |
+
An [EAGLE3](https://arxiv.org/abs/2503.01840) speculative-decoding draft head for
|
| 14 |
+
[**netease-youdao/Confucius3-Math**](https://huggingface.co/netease-youdao/Confucius3-Math)
|
| 15 |
+
(Qwen2.5-14B, R1-style inline-think). Trained with [SpecForge](https://github.com/sgl-project/SpecForge)
|
| 16 |
+
on the same rollout data as a matched DFlash / D-PACE drafter, for a method comparison.
|
| 17 |
+
|
| 18 |
+
> ⚠️ **Intermediate checkpoint.** This is `epoch_2 / step_12000` of a planned 6-epoch
|
| 19 |
+
> (31,734-step) run — roughly **38%** through training. Acceptance length will still
|
| 20 |
+
> improve with further training. A final checkpoint will replace this when the run completes.
|
| 21 |
+
|
| 22 |
+
## Architecture
|
| 23 |
+
|
| 24 |
+
| | |
|
| 25 |
+
|---|---|
|
| 26 |
+
| architecture | `LlamaForCausalLMEagle3` (1 layer) |
|
| 27 |
+
| hidden size | 5120 |
|
| 28 |
+
| heads (q/kv) | 40 / 8 |
|
| 29 |
+
| intermediate | 13824 |
|
| 30 |
+
| draft vocab | 32000 (with `d2t`/`t2d` mapping to the 152064 target vocab) |
|
| 31 |
+
| aux hidden layers | `[1, 23, 44]` (SpecForge default) |
|
| 32 |
+
| dtype | bfloat16 |
|
| 33 |
+
|
| 34 |
+
## Training
|
| 35 |
+
|
| 36 |
+
- SpecForge EAGLE3 defaults: auto-generated draft config, lr 1e-4, warmup 0.015, grad-norm 0.5, TTT length 7.
|
| 37 |
+
- Copied from the matched DFlash/D-PACE run: same preformatted Confucius3-Math rollout data (148,112 rows), `confucius-r1` chat template, max-length 4096, batch-size 4, 6 epochs.
|
| 38 |
+
|
| 39 |
+
## Usage (vLLM)
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
vllm serve netease-youdao/Confucius3-Math \
|
| 43 |
+
--speculative-config '{"method":"eagle3","model":"noctuashap/Confucius3-Math-Eagle3","num_speculative_tokens":7}' \
|
| 44 |
+
--attention-backend flash_attn --trust-remote-code
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
`num_speculative_tokens` is the draft length — lower it (e.g. 2–3) for high-concurrency /
|
| 48 |
+
compute-bound serving, raise it (up to ~7) for low-batch / latency-oriented serving.
|
| 49 |
+
|
| 50 |
+
## Measured acceptance (gsm8k / math500, thinking mode, vLLM)
|
| 51 |
+
|
| 52 |
+
At an earlier checkpoint (step_8000) with `num_speculative_tokens=7`:
|
| 53 |
+
|
| 54 |
+
| dataset | accept length | tok/s (single stream) |
|
| 55 |
+
|---|---|---|
|
| 56 |
+
| gsm8k | ~4.3 | ~365 |
|
| 57 |
+
| math500 | ~4.5 | ~386 |
|
| 58 |
+
|
| 59 |
+
(Confucius3-Math is R1-style always-thinking, so thinking and non-thinking modes are equivalent.)
|
config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLMEagle3"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 151646,
|
| 8 |
+
"draft_vocab_size": 32000,
|
| 9 |
+
"dtype": "bfloat16",
|
| 10 |
+
"eos_token_id": 151643,
|
| 11 |
+
"head_dim": 128,
|
| 12 |
+
"hidden_act": "silu",
|
| 13 |
+
"hidden_size": 5120,
|
| 14 |
+
"initializer_range": 0.02,
|
| 15 |
+
"intermediate_size": 13824,
|
| 16 |
+
"max_position_embeddings": 131072,
|
| 17 |
+
"mlp_bias": false,
|
| 18 |
+
"model_type": "llama",
|
| 19 |
+
"num_attention_heads": 40,
|
| 20 |
+
"num_hidden_layers": 1,
|
| 21 |
+
"num_key_value_heads": 8,
|
| 22 |
+
"pad_token_id": 0,
|
| 23 |
+
"pretraining_tp": 1,
|
| 24 |
+
"rms_norm_eps": 1e-05,
|
| 25 |
+
"rope_scaling": null,
|
| 26 |
+
"rope_theta": 10000.0,
|
| 27 |
+
"tie_word_embeddings": false,
|
| 28 |
+
"transformers_version": "4.57.1",
|
| 29 |
+
"use_cache": true,
|
| 30 |
+
"vocab_size": 152064
|
| 31 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:53c98895cdc119505590c84a07c07ac7e5e67a620df5aa684abc9e7089a71ffd
|
| 3 |
+
size 1109319664
|