HoomanBio commited on
Commit
a2c362f
·
verified ·
1 Parent(s): 477f746

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +15 -18
README.md CHANGED
@@ -8,7 +8,14 @@ tags:
8
  - fp8
9
  - agentic-coding
10
  - scientific-computing
 
 
 
 
 
 
11
  library_name: transformers
 
12
  ---
13
 
14
  # Qwen3.8-27B-LabOpen v1
@@ -38,7 +45,7 @@ We believe that AI for scientific research should not depend solely on remote ge
38
  | Path | Content |
39
  |---|---|
40
  | `model-0000X-of-00007.safetensors` + index | **Merged FP8 full weights** (base + LoRA, blockwise-FP8 re-quantized). Same tensor layout and quantization format as the base — drop-in replacement |
41
- | `adapter/` | **LoRA adapter** (112 MB, PEFT format, 992 tensors). Numerically exact training artifact — no re-quantization |
42
  | `MERGE_REPORT.md` | Merge provenance: digests, shard SHA-256, re-quantization error stats, output-equivalence probes |
43
  | `EVALUATION.md` | Measured capability matrix and 5-model external comparison |
44
  | `USAGE.md` | Loading, domain tags, temperature guidance, troubleshooting |
@@ -104,16 +111,11 @@ vllm serve HoomanBio/Qwen3.8-27B-LabOpen-v1
104
 
105
  The merged checkpoint uses the same blockwise FP8 (e4m3, 128×128 scales) format as the base — any runtime that loads `Qwen/Qwen3.8-27B-FP8` loads this without changes.
106
 
107
- ### Loading the adapter (exact training numerics)
108
 
109
- ```python
110
- from transformers import AutoModelForCausalLM, AutoTokenizer
111
- from peft import PeftModel
112
 
113
- base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.8-27B-FP8", device_map="auto")
114
- model = PeftModel.from_pretrained(base, "HoomanBio/Qwen3.8-27B-LabOpen-v1", subfolder="adapter")
115
- tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.8-27B-FP8")
116
- ```
117
 
118
  > **Do not run `merge_and_unload()` on the FP8 base yourself.** The base stores weights as blockwise-FP8 codes with 128×128 scales; a naive PEFT merge adds a BF16 delta directly onto FP8 codes and silently corrupts the weights. Use the merged checkpoint provided here — it was produced by dequantize → add delta → re-quantize with per-block scale recomputation and verified against the adapter (see `MERGE_REPORT.md`).
119
 
@@ -220,7 +222,7 @@ Qwen3.8-27B-LabOpen v1 是基于 Qwen3.8-27B 开源基础模型开展领域微
220
  | 路径 | 内容 |
221
  |---|---|
222
  | `model-0000X-of-00007.safetensors` + index | **合并 FP8 全权重**(基座 + LoRA,分块 FP8 重量化)。张量布局与量化格式和基座完全相同——即插即用替换 |
223
- | `adapter/` | **LoRA 适配器**(112 MB,PEFT 格式,992 张量)。训练时的精确数值工件,无重量化 |
224
  | `MERGE_REPORT.md` | 合并溯源:摘要、分片 SHA-256、重量化误差统计、输出等价探针 |
225
  | `EVALUATION.md` | 实测能力矩阵与五模型外部对比 |
226
  | `USAGE.md` | 加载方式、域标记、温度建议、故障排查 |
@@ -286,16 +288,11 @@ vllm serve HoomanBio/Qwen3.8-27B-LabOpen-v1
286
 
287
  合并检查点与基座采用完全相同的分块 FP8(e4m3,128×128 块尺度)格式——任何能加载 `Qwen/Qwen3.8-27B-FP8` 的运行时均可直接加载本仓库,无需改动。
288
 
289
- ### 加载适配器(训练时精确数值)
290
 
291
- ```python
292
- from transformers import AutoModelForCausalLM, AutoTokenizer
293
- from peft import PeftModel
294
 
295
- base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.8-27B-FP8", device_map="auto")
296
- model = PeftModel.from_pretrained(base, "HoomanBio/Qwen3.8-27B-LabOpen-v1", subfolder="adapter")
297
- tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.8-27B-FP8")
298
- ```
299
 
300
  > **不要自行对 FP8 基座执行 `merge_and_unload()`。** 基座权重以分块 FP8 码 + 128×128 块尺度存储;朴素 PEFT 合并会把 BF16 增量直接加到 FP8 码上,静默损坏权重。请使用本仓库提供的合并检查点——它按「反量化 → 加增量 → 按块重量化」生成,并经与适配器的等价探针验证(见 `MERGE_REPORT.md`)。
301
 
 
8
  - fp8
9
  - agentic-coding
10
  - scientific-computing
11
+ - physics
12
+ - materials-science
13
+ - genetics
14
+ language:
15
+ - en
16
+ - zh
17
  library_name: transformers
