Text Generation
Transformers
Safetensors
English
Chinese
qwen3_5
image-text-to-text
qwen
28B
Dense
lora
reinforcement-learning
fp8
agentic-coding
scientific-computing
physics
materials-science
genetics
conversational
Instructions to use HoomanBio2021/LabOpen-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HoomanBio2021/LabOpen-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HoomanBio2021/LabOpen-v1") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("HoomanBio2021/LabOpen-v1") model = AutoModelForMultimodalLM.from_pretrained("HoomanBio2021/LabOpen-v1", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HoomanBio2021/LabOpen-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HoomanBio2021/LabOpen-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HoomanBio2021/LabOpen-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HoomanBio2021/LabOpen-v1
- SGLang
How to use HoomanBio2021/LabOpen-v1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "HoomanBio2021/LabOpen-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HoomanBio2021/LabOpen-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "HoomanBio2021/LabOpen-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HoomanBio2021/LabOpen-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HoomanBio2021/LabOpen-v1 with Docker Model Runner:
docker model run hf.co/HoomanBio2021/LabOpen-v1
Upload README.md with huggingface_hub
Browse files
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).
|
| 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 |
-
|
| 108 |
|
| 109 |
-
|
| 110 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 111 |
-
from peft import PeftModel
|
| 112 |
|
| 113 |
-
|
| 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 |
-
|
| 292 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 293 |
-
from peft import PeftModel
|
| 294 |
|
| 295 |
-
|
| 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 |
|