File size: 11,185 Bytes
a2ee815
0664ff1
202075c
 
f2e9275
65958a3
202075c
 
 
 
 
 
 
65958a3
0664ff1
0097c74
202075c
12839aa
202075c
 
 
 
 
 
2b02981
202075c
65958a3
 
 
 
 
 
 
 
 
 
 
 
 
202075c
 
 
 
9e1d4eb
65958a3
 
cb0d509
65958a3
cb0d509
65958a3
cb0d509
 
 
39b898f
188d55e
 
 
 
cb0d509
 
65958a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202075c
 
 
 
 
 
 
0097c74
65958a3
0097c74
65958a3
0097c74
dd7a4bc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
---
license: apache-2.0
base_model:
- Qwen/Qwen3.5-4B
pipeline_tag: image-text-to-text
library_name: transformers
tags:
- efficient
- qwen
- qwen3.5
- nomi
- lazyloopstudio
- unsloth
- nomi2
---

<p align="center">
  <img src="https://cdn-uploads.huggingface.co/production/uploads/6921fa6332f7fb129563d495/aR36SrpWzksbcGbcp84pE.png" width="128">
</p>

# Nomi 2.0

## Introduction

Introducing **Nomi 2**, an 4B LLM based on **Qwen 3.5 4B**, that thinks more efficient while keeping great performance.

In this training, we used another base and improved it's reasoning. It's base, Qwen 3.5 4B was great, but overthought most of the requests und looped.
**Nomi 2** fixes that. 
Even at more complicated prompts it only thinks for about 10 sec on consumer hardware (~500 Reasoning tokens).

Nomi 2 works by using one specific reasoning style:
Instead of human like CoT, Nomi uses what I like to call **RASV**.
In it's reasoning, it got 4 main parts:
- Restatement
- Approach
- Step-by-step derivation
- Verification

These steps help the LLM to **keep the reasoning short, while keeping it effective, and avoiding loops.**

## 🌟 Key Features & Improvements

* **Architecture:** Qwen-3.5-4B (runs on 8 GB VRAM GPUs like the RTX 4060).
* **Multilingual Support:** Can understand and generate text in German and English and many other languages.
* **Efficiency:** Runs with 60+ Tokens/s at Q4 with an Context Window of almost 100k tokens on consumer hardware.

## πŸ“ƒ Evals and Showcase

### Evals

| Model Name | GSM8K* | GPQA Diamond (0-Shot)*
| --- | --- | --- |
| Nomi 2.0 | 41/100 | 32/50