18
+ pipeline_tag: text-generation
19
  ---
20
 
21
  # Qwen3.8-27B-LabOpen v1
 
45
  | Path | Content |
46
  |---|---|
47
  | `model-0000X-of-00007.safetensors` + index | **Merged FP8 full weights** (base + LoRA, blockwise-FP8 re-quantized). Same tensor layout and quantization format as the base — drop-in replacement |
48
+ | `adapter/` | **LoRA adapter** (112 MB, PEFT format, 992 tensors). Exact training artifact for inspection and further training — serve the merged weights instead |
49
  | `MERGE_REPORT.md` | Merge provenance: digests, shard SHA-256, re-quantization error stats, output-equivalence probes |
50
  | `EVALUATION.md` | Measured capability matrix and 5-model external comparison |
51
  | `USAGE.md` | Loading, domain tags, temperature guidance, troubleshooting |
 
111
 
112
  The merged checkpoint uses the same blockwise FP8 (e4m3, 128×128 scales) format as the base — any runtime that loads `Qwen/Qwen3.8-27B-FP8` loads this without changes.
113
 
114
+ **Deployment notes (tested on vLLM 0.27.1):** give domain-computation requests `max_tokens ≥ 4096` — the model reasons before answering, and a 1024 budget is exhausted by the reasoning chain (`finish_reason=length`, empty content). With vLLM's `--reasoning-parser qwen3` the final answer arrives in `content` and reasoning in `reasoning_content`.
115
 
116
+ ### The adapter (research artifact — not a serving path)
 
 
117
 
118
+ The `adapter/` directory holds the exact training artifact (PEFT format, 112 MB) for inspection, provenance and further training. It is **not** a drop-in serving path: plain transformers cannot load the blockwise-FP8 base, and vLLM's LoRA kernels do not cover this architecture's hybrid linear-attention projections (`in_proj_*`, `out_proj`) — 5 of 12 target module types would be silently skipped, corrupting behavior. **Serve the merged weights.**
 
 
 
119
 
120
  > **Do not run `merge_and_unload()` on the FP8 base yourself.** The base stores weights as blockwise-FP8 codes with 128×128 scales; a naive PEFT merge adds a BF16 delta directly onto FP8 codes and silently corrupts the weights. Use the merged checkpoint provided here — it was produced by dequantize → add delta → re-quantize with per-block scale recomputation and verified against the adapter (see `MERGE_REPORT.md`).
121
 
 
222
  | 路径 | 内容 |
223
  |---|---|
224
  | `model-0000X-of-00007.safetensors` + index | **合并 FP8 全权重**(基座 + LoRA,分块 FP8 重量化)。张量布局与量化格式和基座完全相同——即插即用替换 |
225
+ | `adapter/` | **LoRA 适配器**(112 MB,PEFT 格式,992 张量)。训练精确工件,供检查与继续训练——服务请用合并权重 |
226
  | `MERGE_REPORT.md` | 合并溯源:摘要、分片 SHA-256、重量化误差统计、输出等价探针 |
227
  | `EVALUATION.md` | 实测能力矩阵与五模型外部对比 |
228
  | `USAGE.md` | 加载方式、域标记、温度建议、故障排查 |
 
288
 
289
  合并检查点与基座采用完全相同的分块 FP8(e4m3,128×128 块尺度)格式——任何能加载 `Qwen/Qwen3.8-27B-FP8` 的运行时均可直接加载本仓库,无需改动。
290
 
291
+ **部署要点(已在 vLLM 0.27.1 实测)**:域计算请求的 `max_tokens` 应给到 **4096 以上**——模型先思考后作答,1024 预算会被思考链耗尽(`finish_reason=length`、正文为空)。vLLM 配 `--reasoning-parser qwen3` 时,最终答案在 `content`、推理在 `reasoning_content`。
292
 
293
+ ### 适配器(研究工件——非服务路径)
 
 
294
 
295
+ `adapter/` 目录保存训练时的精确工件(PEFT 格式,112 MB),供检查、溯源与继续训练使用。它**���是**即插即用的服务路径:原生 transformers 无法加载分块 FP8 基座;vLLM 的 LoRA 内核不覆盖本架构混合线性注意力投影(`in_proj_*`、`out_proj`)——12 类目标模块中 5 类会被静默跳过、损坏行为。**服务请使用合并权重。**
 
 
 
296
 
297
  > **不要自行对 FP8 基座执行 `merge_and_unload()`。** 基座权重以分块 FP8 码 + 128×128 块尺度存储;朴素 PEFT 合并会把 BF16 增量直接加到 FP8 码上,静默损坏权重。请使用本仓库提供的合并检查点——它按「反量化 → 加增量 → 按块重量化」生成,并经与适配器的等价探针验证(见 `MERGE_REPORT.md`)。
298