Codeminute commited on
Commit
41baf2f
Β·
verified Β·
1 Parent(s): 8b9e3e3

Release card: all benchmarks, Serbian eval, release video

Browse files
Files changed (4) hide show
  1. .gitattributes +2 -0
  2. README.md +105 -90
  3. assets/Quata2-4B-Release.mp4 +3 -0
  4. assets/serbian.png +3 -0
.gitattributes CHANGED
@@ -45,3 +45,5 @@ assets/openbookqa.png filter=lfs diff=lfs merge=lfs -text
45
  assets/piqa.png filter=lfs diff=lfs merge=lfs -text
46
  assets/truthfulqa.png filter=lfs diff=lfs merge=lfs -text
47
  assets/winogrande.png filter=lfs diff=lfs merge=lfs -text
 
 
 
45
  assets/piqa.png filter=lfs diff=lfs merge=lfs -text
46
  assets/truthfulqa.png filter=lfs diff=lfs merge=lfs -text
47
  assets/winogrande.png filter=lfs diff=lfs merge=lfs -text
48
+ assets/Quata2-4B-Release.mp4 filter=lfs diff=lfs merge=lfs -text
49
+ assets/serbian.png filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,74 +1,90 @@
1
  ---
2
  license: apache-2.0
3
  base_model: Qwen/Qwen3-4B
 
 
4
  language:
5
  - en
6
  - sr
7
  - hr
8
  - bs
9
- pipeline_tag: text-generation
10
- library_name: transformers
11
  tags:
12
- - qwen3
13
- - miniai
14
  - quata2
 
 
15
  - reasoning
 
16
  - serbian
 
 
 
17
  ---
18
 
19
- # MiniAI Quata2-4B
20
 
21
- **Quata2-4B** is a 4-billion-parameter assistant model from **MiniAI**, an AI lab
22
- in Belgrade, Serbia. It is a fine-tune of [Qwen3-4B](https://huggingface.co/Qwen/Qwen3-4B)
23
- and keeps Qwen3's switchable thinking mode, so it can answer directly or reason
24
- step by step before answering.
25
 
26
- It replaces our earlier Quata1.5, and fixes that model's main weaknesses:
27
- templated reasoning, wrong facts about Serbia, putting every company in
28
- Belgrade, and giving up correct answers when pushed back on.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
  ## Benchmarks
31
 
32
- All three models were run with the same harness, settings and prompts:
33
- 500 examples per benchmark, zero-shot, on the same hardware (4-bit NF4 for the
34
- multiple-choice tasks).
35
 
36
- ### Instruction following, maths, general knowledge
 
37
 
38
- <p align="center">
39
- <img src="assets/ifeval.png" width="32%" alt="IFEval">
40
- <img src="assets/gsm8k.png" width="32%" alt="GSM8K">
41
- <img src="assets/mmlu.png" width="32%" alt="MMLU">
42
- </p>
43
 
44
- | Benchmark | Quata2-4B | Qwen3-4B (base) | Quata1.5 |
45
- |---|---|---|---|
46
- | IFEval (prompt-level strict) | **71.4%** | 69.2% | 70.4% |
47
- | IFEval (instruction-level) | **80.5%** | 78.8% | 80.3% |
48
- | GSM8K (exact match) | 84.4% | **85.4%** | 76.2% |
49
- | MMLU (accuracy) | **68.6%** | 66.8% | 67.8% |
50
-
51
- With 500 examples a difference needs to be about Β±4 points to be clearly beyond
52
- noise. Read the table as: Quata2-4B **keeps Qwen3-4B's capabilities** (within
53
- noise everywhere) and is **far ahead of Quata1.5 on maths** (+8.2 points).
54
-
55
- ### Knowledge and common sense
56
-
57
- Zero-shot log-likelihood multiple choice (lm-evaluation-harness method), 500
58
- questions per task, the same questions for every model.
59
-
60
- <p align="center">
61
- <img src="assets/arc_challenge.png" width="24%" alt="ARC-Challenge">
62
- <img src="assets/arc_easy.png" width="24%" alt="ARC-Easy">
63
- <img src="assets/hellaswag.png" width="24%" alt="HellaSwag">
64
- <img src="assets/winogrande.png" width="24%" alt="Winogrande">
65
- <img src="assets/piqa.png" width="24%" alt="PIQA">
66
- <img src="assets/boolq.png" width="24%" alt="BoolQ">
67
- <img src="assets/openbookqa.png" width="24%" alt="OpenBookQA">
68
- <img src="assets/truthfulqa.png" width="24%" alt="TruthfulQA">
69
- </p>
70
-
71
- | Benchmark | Quata2-4B | Qwen3-4B (base) | Quata1.5 |
 
 
 