<details>
  <summary>*</summary>
  Benchmarks were done without reasoning (didn't got it to work) and only the first 100/50 Questions of the Benchmark were used.
</details>

### Reasoning Style Showcase

Q: What is 8x8x8+43+(432+432x3)-39?

<details>
<summary>Nomi</summary>
<div style="background-color: #616161; padding: 12px; border-radius: 8px;">

## Restatement
We need to evaluate the arithmetic expression 8 Γ— 8 Γ— 8 + 43 + (432 + 432 Γ— 3) βˆ’ 39. The operations include multiplication, addition, and subtraction, and we must apply the standard order of operations (PEMDAS/BODMAS).

## Approach
Multiplication has higher precedence than addition and subtraction, so we compute all products first, then handle the parentheses grouping, then add/subtract from left to right. Specifically:
- Inside the parentheses: 432 Γ— 3 first, then add 432
- Outside: 8 Γ— 8 Γ— 8, then combine everything

## Step-by-step derivation
**Step 1 β€” Inside parentheses:** 432 Γ— 3 = 1296. Then 432 + 1296 = 1728. So (432 + 432 Γ— 3) = 1728.

**Step 2 β€” Outside:** 8 Γ— 8 Γ— 8 = 64 Γ— 8 = 512.

**Step 3 β€” Combine:** 512 + 43 + 1728 βˆ’ 39.
- 512 + 43 = 555
- 555 + 1728 = 2283
- 2283 βˆ’ 39 = 2244

**Answer: 2244.**

## Verification
Check by recombining: 512 + 43 + 1728 = 2283, and 2283 βˆ’ 39 = 2244. Alternatively, note 512 + 1728 = 2240, then 2240 + 43 βˆ’ 39 = 2240 + 4 = 2244. Both methods agree.
</div>
  
**2244**

To evaluate 8 Γ— 8 Γ— 8 + 43 + (432 + 432 Γ— 3) βˆ’ 39, we follow the order of operations: multiplication first, then parentheses, then addition and subtraction from left to right.

Inside the parentheses, we compute 432 Γ— 3 = 1296, then 432 + 1296 = 1728. Outside, we compute 8 Γ— 8 Γ— 8 = 64 Γ— 8 = 512. The expression now reads 512 + 43 + 1728 βˆ’ 39.

Adding from left to right: 512 + 43 = 555, then 555 + 1728 = 2283, and finally 2283 βˆ’ 39 = 2244.

As a sanity check, I can reorder the additions: 512 + 1728 = 2240, and 2240 + 43 βˆ’ 39 = 2240 + 4 = 2244. The two independent paths give the same result, confirming the answer.

</details>
<details>
<summary>Qwen</summary>
<div style="background-color: #616161; padding: 12px; border-radius: 8px;">

Here's my thought process for solving this math problem:

1.  **Analyze the Request:** The user wants to solve a specific arithmetic expression: $8 \times 8 \times 8 + 43 + (432 + 432 \times 3) - 39$.

2.  **Identify the Operations:** I need to perform multiplication, addition, and subtraction.
3.  **Apply Order of Operations (PEMDAS/BODMAS):**
    *   **P/B:** Parentheses/Brackets. I need to solve the expression inside the parentheses first.
    *   **E/O:** Exponents/Orders. There are none here (unless $8 \times 8 \times 8$ is interpreted as a power, but standard notation implies multiplication).
    *   **MD/DM:** Multiplication and Division (left to right).
    *   **AS:** Addition and Subtraction (left to right).

4.  **Step-by-Step Breakdown:**

    *   **Expression:** $8 \times 8 \times 8 + 43 + (432 + 432 \times 3) - 39$

    *   **Step 1: Parentheses**
        *   Inside the parentheses: $(432 + 432 \times 3)$
        *   Within the parentheses, multiplication comes before addition.
        *   Calculate $432 \times 3$.
            *   $400 \times 3 = 1200$
            *   $30 \times 3 = 90$
            *   $2 \times 3 = 6$
            *   $1200 + 90 + 6 = 1296$
        *   Now add 432 to the result.
            *   $432 + 1296$
            *   $2 + 6 = 8$
            *   $3 + 9 = 12$ (carry 1)
            *   $4 + 2 + 1 = 7$
            *   $1$
            *   Result: $1728$
        *   So, the expression becomes: $8 \times 8 \times 8 + 43 + 1728 - 39$

    *   **Step 2: Multiplication (outside the parentheses)**
        *   Calculate $8 \times 8 \times 8$.
        *   $8 \times 8 = 64$
        *   $64 \times 8 = 512$
        *   (Note: $8^3 = 512$)
        *   The expression becomes: $512 + 43 + 1728 - 39$

    *   **Step 3: Addition and Subtraction (Left to Right)**
        *   Current expression: $512 + 43 + 1728 - 39$
        *   First addition: $512 + 43$
            *   $512 + 40 = 552$
            *   $552 + 3 = 555$
        *   Current expression: $555 + 1728 - 39$
        *   Second addition: $555 + 1728$
            *   $500 + 1700 = 2200$
            *   $55 + 28 = 83$
            *   $2200 + 83 = 2283$
        *   Current expression: $2283 - 39$
        *   Final subtraction: $2283 - 39$
            *   $2283 - 30 = 2253$
            *   $2253 - 9 = 2244$
            *   Alternatively: $2283 - 40 + 1 = 2243 + 1 = 2244$

5.  **Double Check:**
    *   Original: $8 \times 8 \times 8 + 43 + (432 + 432 \times 3) - 39$
    *   $8^3 = 512$
    *   $432 \times 3 = 1296$
    *   $432 + 1296 = 1728$
    *   Sum so far: $512 + 43 + 1728 - 39$
    *   $512 + 43 = 555$
    *   $555 + 1728 = 2283$
    *   $2283 - 39 = 2244$

    *   Wait, let me re-read the expression carefully.
    *   $8 \times 8 \times 8 + 43 + (432 + 432 \times 3) - 39$
    *   Is it possible the user meant $432 + (432 \times 3)$? Yes, that's what I did.
    *   Is it possible there is a typo in my reading? "8x8x8+43+(432+432x3)-39"
    *   Let's check the numbers again.
    *   $512 + 43 = 555$
    *   $432 \times 3 = 1296$
    *   $432 + 1296 = 1728$
    *   $555 + 1728 = 2283$
    *   $2283 - 39 = 2244$

    *   Let's check if there's any ambiguity. "432+432x3" is inside parentheses.
    *   Multiplication takes precedence inside the parentheses.
    *   $432 + 1296 = 1728$. Correct.
    *   $8^3 = 512$. Correct.
    *   $512 + 43 + 1728 - 39$.
    *   $512 + 43 = 555$.
    *   $555 + 1728 = 2283$.
    *   $2283 - 39 = 2244$.

    *   Wait, is there a trick?
    *   $432 + 432 \times 3$...
    *   $432(1+3) = 432 \times 4 = 1728$.
    *   Ah, that's a nice shortcut. $432 \times 4$.
    *   $432 \times 2 = 864$.
    *   $864 \times 2 = 1728$.
    *   Yes, calculation holds up.
    *   $8 \times 8 \times 8 = 512$.
    *   $512 + 43 + 1728 - 39$.
    *   $512 + 1728 = 2240$.
    *   $2240 + 43 = 2283$.
    *   $2283 - 39 = 2244$.
    *   Wait, $2240 + 43 - 39$.
    *   $43 - 39 = 4$.
    *   $2240 + 4 = 2244$.
    *   This confirms the previous calculation ($2283 - 39 = 2244$) but is slightly faster to verify.

6.  **Construct Final Output:**
    *   State the expression.
    *   Show the order of operations steps clearly.
    *   Calculate the power ($8^3$).
    *   Calculate the multiplication inside parentheses.
    *   Add inside parentheses.
    *   Perform the final additions and subtractions.
    *   State the final answer clearly.

7.  **Final Polish:**
    *   Expression: $8 \times 8 \times 8 + 43 + (432 + 432 \times 3) - 39$
    *   Step 1: Parentheses. $432 \times 3 = 1296$. Then $432 + 1296 = 1728$.
    *   Step 2: Multiplication. $8 \times 8 \times 8 = 512$.
    *   Step 3: Remaining additions/subtractions. $512 + 43 + 1728 - 39$.
    *   $555 + 1728 - 39$.
    *   $2283 - 39 = 2244$.

    Looks solid. Ready to write.

    Wait, just a quick sanity check on the numbers.
    $432 + 432 \times 3$.
    $432 \times (1+3) = 432 \times 4$.
    $400 \times 4 = 1600$.
    $32 \times 4 = 128$.
    $1600 + 128 = 1728$.
    Correct.

    $8^3 = 512$.
    Correct.

    $512 + 43 = 555$.
    Correct.

    $555 + 1728 = 2283$.
    Correct.

    $2283 - 39 = 2244$.
    Correct.

    All checks pass.

    Wait, could the input be interpreted differently?
    "8x8x8+43+(432+432x3)-39"
    Is it possible "432" is a variable? No, context implies arithmetic.
    Is it possible "8x8x8" is $8 \times 8 \times 8$? Yes.
    Is it possible the user meant a specific math puzzle with a trick?
    Usually, these are just straight arithmetic.
    The number $432$ is specific.
    $432 \times 3 = 1296$.
    $432 + 1296 = 1728$.
    $8^3 = 512$.
    $512 + 43 + 1728 - 39$.
    Maybe there is a pattern?
    $1728 = 12^3$.
    $512 = 8^3$.
    $43 = 43$.
    $-39$.
    So $8^3 + 43 + 12^3 - 39$.
    $8^3 + 12^3 + (43 - 39)$.
    $512 + 1728 + 4$.
    $2240 + 4 = 2244$.
    Interesting, but not a "trick", just observation. The calculation stands.

    Okay, proceed with generating the response.
    Structure:
    1.  State order of operations (PEMDAS).
    2.  Solve parentheses.
    3.  Solve multiplication.
    4.  Solve addition/subtraction.
    5.  Final result.
    Keep it clear and concise.

    Wait, re-read the input string one more time to ensure no typos in my transcription.
    "8x8x8+43+(432+432x3)-39"
    My transcription: $8 \times 8 \times 8 + 43 + (432 + 432 \times 3) - 39$
    Matches perfectly.

    Ready.

</div>


To solve the expression **8x8x8+43+(432+432x3)-39**, we follow the order of operations (PEMDAS/BODMAS): Parentheses, Exponents/Multiplication, then Addition and Subtraction.

**Step 1: Simplify the parentheses**
Inside the parentheses, we have: `(432 + 432x3)`
Multiplication comes before addition.
*   $432 \times 3 = 1296$
*   $432 + 1296 = 1728$

Now the expression looks like this:
$8 \times 8 \times 8 + 43 + 1728 - 39$

**Step 2: Perform the multiplication**
*   $8 \times 8 \times 8 = 512$

Now the expression looks like this:
$512 + 43 + 1728 - 39$

**Step 3: Perform addition and subtraction (left to right)**
*   $512 + 43 = 555$
*   $555 + 1728 = 2283$
*   $2283 - 39 = 2244$

**Answer:**
**2244**

</details>


## 🧠 Training Details

* **Base Model:** `Qwen/Qwen3.5-4B`
* **Fine-tuning:** SFT (Supervised Fine-Tuning).
* **Training Tool:** **Unsloth** (for 4-bit optimized training).


## 😎 Cool License

**Feel free to use or improve Nomi! Benchmark results are always welcome.**

---