sh2orc commited on
Commit
5c5ce75
·
verified ·
1 Parent(s): 3373864

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +74 -0
README.md CHANGED
@@ -1,3 +1,77 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ language:
4
+ - ko
5
+ base_model:
6
+ - google/gemma-4-31B-it
7
+ - BCCard/gemma-4-31B-it-FP8-Dynamic
8
+ datasets:
9
+ - sh2orc/bccard-maywell-jojo0217-markai-lcw99-kendamarron-microsoft
10
+ tags:
11
+ - eagle3
12
+ - speculative-decoding
13
+ - speculators
14
+ - vllm
15
+ - korean
16
+ library_name: speculators
17
  ---
18
+
19
+ # gemma-4-31B-it EAGLE-3 Draft (Korean-optimized)
20
+
21
+ An EAGLE-3 draft (speculator) for accelerating **Korean** generation from
22
+ `gemma-4-31B-it` via speculative decoding. Publicly available drafts are trained
23
+ on English and accept Korean tokens poorly, so this draft was retrained on Korean
24
+ prompts with **on-policy responses regenerated by the verifier itself**.
25
+
26
+ - **Method**: EAGLE-3 (`vllm-project/speculators`)
27
+ - **Verifier (target)**: `BCCard/gemma-4-31B-it-FP8-Dynamic` (FP8; used for serving and hidden-state extraction)
28
+ - **Reused weights**: BF16 embed/lm_head from `google/gemma-4-31B-it` (standard EAGLE-3)
29
+ - **Warm start**: `RedHatAI/gemma-4-31B-it-speculator.eagle3`
30
+ - **Training data**: ~150k prompts sampled from
31
+ [sh2orc/bccard-maywell-jojo0217-markai-lcw99-kendamarron-microsoft](https://huggingface.co/datasets/sh2orc/bccard-maywell-jojo0217-markai-lcw99-kendamarron-microsoft)
32
+ (1.71M-row Korean QA; `instruction` column only). Answers are discarded and
33
+ regenerated on-policy by the verifier.
34
+ - **Sequence length**: 8192
35
+
36
+ ## Serving (vLLM)
37
+
38
+ ```bash
39
+ VLLM_USE_FLASHINFER_SAMPLER=0 vllm serve BCCard/gemma-4-31B-it-FP8-Dynamic -tp 1 \
40
+ --max-model-len 8192 \
41
+ --speculative-config '{
42
+ "model": "BCCard/MoAI-gemma-4-31B-it-speculator.eagle3",
43
+ "num_speculative_tokens": 4,
44
+ "method": "eagle3",
45
+ "draft_tensor_parallel_size": 1
46
+ }'
47
+ ```
48
+
49
+ Tune `num_speculative_tokens` in the 4–8 range based on measured acceptance / TPS.
50
+ The draft uses the verifier's tokenizer.
51
+
52
+ ## Performance (per-position acceptance at training time, validation)
53
+
54
+ | position | full_acc | cond_acc |
55
+ | --- | --- | --- |
56
+ | 0 | 0.638 | 0.638 |
57
+ | 1 | 0.380 | 0.595 |
58
+ | 2 | 0.235 | 0.618 |
59
+
60
+ Mean accepted length ≈ 2.3 tokens/step, roughly ~2.2x speedup (measure on your own
61
+ traffic). Train and validation metrics match closely, so there is no overfitting.
62
+
63
+ ## Limitations
64
+
65
+ - Trained on general Korean QA. Domain-specific traffic (e.g. finance) may benefit
66
+ from one more training cycle on domain-matched data, raising acceptance.
67
+ - Acceptance is measured against the verifier `BCCard/gemma-4-31B-it-FP8-Dynamic`.
68
+ Pairing the draft with a different target will change results.
69
+
70
+ ## License
71
+
72
+ **Apache 2.0**. The base Gemma 4 (Apache 2.0 since 2026-04, the first Gemma family
73
+ to adopt it), the verifier `BCCard/gemma-4-31B-it-FP8-Dynamic` (Apache 2.0), and the
74
+ RedHat EAGLE-3 warm-start checkpoint are all Apache 2.0, so this draft is released
75
+ under Apache 2.0 as well. Apache 2.0 requires only attribution of the original
76
+ copyright and disclosure of modifications, with no restrictions on commercial use,
77
+ modification, or redistribution. (This is informational, not legal advice.)