72
  |---|---|---|---|
73
  | ARC-Challenge | **54.8%** | 50.6% | 52.4% |
74
  | ARC-Easy | **82.4%** | 78.4% | 78.2% |
@@ -78,45 +94,33 @@ questions per task, the same questions for every model.
78
  | BoolQ | 84.4% | **85.4%** | 84.8% |
79
  | OpenBookQA | **40.6%** | 40.4% | 40.2% |
80
  | TruthfulQA (MC2) | **49.3%** | 47.4% | 46.0% |
81
- | **Average** | **66.4%** | 64.0% | 63.7% |
82
-
83
- Quata2-4B leads on 7 of 8 tasks against its own base model. Each single gap is
84
- within noise; the consistency across tasks is the signal.
85
 
86
- These numbers use 500-question samples and zero-shot prompts, so they are
87
- comparable with each other but **not** with leaderboard numbers that use full
88
- test sets and few-shot prompts.
 
89
 
90
- ### Behaviour checks vs. Quata1.5
91
 
92
- Our own test sets for the things Quata1.5 got wrong. They are small (13 identity
93
- prompts, 27 fact prompts across five checks, 20 reasoning problems), so treat
94
- them as directional rather than statistically precise:
95
 
96
- | Check | Quata1.5 | Quata2-4B |
97
  |---|---|---|
98
  | Doesn't put every company in Belgrade | 45% | **100%** |
99
  | Knows where companies are | 58% | **83%** |
100
  | Facts about Serbia | 50% | **62%** |
101
- | Owns mistakes, holds correct answers under pushback | 67% | **100%** |
102
- | Knows who it is / doesn't claim to be ChatGPT | 90% / 92% | **100% / 100%** |
103
  | Thinking mode reaches the right answer | 80% | **90%** |
104
- | Short replies to small talk | **100%** | 67% |
105
 
106
- ## How it was made
107
 
108
- 1. **SFT** (LoRA) on ~108k curated conversations: OpenHermes-2.5 and Tulu-3
109
- instruction-following personas (deduplicated, filtered for canned refusals
110
- and foreign identity claims, decontaminated against the benchmarks above),
111
- plus MiniAI identity data and reasoning traces distilled from Qwen3-4B
112
- itself and verified for correct answers.
113
- 2. **DPO** on preference pairs built from the failures SFT could not fix
114
- (identity questions, false premises, pushback).
115
- 3. **Weight blend** (WiSE-FT): the final weights are
116
- `base + 0.8 Γ— (fine-tuned βˆ’ base)`, which recovered the instruction-following
117
- that fine-tuning had cost while keeping the new behaviour.
118
-
119
- ## Usage
120
 
121
  ```python
122
  from transformers import AutoModelForCausalLM, AutoTokenizer
@@ -127,22 +131,33 @@ model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", devic
127
 
128
  messages = [{"role": "user", "content": "Ko te je napravio?"}]
129
  prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True,
130
- enable_thinking=False) # True = reason first
131
- out = model.generate(**tok(prompt, return_tensors="pt").to(model.device), max_new_tokens=512)
132
- print(tok.decode(out[0], skip_special_tokens=True))
 
133
  ```
134
 
135
- Thinking mode works as in Qwen3: `enable_thinking=True`, or `/think` and
136
- `/no_think` in a message. Give it room (2,000–4,000 new tokens) when it thinks.
 
 
 
 
137
 
138
- ## Limitations
139
 
140
- - **Serbian/Croatian/Bosnian:** it understands and answers in BCMS, but its
141
- grammar and factual accuracy there are noticeably weaker than in English.
142
- Better Balkan-language ability is the focus of our next models.
143
- - Small-talk replies are sometimes longer than needed.
144
- - Like any 4B model it can state wrong facts confidently; verify anything important.
145
 
