caoyao commited on
Commit
7946612
·
verified ·
1 Parent(s): 4c438a4

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +84 -0
README.md ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ base_model: Qwen/Qwen3-0.6B
6
+ tags:
7
+ - qwen3
8
+ - distillation
9
+ - on-policy-distillation
10
+ - math
11
+ - gsm8k
12
+ - npu
13
+ - ascend
14
+ ---
15
+
16
+ # Haidass OPD Step 200
17
+
18
+ On-Policy Distillation (OPD) checkpoint of Haidass (Qwen3-0.6B) distilled from Qwen3.6-35B-A3B on GSM8K, trained for 200 steps on Ascend 910B3 NPUs.
19
+
20
+ ## Model Details
21
+
22
+ | | |
23
+ |---|---|
24
+ | **Base model** | [Qwen/Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B) (Haidass, 596M params) |
25
+ | **Teacher model** | Qwen3.6-35B-A3B (MoE, 35B total / 3B active) |
26
+ | **Architecture** | Qwen3ForCausalLM |
27
+ | **Training data** | GSM8K (7,473 train samples) |
28
+ | **Training steps** | 200 |
29
+ | **Hardware** | 8× Ascend 910B3 (64GB HBM) |
30
+ | **Framework** | [verl](https://github.com/verl-project/verl) + vLLM 0.18.0 + vllm-ascend 0.18.0 |
31
+
32
+ ### Architecture
33
+
34
+ | Parameter | Value |
35
+ |-----------|-------|
36
+ | hidden_size | 1024 |
37
+ | num_hidden_layers | 28 |
38
+ | num_attention_heads | 16 |
39
+ | num_key_value_heads | 8 (GQA) |
40
+ | intermediate_size | 3072 |
41
+ | vocab_size | 151936 |
42
+ | max_position_embeddings | 40960 |
43
+ | tie_word_embeddings | true |
44
+
45
+ ## Training Configuration
46
+
47
+ - **Distillation loss**: k1 KL divergence + policy gradient
48
+ - **Student**: DP=4, TP=1, NPU graph capture enabled, sleep mode disabled
49
+ - **Teacher**: TP=4, graph capture enabled
50
+ - **Batch size**: 48 (micro_batch=16 per GPU)
51
+ - **Learning rate**: 1e-6
52
+ - **Max prompt length**: 512 tokens
53
+ - **Max response length**: 1024 tokens
54
+ - **Performance**: 29.8s/step, 109 tok/s throughput
55
+
56
+ ## Usage
57
+
58
+ ```python
59
+ from transformers import AutoModelForCausalLM, AutoTokenizer
60
+
61
+ model_id = "caoyao/haidass_qwen3.6-35b-a3b_opd_step_200"
62
+
63
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
64
+ model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
65
+
66
+ messages = [
67
+ {"role": "user", "content": "Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether in April and May? Let's think step by step and output the final answer after \"####\"."}
68
+ ]
69
+
70
+ text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
71
+ inputs = tokenizer(text, return_tensors="pt").to(model.device)
72
+ outputs = model.generate(**inputs, max_new_tokens=512)
73
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
74
+ ```
75
+
76
+ ## Repository
77
+
78
+ Training code and scripts: [github.com/yuancaoyaoHW/verl-npu](https://github.com/yuancaoyaoHW/verl-npu)
79
+
80
+ ## Acknowledgements
81
+
82
+ - [Qwen team](https://github.com/QwenLM) for Qwen3-0.6B and Qwen3.6-35B-A3B
83
+ - [verl project](https://github.com/verl-project/verl) for the RL training framework with OPD support
84
+ - [Ascend](https://www.hiascend.com/) for NPU hardware and vllm-ascend