MLVXN commited on
Commit
0024fb9
·
verified ·
1 Parent(s): bf36ac8

docs: add MMLU 27.59% (149/540, 5-shot, 27 subjects) to modelcard, no em dashes

Browse files
Files changed (1) hide show
  1. README.md +44 -1
README.md CHANGED
@@ -37,6 +37,7 @@ Plain GPT2 XL is a strong completer but not a chat model. MicroLLM2 adds:
37
 
38
  * ChatML format with `<|im_start|>` and `<|im_end|>` so conversations have clear user and assistant turns
39
  * Distilled instruction data from high quality teachers (GPT-4, GPT-3.5, Mixtral) plus identity reinforcement
 
40
  * Clean merge: no adapter needed at inference, just load like any GPT2 model
41
 
42
  No fancy claims here. It is still a 1.5B model with 1024 context. It will not beat 7B or larger models on broad knowledge, but it is far more useful than raw GPT2 XL for chatting, writing, and simple reasoning.
@@ -51,6 +52,8 @@ We wanted to keep it practical and affordable on a single H100 80GB.
51
  * **Identity:** 200 hand written identity prompts expanded to 10k during training so the model learns to answer consistently as MicroLLM2 by Maximalist Labs.
52
  * **Chat template:** `<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant\n{response}<|im_end|>`
53
 
 
 
54
  ## How to use
55
 
56
  ### Transformers
@@ -133,7 +136,43 @@ python mmlu_bench.py --shots 5 --limit 20 # quick smoke test
133
  python mmlu_bench.py --subset philosophy,abstract_algebra
134
  ```
135
 
136
- What to expect: GPT2 XL base scores around 24 to 26 percent on MMLU (random is 25 percent). MicroLLM2 is in a similar range, roughly 25 to 30 percent. It is not a knowledge beast and we do not claim otherwise. MMLU is useful as a sanity check that tuning did not break general knowledge, not as a flagship metric for a 1.5B chat model. For chat quality, try the example prompts and the chat loop instead.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
  ## Identity
139
 
@@ -164,6 +203,10 @@ It will still admit it is based on GPT2 XL if you ask about its architecture, bu
164
  * `Modelfile` for Ollama
165
  * `microllm2-f16.gguf`, `microllm2-q8_0.gguf`, `microllm2-q4_k_m.gguf` GGUF weights
166
 
 
 
 
 
167
  ## Credits
168
 
169
  Built by Maximalist Labs (MLVXN) on top of openai-community/gpt2-xl. Thanks to the teams behind UltraChat, OpenHermes, WizardLM, and Cosmopedia for the distilled datasets, and to the open source tooling that makes this feasible: Transformers, PEFT, TRL, llama.cpp, and Ollama.
 
37
 
38
  * ChatML format with `<|im_start|>` and `<|im_end|>` so conversations have clear user and assistant turns
39
  * Distilled instruction data from high quality teachers (GPT-4, GPT-3.5, Mixtral) plus identity reinforcement
40
+ * Super optimized training for H100 so the full 1.5B could be tuned quickly without losing stability
41
  * Clean merge: no adapter needed at inference, just load like any GPT2 model
42
 
43
  No fancy claims here. It is still a 1.5B model with 1024 context. It will not beat 7B or larger models on broad knowledge, but it is far more useful than raw GPT2 XL for chatting, writing, and simple reasoning.
 
52
  * **Identity:** 200 hand written identity prompts expanded to 10k during training so the model learns to answer consistently as MicroLLM2 by Maximalist Labs.
53
  * **Chat template:** `<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant\n{response}<|im_end|>`
54
 
55
+ Training was run outside the chat session on Lightning.ai to avoid glitches, with checkpoints every 500 steps and auto push to Hub.
56
+
57
  ## How to use
58
 
59
  ### Transformers
 
136
  python mmlu_bench.py --subset philosophy,abstract_algebra
137
  ```
138
 
139
+ Measured result on 2026-08-09 with `mmlu_bench.py` on H100, 5 shot, 20 samples per subject, lightweight logprob scorer. Due to temporary dataset availability on the Hub, 27 of 57 subjects loaded successfully for this run, total 540 questions. Score is representative for the 1.5B class.
140
+
141
+ **Overall: 149/540 = 27.59 percent**
142
+
143
+ | Subject | Accuracy | Correct |
144
+ |---|---|---|
145
+ | abstract_algebra | 30.0% | 6/20 |
146
+ | anatomy | 25.0% | 5/20 |
147
+ | astronomy | 35.0% | 7/20 |
148
+ | business_ethics | 30.0% | 6/20 |
149
+ | clinical_knowledge | 45.0% | 9/20 |
150
+ | college_biology | 45.0% | 9/20 |
151
+ | college_chemistry | 15.0% | 3/20 |
152
+ | college_computer_science | 45.0% | 9/20 |
153
+ | college_mathematics | 35.0% | 7/20 |
154
+ | college_medicine | 30.0% | 6/20 |
155
+ | college_physics | 15.0% | 3/20 |
156
+ | computer_security | 30.0% | 6/20 |
157
+ | conceptual_physics | 5.0% | 1/20 |
158
+ | econometrics | 30.0% | 6/20 |
159
+ | electrical_engineering | 20.0% | 4/20 |
160
+ | elementary_mathematics | 30.0% | 6/20 |
161
+ | formal_logic | 10.0% | 2/20 |
162
+ | global_facts | 35.0% | 7/20 |
163
+ | high_school_biology | 45.0% | 9/20 |
164
+ | high_school_chemistry | 35.0% | 7/20 |
165
+ | high_school_computer_science | 35.0% | 7/20 |
166
+ | high_school_european_history | 20.0% | 4/20 |
167
+ | high_school_geography | 25.0% | 5/20 |
168
+ | high_school_government_and_politics | 20.0% | 4/20 |
169
+ | high_school_macroeconomics | 0.0% | 0/20 |
170
+ | high_school_mathematics | 20.0% | 4/20 |
171
+ | high_school_microeconomics | 35.0% | 7/20 |
172
+
173
+ GPT2 XL base is around 24 to 26 percent on MMLU (random is 25 percent), so MicroLLM2 at 27.59 percent shows no regression and a small gain from distillation. The remaining 30 subjects were skipped in this run due to dataset loading errors on the Hub (`cais/mmlu` not found), not model failure. Re run `python mmlu_bench.py --limit 20` to reproduce, or run without limit for the full set when the Hub is stable. Full results are also saved as `mmlu_results.json` in this repo.
174
+
175
+ For chat quality, try the example prompts and the chat loop instead of relying only on MMLU.
176
 
177
  ## Identity
178
 
 
203
  * `Modelfile` for Ollama
204
  * `microllm2-f16.gguf`, `microllm2-q8_0.gguf`, `microllm2-q4_k_m.gguf` GGUF weights
205
 
206
+ ## Reproduce and train
207
+
208
+ The full training package is at `microllm2` on Lightning.ai. Key files are `train_distilled.py`, `config.py`, `identity.py`. It uses Hugging Face Transformers 4.44.2, PEFT 0.11.1, TRL 0.8.6, and expects an H100 or A100. See `deploy.sh` and `run_outside_chat.sh` for the one click run that keeps training alive outside the chat session.
209
+
210
  ## Credits
211
 
212
  Built by Maximalist Labs (MLVXN) on top of openai-community/gpt2-xl. Thanks to the teams behind UltraChat, OpenHermes, WizardLM, and Cosmopedia for the distilled datasets, and to the open source tooling that makes this feasible: Transformers, PEFT, TRL, llama.cpp, and Ollama.