ycchen commited on
Commit
39aa530
·
verified ·
1 Parent(s): 5f48897

add opd-32b-v33-s200-gptq-w4a16 (sink-on + long-ctx + fp8 KV scale)

Browse files
Files changed (1) hide show
  1. README.md +25 -0
README.md CHANGED
@@ -6,6 +6,8 @@ tags:
6
  - dflash
7
  - speculative-decoding
8
  - on-policy-distillation
 
 
9
  ---
10
 
11
  # proof-pilot deploy bundle (private)
@@ -18,6 +20,7 @@ tags:
18
  | `soft-distill-32b-deploy/` | stage1-v2-32b soft-distill v2 (deploy) | 32B off-policy soft distillation(bf16, rope-legacy deploy config),含 tokenizer + chat template |
19
  | `opd-32b-deploy/` | **32B agentic OPD v2 — v33 / job 135076 / step_200** | **on-policy distillation**(teacher = DeepSeek-V4-Flash),student lineage = stage1-v2-32b-softdistill-v2test(GQA-8, YaRN)。bf16 deploy(rope-legacy config + hybrid-SWA)+ tokenizer + chat template。**目前部署主檔**。IMO-ProofBench v2 agentic-loop(prove→verify→refine→select)量到 **4.48/7**(grader = flash,僅供內部相對比較)。版本來龍去脈見下方「OPD 32B 版本說明」。 |
20
  | `opd-32b-v33-s150/` | **32B agentic OPD v2 — v33 / job 135076 / step_150** | 與 `opd-32b-deploy`(step_200)**同一條健康 run** 的較早 checkpoint,可做 s150 vs s200 比較。同 deploy 格式(bf16 / rope-legacy / hybrid-SWA)+ tokenizer + chat template。 |
 
21
  | `dflash-7b-draft/` | DFlash draft for 7B target | SGLang 可部署 draft(speculative decoding) |
22
  | `dflash-32b-draft/` | DFlash draft for **stage1-v2-32b** target (s5317) | SGLang 可部署 draft;對齊舊 32B deploy target |
23
  | `dflash-32b-draft-v2test/` | DFlash draft for stage1-v2-32b-softdistill-v2test — **phase-1 warm-up(非 final)** | curriculum **phase-1 短 context warm-up**(step-10000 快照)。SWA512 / block_size 11 / 8L / GQA-8。**部署請用下方 `dflash-32b-draft-v2test-phaseL`。** |
@@ -52,3 +55,25 @@ python deploy/make_olmo3sink_deploy.py \
52
  --dst outputs/agentic_32b_lc140k_v33-sNNN-deploy
53
  python deploy_kaggle/enable_swa_config.py outputs/agentic_32b_lc140k_v33-sNNN-deploy
54
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  - dflash
7
  - speculative-decoding
8
  - on-policy-distillation
9
+ - gptq
10
+ - quantization
11
  ---
12
 
13
  # proof-pilot deploy bundle (private)
 
20
  | `soft-distill-32b-deploy/` | stage1-v2-32b soft-distill v2 (deploy) | 32B off-policy soft distillation(bf16, rope-legacy deploy config),含 tokenizer + chat template |
21
  | `opd-32b-deploy/` | **32B agentic OPD v2 — v33 / job 135076 / step_200** | **on-policy distillation**(teacher = DeepSeek-V4-Flash),student lineage = stage1-v2-32b-softdistill-v2test(GQA-8, YaRN)。bf16 deploy(rope-legacy config + hybrid-SWA)+ tokenizer + chat template。**目前部署主檔**。IMO-ProofBench v2 agentic-loop(prove→verify→refine→select)量到 **4.48/7**(grader = flash,僅供內部相對比較)。版本來龍去脈見下方「OPD 32B 版本說明」。 |
22
  | `opd-32b-v33-s150/` | **32B agentic OPD v2 — v33 / job 135076 / step_150** | 與 `opd-32b-deploy`(step_200)**同一條健康 run** 的較早 checkpoint,可做 s150 vs s200 比較。同 deploy 格式(bf16 / rope-legacy / hybrid-SWA)+ tokenizer + chat template。 |