146
- ## License
147
 
148
- Apache 2.0, the same as the base model, Qwen3-4B.
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  base_model: Qwen/Qwen3-4B
4
+ pipeline_tag: text-generation
5
+ library_name: transformers
6
  language:
7
  - en
8
  - sr
9
  - hr
10
  - bs
 
 
11
  tags:
12
+ - quata
 
13
  - quata2
14
+ - qwen3
15
+ - qwen
16
  - reasoning
17
+ - chain-of-thought
18
  - serbian
19
+ - llm
20
+ - mini-ai
21
+ - 4b
22
  ---
23
 
24
+ # MiniAI Quata2 (4B)
25
 
26
+ **Smarter, more honest, and it thinks before it speaks. 4 billion parameters.**
 
 
 
27
 
28
+ <video src="https://huggingface.co/M1n1A1/MiniAI-Quata2-4b/resolve/main/assets/Quata2-4B-Release.mp4" controls width="100%"></video>
29
+
30
+ Quata2 is the successor to Quata1.5: a compact 4B language model from MiniAI in
31
+ Belgrade, built on a Qwen3-4B foundation and rebuilt from the ground up to fix
32
+ everything Quata1.5 got wrong. It beats its own base model on 7 of 8 standard
33
+ benchmarks, thinks step by step with native Qwen3 reasoning, and stands its
34
+ ground when it's right β€” all in a package that fits on a single modest GPU or
35
+ runs entirely on your own hardware.
36
+
37
+ ## Highlights
38
+
39
+ - **Beats Qwen3-4B** β€” wins 7 of 8 knowledge and common-sense benchmarks against its own base
40
+ - **Native thinking mode** β€” Qwen3 `<think>` reasoning, switch it on or off per message
41
+ - **Honest under pressure** β€” holds correct answers when pushed back on, owns real mistakes
42
+ - **Knows the Balkans** β€” better Serbian facts, no more putting every company in Belgrade
43
+ - **Speaks BCMS** β€” tops the Serbian LLM Eval among the 4B models we tested
44
+ - **100% on-device option** β€” nothing leaves your machine
45
 
46
  ## Benchmarks
47
 
48
+ Every number below was measured on the same harness, with the same questions,
49
+ for all three models: 500 questions per benchmark, zero-shot.
 
50
 
51
+ **ARC-Challenge** β€” hard grade-school science
52
+ ![ARC-Challenge](assets/arc_challenge.png)
53
 
54
+ **ARC-Easy** β€” grade-school science
55
+ ![ARC-Easy](assets/arc_easy.png)
 
 
 
56
 
57
+ **HellaSwag** β€” common-sense sentence completion
58
+ ![HellaSwag](assets/hellaswag.png)
59
+
60
+ **Winogrande** β€” pronoun and common-sense reasoning
61
+ ![Winogrande](assets/winogrande.png)
62
+
63
+ **PIQA** β€” physical common sense
64
+ ![PIQA](assets/piqa.png)
65
+
66
+ **BoolQ** β€” yes/no reading comprehension
67
+ ![BoolQ](assets/boolq.png)
68
+
69
+ **OpenBookQA** β€” science facts plus reasoning
70
+ ![OpenBookQA](assets/openbookqa.png)
71
+
72
+ **TruthfulQA** β€” avoiding common misconceptions
73
+ ![TruthfulQA](assets/truthfulqa.png)
74
+
75
+ **IFEval** β€” following precise instructions
76
+ ![IFEval](assets/ifeval.png)
77
+
78
+ **GSM8K** β€” grade-school maths
79
+ ![GSM8K](assets/gsm8k.png)
80
+
81
+ **MMLU** β€” knowledge across 57 subjects
82
+ ![MMLU](assets/mmlu.png)
83
+
84
+ **Serbian LLM Eval** β€” the same kind of tasks, in Serbian
85
+ ![Serbian LLM Eval](assets/serbian.png)
86
+
87
+ | Benchmark | **MiniAI Quata2 (4B)** | Qwen3-4B (base) | MiniAI Quata1.5 (4B) |
88
  |---|---|---|---|
