TobiasLogic commited on
Commit
3c026ad
·
verified ·
1 Parent(s): 97a90d4

Museko-125M final model with benchmark and trajectory charts

Browse files
README.md ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
+ tags:
8
+ - llama
9
+ - small-language-model
10
+ - from-scratch
11
+ datasets:
12
+ - HuggingFaceFW/fineweb-edu
13
+ ---
14
+
15
+ # Museko-125M
16
+
17
+ Museko-125M is a 123M parameter language model I trained from scratch. It targets the sub-150M size class, and across the standard small-model benchmarks it currently comes out ahead of the other models in that range.
18
+
19
+ It is a Llama style decoder pretrained on FineWeb-Edu with a small amount of synthetic arithmetic mixed in. The arithmetic mix is why it does noticeably better on math than most models its size while still holding solid general knowledge and reasoning.
20
+
21
+ ## Benchmarks
22
+
23
+ All numbers are 0-shot, measured with lm-evaluation-harness and the ArithMark 2.0 benchmark.
24
+
25
+ | Benchmark | Museko-125M | Previous best in class |
26
+ |---|---|---|
27
+ | HellaSwag | 33.2 | 30.6 |
28
+ | ARC-Easy | 54.0 | 48.6 |
29
+ | ARC-Challenge | 25.7 | 25.4 |
30
+ | PIQA | 63.2 | 64.5 |
31
+ | ArithMark 2.0 | 74.3 | 66.7 |
32
+
33
+ ![Benchmark comparison](bench.png)
34
+
35
+ By the leaderboard averaging (ARC-Easy and ARC-Challenge combined) this comes to about 52.6, ahead of the previous top model at 49.71. It leads on four of the five benchmarks.
36
+
37
+ ![Board average during training](trajectory.png)
38
+
39
+ ## Usage
40
+
41
+ ```python
42
+ from transformers import AutoModelForCausalLM, AutoTokenizer
43
+ import torch
44
+
45
+ name = "TobiasLogic/Museko-125M"
46
+ tok = AutoTokenizer.from_pretrained(name)
47
+ model = AutoModelForCausalLM.from_pretrained(name, torch_dtype=torch.bfloat16)
48
+
49
+ prompt = "The moon is"
50
+ ids = tok(prompt, return_tensors="pt")
51
+ out = model.generate(**ids, max_new_tokens=40)
52
+ print(tok.decode(out[0], skip_special_tokens=True))
53
+ ```
54
+
55
+ ## Training setup
56
+
57
+ - Architecture: Llama, 12 layers, hidden size 768, 12 attention heads, 2048 context
58
+ - Parameters: about 123M
59
+ - Tokenizer: SmolLM2-135M (49,152 vocab)
60
+ - Data: FineWeb-Edu plus roughly 10% synthetic arithmetic
61
+ - Optimizer: AdamW, cosine schedule from 6e-4 down to 6e-5, 1,000 step warmup, weight decay 0.1
62
+ - Effective batch: about 0.52M tokens per step
63
+
64
+ ## Notes
65
+
66
+ Weights are open under Apache 2.0. This release is a from-scratch model and remains a strong general baseline for its size while being particularly good at arithmetic.
bench.png ADDED
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 0,
8
+ "dtype": "float32",
9
+ "eos_token_id": 0,
10
+ "head_dim": 64,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 768,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 2048,
15
+ "max_position_embeddings": 2048,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 12,
19
+ "num_hidden_layers": 12,
20
+ "num_key_value_heads": 12,
21
+ "pad_token_id": null,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-05,
24
+ "rope_parameters": {
25
+ "rope_theta": 10000.0,
26
+ "rope_type": "default"
27
+ },
28
+ "tie_word_embeddings": true,
29
+ "transformers_version": "5.14.1",
30
+ "use_cache": true,
31
+ "vocab_size": 49152
32
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "eos_token_id": 0,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "transformers_version": "5.14.1",
8
+ "use_cache": true
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:234232686967d0c93f66204f18dcf6c517d0666e83d4f7814d0fbe3e42ba210e
3
+ size 490822600
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<|endoftext|>",
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|endoftext|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|endoftext|>",
10
+ "<|im_start|>",
11
+ "<|im_end|>",
12
+ "<repo_name>",
13
+ "<reponame>",
14
+ "<file_sep>",
15
+ "<filename>",
16
+ "<gh_stars>",
17
+ "<issue_start>",
18
+ "<issue_comment>",
19
+ "<issue_closed>",
20
+ "<jupyter_start>",
21
+ "<jupyter_text>",
22
+ "<jupyter_code>",
23
+ "<jupyter_output>",
24
+ "<jupyter_script>",
25
+ "<empty_output>"
26
+ ],
27
+ "is_local": false,
28
+ "local_files_only": false,
29
+ "model_max_length": 8192,
30
+ "pad_token": null,
31
+ "tokenizer_class": "GPT2Tokenizer",
32
+ "unk_token": "<|endoftext|>",
33
+ "vocab_size": 49152
34
+ }
trajectory.png ADDED