tianzl66 commited on
Commit
5c7b0bd
·
verified ·
1 Parent(s): 5e72ecd

Release Qwen3-8B Spectral Surgery HNS 4+1 all-modules adapter

Browse files
Files changed (4) hide show
  1. README.md +63 -0
  2. adapter_config.json +46 -0
  3. adapter_model.safetensors +3 -0
  4. results.json +39 -0
README.md ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen3-8B
3
+ library_name: peft
4
+ tags:
5
+ - qwen
6
+ - qwen3
7
+ - lora
8
+ - code
9
+ - magicoder
10
+ - spectral-surgery
11
+ - hns
12
+ ---
13
+
14
+ # Qwen3-8B + Magicoder-50K + Spectral Surgery
15
+
16
+ This repository contains the Spectral Surgery adapter obtained by
17
+ applying HNS 4+1 post hoc to the epoch-1 Magicoder-50K LoRA checkpoint
18
+ of Qwen3-8B.
19
+
20
+ ## Base Model
21
+
22
+ `Qwen/Qwen3-8B`
23
+
24
+ ## Source LoRA
25
+
26
+ - Dataset: Magicoder
27
+ - Samples: 50K
28
+ - Source checkpoint: Epoch 1
29
+ - Sequence length: 4096
30
+ - Global batch size: 32
31
+ - Learning rate: 2e-5
32
+ - LoRA rank: 16
33
+ - Seed: 42
34
+
35
+ ## Spectral Surgery
36
+
37
+ - Target: all LoRA modules
38
+ - Output rank: 16
39
+ - Fast HNS steps: 4
40
+ - Stable HNS steps: 1
41
+ - Additional training: none
42
+
43
+ ## Evaluation
44
+
45
+ Greedy decoding.
46
+
47
+ HumanEval uses the chat prompt format. The results below correspond
48
+ to the evaluation configuration with `max_new_tokens=512` and
49
+ request batch size 8.
50
+
51
+ | Method | HumanEval-chat Pass@1 | MBPP-sanitized Pass@1 |
52
+ |---|---:|---:|
53
+ | Qwen3-8B Base | 64.63% (106/164) | 72.76% (187/257) |
54
+ | LoRA, Epoch 1 | 67.07% (110/164) | 72.76% (187/257) |
55
+ | **LoRA + HNS 4+1, all modules** | **74.39% (122/164)** | **75.10% (193/257)** |
56
+
57
+ Applied post hoc to the fixed epoch-1 LoRA checkpoint, all-module
58
+ HNS 4+1 improves Pass@1 by 7.32 percentage points on HumanEval and
59
+ 2.33 percentage points on MBPP without additional training.
60
+
61
+ Relative to the original Qwen3-8B base model, the resulting adapter
62
+ improves HumanEval by 9.76 percentage points and MBPP by 2.33
63
+ percentage points.
adapter_config.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
+ "base_model_name_or_path": "/root/autodl-tmp/Qwen3-8B",
7
+ "bias": "none",
8
+ "corda_config": null,
9
+ "ensure_weight_tying": false,
10
+ "eva_config": null,
11
+ "exclude_modules": null,
12
+ "fan_in_fan_out": false,
13
+ "inference_mode": true,
14
+ "init_lora_weights": true,
15
+ "layer_replication": null,
16
+ "layers_pattern": null,
17
+ "layers_to_transform": null,
18
+ "loftq_config": {},
19
+ "lora_alpha": 32,
20
+ "lora_bias": false,
21
+ "lora_dropout": 0.05,
22
+ "megatron_config": null,
23
+ "megatron_core": "megatron.core",
24
+ "modules_to_save": null,
25
+ "peft_type": "LORA",
26
+ "peft_version": "0.18.1",
27
+ "qalora_group_size": 16,
28
+ "r": 16,
29
+ "rank_pattern": {},
30
+ "revision": null,
31
+ "target_modules": [
32
+ "q_proj",
33
+ "up_proj",
34
+ "gate_proj",
35
+ "down_proj",
36
+ "k_proj",
37
+ "o_proj",
38
+ "v_proj"
39
+ ],
40
+ "target_parameters": null,
41
+ "task_type": "CAUSAL_LM",
42
+ "trainable_token_indices": null,
43
+ "use_dora": false,
44
+ "use_qalora": false,
45
+ "use_rslora": false
46
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31450ef6451bea57d339140343eeea9055a9e4e084611af1c3060516b7753ef9
3
+ size 174655504
results.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "base_model": "Qwen/Qwen3-8B",
3
+ "source_checkpoint": "epoch_1",
4
+ "evaluation": {
5
+ "decoding": "greedy",
6
+ "humaneval": {
7
+ "prompt_style": "chat",
8
+ "max_new_tokens": 512,
9
+ "request_batch_size": 8,
10
+ "total": 164
11
+ },
12
+ "mbpp": {
13
+ "variant": "sanitized",
14
+ "max_new_tokens": 512,
15
+ "request_batch_size": 8,
16
+ "total": 257
17
+ }
18
+ },
19
+ "results": {
20
+ "base": {
21
+ "humaneval_pass@1": 0.6463,
22
+ "humaneval_correct": 106,
23
+ "mbpp_pass@1": 0.7276,
24
+ "mbpp_correct": 187
25
+ },
26
+ "lora_epoch1": {
27
+ "humaneval_pass@1": 0.6707,
28
+ "humaneval_correct": 110,
29
+ "mbpp_pass@1": 0.7276,
30
+ "mbpp_correct": 187
31
+ },
32
+ "spectral_surgery_hns4p1_allmods": {
33
+ "humaneval_pass@1": 0.7439,
34
+ "humaneval_correct": 122,
35
+ "mbpp_pass@1": 0.7510,
36
+ "mbpp_correct": 193
37
+ }
38
+ }
39
+ }