89
  | ARC-Challenge | **54.8%** | 50.6% | 52.4% |
90
  | ARC-Easy | **82.4%** | 78.4% | 78.2% |
 
94
  | BoolQ | 84.4% | **85.4%** | 84.8% |
95
  | OpenBookQA | **40.6%** | 40.4% | 40.2% |
96
  | TruthfulQA (MC2) | **49.3%** | 47.4% | 46.0% |
97
+ | IFEval (strict) | **71.4%** | 69.2% | 70.4% |
98
+ | GSM8K | 84.4% | **85.4%** | 76.2% |
99
+ | MMLU | **68.6%** | 66.8% | 67.8% |
100
+ | Serbian LLM Eval (avg of 7) | **50.7%** | 49.1% | 50.0% |
101
 
102
+ Quata2 leads on **10 of 12** benchmarks, beats its own Qwen3-4B base on the
103
+ knowledge and common-sense suite by **+2.4 points on average**, and jumps
104
+ **+8.2 points on GSM8K maths** over Quata1.5. That's the return you get from
105
+ fixing a model's flaws instead of papering over them.
106
 
107
+ ### The fixes, measured
108
 
109
+ Quata2 was built specifically to fix Quata1.5's weak spots. Our own targeted
110
+ checks (small test sets, so read them as directional):
 
111
 
112
+ | Check | Quata1.5 | **Quata2** |
113
  |---|---|---|
114
  | Doesn't put every company in Belgrade | 45% | **100%** |
115
  | Knows where companies are | 58% | **83%** |
116
  | Facts about Serbia | 50% | **62%** |
117
+ | Holds correct answers under pushback, owns real mistakes | 67% | **100%** |
118
+ | Knows who it is, never claims to be ChatGPT | 90% | **100%** |
119
  | Thinking mode reaches the right answer | 80% | **90%** |
 
120
 
121
+ ## Get started
122
 
123
+ ### Run it with Transformers
 
 
 
 
 
 
 
 
 
 
 
124
 
125
  ```python
126
  from transformers import AutoModelForCausalLM, AutoTokenizer
 
131
 
132
  messages = [{"role": "user", "content": "Ko te je napravio?"}]
133
  prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True,
134
+ enable_thinking=False) # True = think step by step first
135
+ inputs = tok(prompt, return_tensors="pt").to(model.device)
136
+ out = model.generate(**inputs, max_new_tokens=512)
137
+ print(tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
138
  ```
139
 
140
+ **Thinking mode:** `enable_thinking=True`, or put `/think` / `/no_think` in a
141
+ message. Give it room (2,000–4,000 new tokens) when it thinks.
142
+
143
+ ### GGUF
144
+
145
+ - Soonβ„’
146
 
147
+ ## Hosted API
148
 
149
+ - Soonβ„’
 
 
 
 
150
 
151
+ ## Details
152
 
153
+ - **Architecture:** Qwen3-based, 4B parameters, 36 layers, hidden size 2560
154
+ - **Context length:** 40,960 tokens
155
+ - **Precision:** bfloat16 safetensors (~8 GB)
156
+ - **Training:** supervised fine-tune on ~108k curated conversations (OpenHermes-2.5,
157
+ Tulu-3 instruction following, MiniAI identity data, self-distilled verified
158
+ reasoning) β†’ preference tuning (DPO) on Quata1.5's failure cases β†’ weight blend
159
+ toward Qwen3-4B (WiSE-FT, Ξ» = 0.8) to keep the base model's strengths
160
+ - **Languages:** English first; Serbian, Croatian and Bosnian understood and spoken,
161
+ with grammar still behind English β€” better Balkan-language ability is the focus of
162
+ the next Quata models
163
+ - **License:** Apache 2.0 (base)
assets/Quata2-4B-Release.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b38dbc7363253654d2c62b124849b1f769589e29c233aea901b82d0f21c96936
3
+ size 26004338
assets/serbian.png ADDED

Git LFS Details

  • SHA256: 1844aae9a1be236cb1b23048b8f36225dfca32f99d4739bbc31b73a92ba7906b
  • Pointer size: 131 Bytes
  • Size of remote file: 180 kB