23
+ | `opd-32b-v33-s200-gptq-w4a16/` | **`opd-32b-deploy`(step_200)的 GPTQ-w4a16 量化版** | int4 weight-only(compressed-tensors,int4 sym group-128 GPTQ)+ **校準的 fp8 KV scale**。**18.74GB**(bf16 65GB→int4,4 shards + index)。calibration 對齊 inference:sink-on + long-ctx(10240) + factor-32 YaRN。serve = sglang `olmo2_sink` + triton(sm120)/fa3(H200) + `--kv-cache-dtype fp8_e4m3`。詳見下方「GPTQ 量化版」。 |
24
  | `dflash-7b-draft/` | DFlash draft for 7B target | SGLang 可部署 draft(speculative decoding) |
25
  | `dflash-32b-draft/` | DFlash draft for **stage1-v2-32b** target (s5317) | SGLang 可部署 draft;對齊舊 32B deploy target |
26
  | `dflash-32b-draft-v2test/` | DFlash draft for stage1-v2-32b-softdistill-v2test — **phase-1 warm-up(非 final)** | curriculum **phase-1 短 context warm-up**(step-10000 快照)。SWA512 / block_size 11 / 8L / GQA-8。**部署請用下方 `dflash-32b-draft-v2test-phaseL`。** |
 
55
  --dst outputs/agentic_32b_lc140k_v33-sNNN-deploy
56
  python deploy_kaggle/enable_swa_config.py outputs/agentic_32b_lc140k_v33-sNNN-deploy
57
  ```
58
+
59
+ ## GPTQ 量化版(`opd-32b-v33-s200-gptq-w4a16`)
60
+
61
+ `opd-32b-deploy`(step_200 bf16)的 4-bit 部署版,給 Kaggle RTX 6000 Pro(sm120)等 VRAM 受限環境。**18.74GB**(bf16 65GB → int4,4 shards + index)。也同步上傳為 Kaggle private model `threerabbits/opd-32b-v33-s200-gptq-w4a16`。
62
+
63
+ **量化配方(刻意對齊 serving 分布、消除 calib/infer mismatch)**:llm-compressor GPTQ,scheme W4A16(int4 / symmetric / group_size 128 / Hessian 誤差補償),`lm_head`/embed/norm/sink 保 bf16。calibration:
64
+
65
+ - **sink-on**:gpt-oss attention sink 進 eager calib forward(= sglang serve 端的算法;trained sink logit mean ~+6.7,非可忽略,故 calib 必須帶 sink)
66
+ - **long-context seqlen 10240**:> YaRN original_max 8192 且 > sliding window 4096 → 吃到長程 / 高位置 post-YaRN K 分布
67
+ - **factor-32 YaRN rope**(deploy config 原樣)
68
+ - calib data = L4 訓練 bins(同 129280 transplant vocab),n=64
69
+
70
+ **KV cache**:含**校準的 fp8 per-tensor static k_scale / v_scale**(`kv_cache_scheme` 寫進 config),取代未校準的 scale=1.0。實測 k_scale 0.032–0.169(mean 0.061)、v_scale 0.0069–0.436(mean 0.161;深層 V 顯著大於淺層)。
71
+
72
+ **品質**(sink-on、serving regime、teacher-forced @8192、vs bf16 reference):ppl **+0.13%**、top1_agree **0.975**、KL(bf16‖q) 0.011 —— 權重幾乎無損。
73
+
74
+ **Serving 注意事項**:
75
+
76
+ - sglang,bind-mount `deploy/target/olmo2_sink.py`(in-kernel sink),`--attention-backend triton`(sm120 唯一 sink-correct)或 `fa3`(H200),**`--kv-cache-dtype fp8_e4m3`** 才會載入校準的 k/v_scale。sglang 從 config 的 `quantization_config` 自動偵測 compressed-tensors,不需傳 `--quantization`。
77
+ - ⚠️ 校準的 KV scale(非 unit)與 **DFlash fused-KV ring 互斥**(DFlash 路徑遇 non-unit k/v_scale 會關掉 fused-KV)。要 DFlash spec-decode 時改用 unit-scale fp8 KV。
78
+ - `actorder=static` 但 checkpoint **0 個 g_idx**(重排已 bake、無 permutation 需套)→ marlin W4A16 與 humming W4A8 路徑皆安全。
79
+ - ⚠️ KV scale 在 calib 長度 10240 下校準;serving 到 256k 時極高位置的 K 若略超校準 amax,fp8 會 saturate(非 error)。