DJLougen commited on
Commit
69ffb92
·
verified ·
1 Parent(s): 3f1a04d

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +165 -156
README.md CHANGED
@@ -1,156 +1,165 @@
1
- ---
2
- language:
3
- - en
4
- license: apache-2.0
5
- library_name: transformers
6
- tags:
7
- - reasoning
8
- - qwen3.5
9
- - conversational
10
- - unsloth
11
- - self-correction
12
- - chain-of-thought
13
- base_model: unsloth/Qwen3.5-27B
14
- pipeline_tag: text-generation
15
- ---
16
-
17
- # Harmonic-27B
18
-
19
- ![Harmonic-27B](harmonic27B.jpeg)
20
-
21
- The flagship of the Harmonic series. A reasoning-focused fine-tune of [Qwen 3.5 27B](https://huggingface.co/unsloth/Qwen3.5-27B) trained on the same structurally validated data as [Harmonic-9B](https://huggingface.co/DJLougen/Harmonic-9B) and [Harmonic-2B](https://huggingface.co/DJLougen/Harmonic-2B). Every row passes automated quality gates. No junk, no filler, no shallow traces.
22
-
23
- The name comes from harmonic analysis of reasoning patterns — the structural signal that separates genuine thinking from surface-level chain-of-thought.
24
-
25
- ## Training Approach
26
-
27
- Same pipeline as Harmonic-9B. **799 curated rows** a small, precisely curated dataset instead of tens of thousands of unfiltered examples. The base model already has the knowledge from pretraining the fine-tune teaches it a reasoning behavior pattern.
28
-
29
- Every training row contains explicit self-correction ("wait, that's not right"), verification ("let me check by plugging back in"), and multi-path exploration ("alternatively, I could try..."). The data was generated from multiple frontier models and filtered through a custom structural quality pipeline that enforces reasoning depth, coherence, and flow patterns. 100% of rows pass all quality gates simultaneously.
30
-
31
- ## Training Data Quality
32
-
33
- The same reasoning data as Harmonic-9B and Harmonic-2B, curated using a custom structural process supervision pipeline:
34
-
35
- | Metric | Value |
36
- |---|---|
37
- | Signal quality score | 78.7 mean (61.5 min, 90.0 max) |
38
- | Thinking trace depth | 1,667 words average |
39
- | Self-correction | 100% of rows (17.2 per row avg) |
40
- | Verification | 100% of rows (10.3 per row avg) |
41
- | Exploration | 100% of rows (6.3 per row avg) |
42
- | Quality gate pass rate | 100% |
43
-
44
- ## How It Compares
45
-
46
- We ran our structural quality analysis against every major public reasoning dataset used for Opus/Qwen distillation. The results:
47
-
48
- | Dataset | Rows | Think Words | Self-Correction | Verification | Exploration | Signal Score | Gate Pass |
49
- |---|---|---|---|---|---|---|---|
50
- | **Harmonic (ours)** | **799** | **1,667** | **100%** | **100%** | **100%** | **78.7** | **100%** |
51
- | Crownelius/Opus-3300x | 2,160 | 188 | 5.9% | 22.6% | 5.2% | 28.0 | 0.1% |
52
- | nohurry/Opus-Filtered | 2,326 | 191 | 6.7% | 24.1% | 5.3% | 28.5 | 0.1% |
53
- | TeichAI/Opus-250x | 250 | 323 | 17.2% | 26.8% | 6.8% | 24.6 | 0.4% |
54
- | Jackrong/Qwen-700x | 633 | 6,653 | 97.5% | 97.6% | 69.8% | 75.6 | 22.7% |
55
- | Bespoke-Stratos-17k | 16,710 | 1,322 | 88.2% | 72.7% | 59.7% | 71.7 | 49.0% |
56
- | glaiveai/reasoning-20m | 22M+ | 799 | 64.1% | 41.4% | 37.3% | 46.2 | 12.8% |
57
- | KingNish/reasoning-20k | 19,944 | 132 | 0.7% | 4.2% | 4.3% | 27.4 | 0.0% |
58
-
59
- ## Speculative Decoding
60
-
61
- Harmonic-27B pairs with [Harmonic-2B](https://huggingface.co/DJLougen/Harmonic-2B) for speculative decoding. Both models share the same training data, reasoning format, and architecture family (Qwen 3.5), which keeps draft token acceptance rates high.
62
-
63
- ```python
64
- from transformers import AutoModelForCausalLM
65
-
66
- target = AutoModelForCausalLM.from_pretrained("DJLougen/Harmonic-27B")
67
- draft = AutoModelForCausalLM.from_pretrained("DJLougen/Harmonic-2B")
68
-
69
- outputs = target.generate(
70
- **inputs,
71
- assistant_model=draft,
72
- max_new_tokens=512,
73
- )
74
- ```
75
-
76
- ## Training Configuration
77
-
78
- ```
79
- base_model: unsloth/Qwen3.5-27B
80
- dataset: 799 curated reasoning rows
81
- epochs: 1
82
- learning_rate: 1e-4
83
- lr_scheduler: cosine
84
- warmup_ratio: 0.1
85
- max_seq_length: 8192
86
- lora_rank: 32
87
- lora_alpha: 32
88
- dropout: 0.05
89
- micro_batch_size: 1
90
- gradient_accumulation_steps: 4
91
- weight_decay: 0.01
92
- ```
93
-
94
- ## Usage
95
-
96
- ```python
97
- from transformers import AutoModelForCausalLM, AutoTokenizer
98
-
99
- model = AutoModelForCausalLM.from_pretrained("DJLougen/Harmonic-27B")
100
- tokenizer = AutoTokenizer.from_pretrained("DJLougen/Harmonic-27B")
101
- ```
102
-
103
- ### Reasoning format
104
-
105
- The model uses think blocks for reasoning:
106
-
107
- ```
108
- <|thinking|>
109
- The user is asking about X. Let me consider two approaches...
110
-
111
- Approach 1: ...
112
- Approach 2: ...
113
-
114
- I will go with Approach 1 because...
115
-
116
- Wait, I need to be careful here - this assumes Y, which may not hold.
117
- Let me verify by checking a special case...
118
-
119
- Yes, that confirms the result.
120
- <|/thinking|>
121
-
122
- [Final answer here]
123
- ```
124
-
125
- ## Intended Use
126
-
127
- - Reasoning tasks requiring genuine multi-step thinking
128
- - Mathematical problem-solving with self-correction
129
- - Code analysis and generation with structured verification
130
- - General conversation (conversational ability preserved through training design)
131
- - Target model for speculative decoding with Harmonic-2B
132
- - Base model for Stage 2 agentic fine-tuning
133
-
134
- ## Limitations
135
-
136
- - Reasoning traces can be verbose for simple questions
137
- - Not optimized for tool calling — see [Harmonic-Hermes-9B](https://huggingface.co/DJLougen/Harmonic-Hermes-9B) for agentic use
138
- - Benchmark evaluation is ongoing
139
-
140
- ## Architecture
141
-
142
- - **Base**: Qwen 3.5 27B (27.36B parameters)
143
- - **Training**: LoRA fine-tuning, merged into base weights
144
- - **Precision**: BF16
145
- - **Context**: 8192 tokens
146
-
147
- ## License
148
-
149
- Apache 2.0 — same as the base model. All training data is from Apache 2.0 or MIT licensed sources. Fully commercial use permitted.
150
-
151
- ## Links
152
-
153
- - 9B variant: [DJLougen/Harmonic-9B](https://huggingface.co/DJLougen/Harmonic-9B)
154
- - 9B GGUF: [DJLougen/Harmonic-9B-GGUF](https://huggingface.co/DJLougen/Harmonic-9B-GGUF)
155
- - 2B draft model: [DJLougen/Harmonic-2B](https://huggingface.co/DJLougen/Harmonic-2B)
156
- - Agentic variant: [DJLougen/Harmonic-Hermes-9B](https://huggingface.co/DJLougen/Harmonic-Hermes-9B)
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ library_name: transformers
6
+ tags:
7
+ - reasoning
8
+ - qwen3.5
9
+ - conversational
10
+ - unsloth
11
+ - self-correction
12
+ - chain-of-thought
13
+ base_model: unsloth/Qwen3.5-27B
14
+ pipeline_tag: text-generation
15
+ ---
16
+ # Harmonic-27B
17
+
18
+ ![Harmonic-27B](harmonic27B.jpeg)
19
+
20
+ The flagship of the Harmonic series. A reasoning-focused fine-tune of [Qwen 3.5 27B](https://huggingface.co/unsloth/Qwen3.5-27B) trained on the same structurally validated data as [Harmonic-9B](https://huggingface.co/DJLougen/Harmonic-9B) and [Harmonic-2B](https://huggingface.co/DJLougen/Harmonic-2B). Every row passes automated quality gates. No junk, no filler, no shallow traces.
21
+
22
+ The name comes from harmonic analysis of reasoning patterns — the structural signal that separates genuine thinking from surface-level chain-of-thought.
23
+
24
+
25
+ ## Support This Work
26
+
27
+ I'm a PhD student in visual neuroscience at the University of Toronto who also happens to spend way too much time fine-tuning, merging, and quantizing open-weight models on rented H100s and a local DGX Spark. All training compute is self-funded balancing GPU costs against a student budget. If my uploads have been useful to you, consider buying a PhD student a coffee. It goes a long way toward keeping these experiments running.
28
+
29
+ **[Support on Ko-fi](https://ko-fi.com/djlougen)**
30
+
31
+ ---
32
+
33
+
34
+ ## Training Approach
35
+
36
+ Same pipeline as Harmonic-9B. **799 curated rows** — a small, precisely curated dataset instead of tens of thousands of unfiltered examples. The base model already has the knowledge from pretraining — the fine-tune teaches it a reasoning behavior pattern.
37
+
38
+ Every training row contains explicit self-correction ("wait, that's not right"), verification ("let me check by plugging back in"), and multi-path exploration ("alternatively, I could try..."). The data was generated from multiple frontier models and filtered through a custom structural quality pipeline that enforces reasoning depth, coherence, and flow patterns. 100% of rows pass all quality gates simultaneously.
39
+
40
+ ## Training Data Quality
41
+
42
+ The same reasoning data as Harmonic-9B and Harmonic-2B, curated using a custom structural process supervision pipeline:
43
+
44
+ | Metric | Value |
45
+ |---|---|
46
+ | Signal quality score | 78.7 mean (61.5 min, 90.0 max) |
47
+ | Thinking trace depth | 1,667 words average |
48
+ | Self-correction | 100% of rows (17.2 per row avg) |
49
+ | Verification | 100% of rows (10.3 per row avg) |
50
+ | Exploration | 100% of rows (6.3 per row avg) |
51
+ | Quality gate pass rate | 100% |
52
+
53
+ ## How It Compares
54
+
55
+ We ran our structural quality analysis against every major public reasoning dataset used for Opus/Qwen distillation. The results:
56
+
57
+ | Dataset | Rows | Think Words | Self-Correction | Verification | Exploration | Signal Score | Gate Pass |
58
+ |---|---|---|---|---|---|---|---|
59
+ | **Harmonic (ours)** | **799** | **1,667** | **100%** | **100%** | **100%** | **78.7** | **100%** |
60
+ | Crownelius/Opus-3300x | 2,160 | 188 | 5.9% | 22.6% | 5.2% | 28.0 | 0.1% |
61
+ | nohurry/Opus-Filtered | 2,326 | 191 | 6.7% | 24.1% | 5.3% | 28.5 | 0.1% |
62
+ | TeichAI/Opus-250x | 250 | 323 | 17.2% | 26.8% | 6.8% | 24.6 | 0.4% |
63
+ | Jackrong/Qwen-700x | 633 | 6,653 | 97.5% | 97.6% | 69.8% | 75.6 | 22.7% |
64
+ | Bespoke-Stratos-17k | 16,710 | 1,322 | 88.2% | 72.7% | 59.7% | 71.7 | 49.0% |
65
+ | glaiveai/reasoning-20m | 22M+ | 799 | 64.1% | 41.4% | 37.3% | 46.2 | 12.8% |
66
+ | KingNish/reasoning-20k | 19,944 | 132 | 0.7% | 4.2% | 4.3% | 27.4 | 0.0% |
67
+
68
+ ## Speculative Decoding
69
+
70
+ Harmonic-27B pairs with [Harmonic-2B](https://huggingface.co/DJLougen/Harmonic-2B) for speculative decoding. Both models share the same training data, reasoning format, and architecture family (Qwen 3.5), which keeps draft token acceptance rates high.
71
+
72
+ ```python
73
+ from transformers import AutoModelForCausalLM
74
+
75
+ target = AutoModelForCausalLM.from_pretrained("DJLougen/Harmonic-27B")
76
+ draft = AutoModelForCausalLM.from_pretrained("DJLougen/Harmonic-2B")
77
+
78
+ outputs = target.generate(
79
+ **inputs,
80
+ assistant_model=draft,
81
+ max_new_tokens=512,
82
+ )
83
+ ```
84
+
85
+ ## Training Configuration
86
+
87
+ ```
88
+ base_model: unsloth/Qwen3.5-27B
89
+ dataset: 799 curated reasoning rows
90
+ epochs: 1
91
+ learning_rate: 1e-4
92
+ lr_scheduler: cosine
93
+ warmup_ratio: 0.1
94
+ max_seq_length: 8192
95
+ lora_rank: 32
96
+ lora_alpha: 32
97
+ dropout: 0.05
98
+ micro_batch_size: 1
99
+ gradient_accumulation_steps: 4
100
+ weight_decay: 0.01
101
+ ```
102
+
103
+ ## Usage
104
+
105
+ ```python
106
+ from transformers import AutoModelForCausalLM, AutoTokenizer
107
+
108
+ model = AutoModelForCausalLM.from_pretrained("DJLougen/Harmonic-27B")
109
+ tokenizer = AutoTokenizer.from_pretrained("DJLougen/Harmonic-27B")
110
+ ```
111
+
112
+ ### Reasoning format
113
+
114
+ The model uses think blocks for reasoning:
115
+
116
+ ```
117
+ <|thinking|>
118
+ The user is asking about X. Let me consider two approaches...
119
+
120
+ Approach 1: ...
121
+ Approach 2: ...
122
+
123
+ I will go with Approach 1 because...
124
+
125
+ Wait, I need to be careful here - this assumes Y, which may not hold.
126
+ Let me verify by checking a special case...
127
+
128
+ Yes, that confirms the result.
129
+ <|/thinking|>
130
+
131
+ [Final answer here]
132
+ ```
133
+
134
+ ## Intended Use
135
+
136
+ - Reasoning tasks requiring genuine multi-step thinking
137
+ - Mathematical problem-solving with self-correction
138
+ - Code analysis and generation with structured verification
139
+ - General conversation (conversational ability preserved through training design)
140
+ - Target model for speculative decoding with Harmonic-2B
141
+ - Base model for Stage 2 agentic fine-tuning
142
+
143
+ ## Limitations
144
+
145
+ - Reasoning traces can be verbose for simple questions
146
+ - Not optimized for tool calling — see [Harmonic-Hermes-9B](https://huggingface.co/DJLougen/Harmonic-Hermes-9B) for agentic use
147
+ - Benchmark evaluation is ongoing
148
+
149
+ ## Architecture
150
+
151
+ - **Base**: Qwen 3.5 27B (27.36B parameters)
152
+ - **Training**: LoRA fine-tuning, merged into base weights
153
+ - **Precision**: BF16
154
+ - **Context**: 8192 tokens
155
+
156
+ ## License
157
+
158
+ Apache 2.0 — same as the base model. All training data is from Apache 2.0 or MIT licensed sources. Fully commercial use permitted.
159
+
160
+ ## Links
161
+
162
+ - 9B variant: [DJLougen/Harmonic-9B](https://huggingface.co/DJLougen/Harmonic-9B)
163
+ - 9B GGUF: [DJLougen/Harmonic-9B-GGUF](https://huggingface.co/DJLougen/Harmonic-9B-GGUF)
164
+ - 2B draft model: [DJLougen/Harmonic-2B](https://huggingface.co/DJLougen/Harmonic-2B)
165
+ - Agentic variant: [DJLougen/Harmonic-Hermes-9B](https://huggingface.co/DJLougen/Harmonic-Hermes-9B)