honvert commited on
Commit
e1a8003
·
verified ·
1 Parent(s): e6085ce

docs: update model card for Qwen3.8-27B-DeepResearch

Browse files
Files changed (1) hide show
  1. README.md +100 -100
README.md CHANGED
@@ -1,100 +1,100 @@
1
- ---
2
- license: apache-2.0
3
- base_model: Qwen/Qwen3.8-27B
4
- tags:
5
- - deep-research
6
- - reasoning
7
- - tool-use
8
- - citations
9
- - fact-checking
10
- - science
11
- - chain-of-thought
12
- - qwen3.8
13
- language:
14
- - en
15
- pipeline_tag: text-generation
16
- ---
17
-
18
- # Qwen3.8-27B-DeepResearch
19
-
20
- **Qwen3.8-27B-DeepResearch** is a specialized foundation model post-trained for **deep scientific reasoning, autonomous literature search, evidence synthesis, and citation-grounded question answering**.
21
-
22
- Post-trained using a **Hybrid Supervised Fine-Tuning (SFT) + Direct Preference Optimization (DPO)** pipeline built on top of `Qwen/Qwen3.8-27B`.
23
-
24
- ## Key Capabilities
25
-
26
- 1. **Structured Multi-Step Reasoning (`<thought>`)**: Employs deep chain-of-thought hypothesis testing, error correction, and mathematical derivation before formulating responses.
27
- 2. **Strict Citation Grounding (`[1]`, `[2]`)**: Trained on multi-document retrieval benchmarks (AVeriTeC, ALCE, SciFact) to eliminate citation hallucination and tie claims directly to verified text spans.
28
- 3. **Academic & Scientific Depth**: Excels in ingesting and synthesizing literature across physics, biomedicine, chemistry, and computer science.
29
- 4. **General Helpfulness & Alignment**: Tuned with HelpSteer2 multi-attribute preferences to ensure high clarity, minimal verbosity, and zero sycophancy.
30
-
31
- ---
32
-
33
- ## Prompt Format
34
-
35
- Qwen3.8-27B-DeepResearch follows the standard ChatML structure with an internal `<thought>` reasoning trace:
36
-
37
- ```text
38
- <|im_start|>system
39
- You are a deeply researchful, rigorous, and helpful AI assistant. Always reason thoroughly inside <thought>...</thought> before delivering factual, structured responses with precise citations [1], [2].
40
- <|im_end|>
41
- <|im_start|>user
42
- Compare the mechanisms of mRNA-1273 and BNT162b2 lipid nanoparticles in cellular uptake, citing relevant literature.
43
- <|im_end|>
44
- <|im_start|>assistant
45
- <thought>
46
- Deconstruct lipid nanoparticle formulations:
47
- - mRNA-1273 (Moderna): SM-102, DSPC, cholesterol, PEG2000-DMG (50:10:38.5:1.5 molar ratio).
48
- - BNT162b2 (Pfizer/BioNTech): ALC-0315, DSPC, cholesterol, ALC-0159 (46.3:9.4:42.7:1.6 molar ratio).
49
- Examine endocytosis pathway: macropinocytosis vs clathrin-mediated uptake, endosomal escape kinetics.
50
- Formulate grounded response with clear citations.
51
- </thought>
52
- Both mRNA-1273 and BNT162b2 deliver nucleoside-modified mRNA encapsulated within ionizable lipid nanoparticles (LNPs) [1]...
53
- ```
54
-
55
- ---
56
-
57
- ## Inference with Transformers & vLLM
58
-
59
- ### Using Hugging Face Transformers
60
-
61
- ```python
62
- import torch
63
- from transformers import AutoModelForCausalLM, AutoTokenizer
64
- from peft import PeftModel
65
-
66
- base_model_id = "Qwen/Qwen3.8-27B"
67
- adapter_id = "honvert/Qwen3.8-27B-DeepResearch"
68
-
69
- tokenizer = AutoTokenizer.from_pretrained(adapter_id)
70
- base_model = AutoModelForCausalLM.from_pretrained(
71
- base_model_id,
72
- torch_dtype=torch.bfloat16,
73
- device_map="auto"
74
- )
75
- model = PeftModel.from_pretrained(base_model, adapter_id)
76
-
77
- messages = [
78
- {"role": "system", "content": "You are a deeply researchful and helpful AI assistant."},
79
- {"role": "user", "content": "Synthesize recent findings on superconducting hydride materials at megabar pressures."}
80
- ]
81
-
82
- text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
83
- inputs = tokenizer([text], return_tensors="pt").to(model.device)
84
-
85
- outputs = model.generate(**inputs, max_new_tokens=2048, temperature=0.6, top_p=0.95)
86
- print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
87
- ```
88
-
89
- ---
90
-
91
- ## Training Details
92
-
93
- * **Base Model**: `Qwen/Qwen3.8-27B` (Apache 2.0)
94
- * **Methodology**: LoRA (Rank 64, Alpha 128, all linear layers)
95
- * **Dataset Recipe**:
96
- * 35% Deep Reasoning & Chain-of-Thought (`OpenThoughts3`, `OpenR1-Math`)
97
- * 30% Web Search, Tool Execution & Citations (`AVeriTeC`, `ALCE`, `FactCheck`)
98
- * 20% Scientific Paper Synthesis (`SciFact`, `PubMedQA`, `S2ORC`)
99
- * 15% Multi-Attribute Helpfulness (`HelpSteer2`)
100
- * **License**: Apache 2.0
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Qwen/Qwen3.8-27B
4
+ tags:
5
+ - deep-research
6
+ - reasoning
7
+ - tool-use
8
+ - citations
9
+ - fact-checking
10
+ - science
11
+ - chain-of-thought
12
+ - qwen3.8
13
+ language:
14
+ - en
15
+ pipeline_tag: text-generation
16
+ ---
17
+
18
+ # Qwen3.8-27B-DeepResearch
19
+
20
+ **Qwen3.8-27B-DeepResearch** is a specialized foundation model post-trained for **deep scientific reasoning, autonomous literature search, evidence synthesis, and citation-grounded question answering**.
21
+
22
+ Post-trained using a **Hybrid Supervised Fine-Tuning (SFT) + Direct Preference Optimization (DPO)** pipeline built on top of `Qwen/Qwen3.8-27B`.
23
+
24
+ ## Key Capabilities
25
+
26
+ 1. **Structured Multi-Step Reasoning (`<thought>`)**: Employs deep chain-of-thought hypothesis testing, error correction, and mathematical derivation before formulating responses.
27
+ 2. **Strict Citation Grounding (`[1]`, `[2]`)**: Trained on multi-document retrieval benchmarks (AVeriTeC, ALCE, SciFact) to eliminate citation hallucination and tie claims directly to verified text spans.
28
+ 3. **Academic & Scientific Depth**: Excels in ingesting and synthesizing literature across physics, biomedicine, chemistry, and computer science.
29
+ 4. **General Helpfulness & Alignment**: Tuned with HelpSteer2 multi-attribute preferences to ensure high clarity, minimal verbosity, and zero sycophancy.
30
+
31
+ ---
32
+
33
+ ## Prompt Format
34
+
35
+ Qwen3.8-27B-DeepResearch follows the standard ChatML structure with an internal `<thought>` reasoning trace:
36
+
37
+ ```text
38
+ <|im_start|>system
39
+ You are a deeply researchful, rigorous, and helpful AI assistant. Always reason thoroughly inside <thought>...</thought> before delivering factual, structured responses with precise citations [1], [2].
40
+ <|im_end|>
41
+ <|im_start|>user
42
+ Compare the mechanisms of mRNA-1273 and BNT162b2 lipid nanoparticles in cellular uptake, citing relevant literature.
43
+ <|im_end|>
44
+ <|im_start|>assistant
45
+ <thought>
46
+ Deconstruct lipid nanoparticle formulations:
47
+ - mRNA-1273 (Moderna): SM-102, DSPC, cholesterol, PEG2000-DMG (50:10:38.5:1.5 molar ratio).
48
+ - BNT162b2 (Pfizer/BioNTech): ALC-0315, DSPC, cholesterol, ALC-0159 (46.3:9.4:42.7:1.6 molar ratio).
49
+ Examine endocytosis pathway: macropinocytosis vs clathrin-mediated uptake, endosomal escape kinetics.
50
+ Formulate grounded response with clear citations.
51
+ </thought>
52
+ Both mRNA-1273 and BNT162b2 deliver nucleoside-modified mRNA encapsulated within ionizable lipid nanoparticles (LNPs) [1]...
53
+ ```
54
+
55
+ ---
56
+
57
+ ## Inference with Transformers & vLLM
58
+
59
+ ### Using Hugging Face Transformers
60
+
61
+ ```python
62
+ import torch
63
+ from transformers import AutoModelForCausalLM, AutoTokenizer
64
+ from peft import PeftModel
65
+
66
+ base_model_id = "Qwen/Qwen3.8-27B"
67
+ adapter_id = "honvert/Qwen3.8-27B-DeepResearch"
68
+
69
+ tokenizer = AutoTokenizer.from_pretrained(adapter_id)
70
+ base_model = AutoModelForCausalLM.from_pretrained(
71
+ base_model_id,
72
+ torch_dtype=torch.bfloat16,
73
+ device_map="auto"
74
+ )
75
+ model = PeftModel.from_pretrained(base_model, adapter_id)
76
+
77
+ messages = [
78
+ {"role": "system", "content": "You are a deeply researchful and helpful AI assistant."},
79
+ {"role": "user", "content": "Synthesize recent findings on superconducting hydride materials at megabar pressures."}
80
+ ]
81
+
82
+ text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
83
+ inputs = tokenizer([text], return_tensors="pt").to(model.device)
84
+
85
+ outputs = model.generate(**inputs, max_new_tokens=2048, temperature=0.6, top_p=0.95)
86
+ print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
87
+ ```
88
+
89
+ ---
90
+
91
+ ## Training Details
92
+
93
+ * **Base Model**: `Qwen/Qwen3.8-27B` (Apache 2.0)
94
+ * **Methodology**: LoRA (Rank 64, Alpha 128, all linear layers)
95
+ * **Dataset Recipe**:
96
+ * 35% Deep Reasoning & Chain-of-Thought (`OpenThoughts3`, `OpenR1-Math`)
97
+ * 30% Web Search, Tool Execution & Citations (`AVeriTeC`, `ALCE`, `FactCheck`)
98
+ * 20% Scientific Paper Synthesis (`SciFact`, `PubMedQA`, `S2ORC`)
99
+ * 15% Multi-Attribute Helpfulness (`HelpSteer2`)
100
+ * **License**: Apache 2.0