KlondikeDev commited on
Commit
9ae13bf
·
verified ·
1 Parent(s): 21ad8d7

Expand README with the full model card; add benchmarks.csv

Browse files

Keeps the existing banner/links header; adds results, model, usage, training, contamination and limitations sections, a placeholder for the benchmark SVG, and every benchmark run as benchmarks.csv. MODEL_CARD_DRAFT.md merged into README and removed.

Action Automated by Claude Code

Files changed (3) hide show
  1. MODEL_CARD_DRAFT.md +0 -108
  2. README.md +127 -0
  3. benchmarks.csv +27 -0
MODEL_CARD_DRAFT.md DELETED
@@ -1,108 +0,0 @@
1
- <!-- DRAFT model card for Boris-2 (written by Claude Code from the training logs; edit freely, then merge into README.md).
2
- TODO before publishing: (1) re-run lm-evaluation-harness on these weights for HellaSwag/ARC/PIQA (the numbers below are
3
- from Boris's own evaluator, which matched lm-eval exactly on Preview-2); (2) regenerate samples.json / sample outputs;
4
- (3) add the LibreMath dataset link once it is public. -->
5
-
6
- # Boris-2
7
-
8
- Boris-2 is a 144M-parameter base language model from OpenCerebral, trained from scratch on a single NVIDIA V100. It was trained for 200B tokens, followed by two short final stages (40M tokens in total). It follows [Boris-2-Preview-1](https://huggingface.co/opencerebral/Boris-2-Preview-1) and [Boris-2-Preview-2](https://huggingface.co/opencerebral/Boris-2-Preview-2).
9
-
10
- This is a base model. It continues text; it does not follow instructions or chat.
11
-
12
- ## Results
13
-
14
- Zero-shot, float32 weights. ArithMark-3 uses the leaderboard's own `bencharithmark-3.py` (unmodified, default settings).
15
-
16
- | Benchmark | Metric | Preview-2 | Boris-2 @200B | **Boris-2** |
17
- |---|---|---:|---:|---:|
18
- | HellaSwag | acc_norm | 46.60 | 50.36 | **50.26** |
19
- | ARC-Easy | acc_norm | 59.13 | 60.10 | **59.81** |
20
- | ARC-Challenge | acc_norm | 30.20 | 32.25 | **32.00** |
21
- | PIQA | acc_norm | 70.84 | 72.91 | **72.91** |
22
- | ArithMark-3 | acc_norm | 42.20 | 42.00 | **45.10** |
23
- | **Open SLM Index** | | 30.58 | 33.59 | **34.19** |
24
-
25
- The Index is the Open SLM Leaderboard formula: `(N(HellaSwag,25) + N(mean(ARC-E, ARC-C),25) + N(PIQA,50) + 0.65 * N(ArithMark-3,25)) / 3.65`, with `N(v,c) = 100(v-c)/(100-c)`.
26
-
27
- **How this checkpoint was chosen.** "Boris-2 @200B" is the end of the main run. The released weights add two short low-learning-rate stages on top of it (see Training). About ten such short final-stage candidates were tried (different data, seeds and learning rates, plus a math-neuron amplification experiment that was not kept), and this one was selected by its score on these five benchmarks. Single-checkpoint scores move by roughly ±0.8 Index, so part of the margin over the 200B checkpoint may be selection on noise. Almost all of the measured gain is ArithMark-3 (+3.1); the other four benchmarks changed by 0.3 points or less.
28
-
29
- ## Model
30
-
31
- | Field | Value |
32
- |---|---:|
33
- | Parameters | 143.7M |
34
- | Transformer blocks | 111.9M |
35
- | Token embedding (tied with output) | 16.8M |
36
- | N-gram table | 15.0M |
37
- | Layers | 31 |
38
- | Hidden size | 512 |
39
- | Attention | 8 heads of 64, full multi-head |
40
- | MLP | SwiGLU, inner 1664 |
41
- | Context | 2048 tokens |
42
- | Position encoding | RoPE, theta 10,000 |
43
- | Vocabulary | 32,768 (byte-level BPE, trained for this model) |
44
-
45
- Two components differ from a standard decoder:
46
-
47
- - **Canon layers.** Each block applies a causal 3-tap depthwise convolution to the fused query/key/value projection, so every position mixes in the two previous positions before attention.
48
- - **N-gram table.** An exact lookup on the last two and three token ids (210,938 bigrams and 23,437 trigrams, no hashing) retrieves a learned rank-64 vector that is added to the residual stream before block 2.
49
-
50
- Training packed several documents per sequence with attention, Canon and the n-gram lookup all masked at document boundaries; the modeling code reproduces this (`eos_resets_context` in the config).
51
-
52
- ## Usage
53
-
54
- ```python
55
- from transformers import AutoModelForCausalLM, AutoTokenizer
56
-
57
- repo = "opencerebral/Boris-2"
58
- tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
59
- model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True)
60
-
61
- x = tok("The water cycle begins when", return_tensors="pt")
62
- y = model.generate(**x, max_new_tokens=40, do_sample=False)
63
- print(tok.decode(y[0], skip_special_tokens=True))
64
- ```
65
-
66
- Plain PyTorch custom code, no extra dependencies, no KV cache. Run in float32 or bfloat16; the residual stream is kept in float32 internally.
67
-
68
- ## Training
69
-
70
- | Field | Value |
71
- |---|---:|
72
- | Tokens | 200.0B main run + 40M final stages |
73
- | Hardware | 1x NVIDIA V100 32GB, about 59,500 tokens per second (hand-written Volta attention and fused kernels) |
74
- | Precision | float16 mixed precision, float32 residual stream |
75
- | Batch | 524,288 tokens per step to 170B, then 1,048,576 (doubled after a pilot showed lower loss) |
76
- | Sequence length | 2048 |
77
- | Optimizer | Muon (matrices) and AdamW (embedding, n-gram table, norms, Canon) |
78
- | Schedule | warmup, constant learning rate to 174B, then 1-sqrt decay to zero over 26B tokens |
79
-
80
- Main run data: up to 55B tokens about 89% ClimbMix and 11% FineMath; from 55B about 90% ClimbMix, 10% UltraData-Math L3 and 0.15% Orca-Math. From 150B to 174B the mix ramps linearly to the decay mix.
81
-
82
- Decay mix (174B to 196.5B), by tokens:
83
-
84
- | Source | Share |
85
- |---|---:|
86
- | ClimbMix | 73.92% |
87
- | UltraData-Math L3 | 12% |
88
- | Cosmopedia v2 WikiHow-style tutorials | 10.9% |
89
- | Cosmopedia v1 tutorials (HellaSwag-title filtered) | 1.1% |
90
- | DCLM-Baseline | 1% |
91
- | MetaMathQA (GSM8K-derived rows) | 0.75% |
92
- | Calc-ape210k / Calc-mawps (training splits) | 0.18% |
93
- | Orca-Math | 0.15% |
94
-
95
- The last 3.5B tokens shift to Preview-2's decay mix (about 5% MetaMathQA and 1.5% elementary word problems).
96
-
97
- Final stages, starting from the 200B checkpoint:
98
-
99
- 1. 30M tokens at 0.1x peak learning rate (1-sqrt to zero): mostly ClimbMix and Cosmopedia tutorials, plus UltraData-Math, MetaMathQA and Orca-Math.
100
- 2. 10M tokens at 0.02x peak learning rate (1-sqrt to zero): LibreMath v1 only, an OpenCerebral synthetic math word-problem set (not yet public).
101
-
102
- ## Contamination
103
-
104
- No benchmark training, validation or test split was trained on. Every source except ClimbMix was filtered against every evaluation item (HellaSwag, ARC, PIQA, ArithMark-3) with a 13-gram overlap check; LibreMath additionally carries 8-gram bans against ArithMark-3, SVAMP and ASDiv, and the how-to data excludes HellaSwag's WikiHow titles. ClimbMix, the bulk of the data, has not been filtered.
105
-
106
- ## Limitations
107
-
108
- A 144M-parameter base model. It makes factual and arithmetic mistakes, loses track of longer arguments, and repeats itself under greedy decoding. It has no safety tuning.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -1,5 +1,24 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
4
  <p align="center">
5
  <img src="./Boris-2.png" width="100%" alt="Model Card banner">
@@ -13,3 +32,111 @@ license: apache-2.0
13
  <b>License</b>: <a href="https://huggingface.co/opencerebral/Boris-2/blob/main/LICENSE">Apache 2.0</a> |
14
  <b>Authors</b>: <a href="https://oc.kunix.org/">OpenCerebral</a>
15
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ language:
4
+ - en
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
+ tags:
8
+ - base-model
9
+ - small-language-model
10
+ - causal-lm
11
+ datasets:
12
+ - karpathy/climbmix-400b-shuffle
13
+ - HuggingFaceTB/finemath
14
+ - openbmb/UltraData-Math
15
+ - microsoft/orca-math-word-problems-200k
16
+ - meta-math/MetaMathQA
17
+ - MU-NLPC/Calc-ape210k
18
+ - MU-NLPC/Calc-mawps
19
+ - HuggingFaceTB/cosmopedia
20
+ - HuggingFaceTB/smollm-corpus
21
+ - mlfoundations/dclm-baseline-1.0
22
  ---
23
  <p align="center">
24
  <img src="./Boris-2.png" width="100%" alt="Model Card banner">
 
32
  <b>License</b>: <a href="https://huggingface.co/opencerebral/Boris-2/blob/main/LICENSE">Apache 2.0</a> |
33
  <b>Authors</b>: <a href="https://oc.kunix.org/">OpenCerebral</a>
34
  </p>
35
+
36
+ # Boris-2
37
+
38
+ Boris-2 is a 144M-parameter base language model from OpenCerebral, trained from scratch on a single NVIDIA V100. It was trained for 200B tokens, followed by two short final stages (40M tokens in total). It follows [Boris-2-Preview-1](https://huggingface.co/opencerebral/Boris-2-Preview-1) and [Boris-2-Preview-2](https://huggingface.co/opencerebral/Boris-2-Preview-2).
39
+
40
+ This is a base model. It continues text; it does not follow instructions or chat.
41
+
42
+ ## Results
43
+
44
+ <!-- BENCHMARK CHART: add benchmarks.svg here, e.g. <img src="./benchmarks.svg" width="100%"> -->
45
+
46
+ Zero-shot, float32 weights. ArithMark-3 uses the leaderboard's own `bencharithmark-3.py` (unmodified, default settings).
47
+
48
+ | Benchmark | Metric | Preview-2 | Boris-2 @200B | **Boris-2** |
49
+ |---|---|---:|---:|---:|
50
+ | HellaSwag | acc_norm | 46.60 | 50.36 | **50.26** |
51
+ | ARC-Easy | acc_norm | 59.13 | 60.10 | **59.81** |
52
+ | ARC-Challenge | acc_norm | 30.20 | 32.25 | **32.00** |
53
+ | PIQA | acc_norm | 70.84 | 72.91 | **72.91** |
54
+ | ArithMark-3 | acc_norm | 42.20 | 42.00 | **45.10** |
55
+ | **Open SLM Index** | | 30.58 | 33.59 | **34.19** |
56
+
57
+ The Index is the Open SLM Leaderboard formula: `(N(HellaSwag,25) + N(mean(ARC-E, ARC-C),25) + N(PIQA,50) + 0.65 * N(ArithMark-3,25)) / 3.65`, with `N(v,c) = 100(v-c)/(100-c)`.
58
+
59
+ Every benchmark run of Boris-2 (all 10B-token checkpoints of the main run, the previews, the 200B checkpoint and this release) is in [`benchmarks.csv`](./benchmarks.csv).
60
+
61
+ **How this checkpoint was chosen.** "Boris-2 @200B" is the end of the main run. The released weights add two short low-learning-rate stages on top of it (see Training). About ten such short final-stage candidates were tried (different data, seeds and learning rates, plus a math-neuron amplification experiment that was not kept), and this one was selected by its score on these five benchmarks. Single-checkpoint scores move by roughly ±0.8 Index, so part of the margin over the 200B checkpoint may be selection on noise. Almost all of the measured gain is ArithMark-3 (+3.1); the other four benchmarks changed by 0.3 points or less.
62
+
63
+ ## Model
64
+
65
+ | Field | Value |
66
+ |---|---:|
67
+ | Parameters | 143.7M |
68
+ | Transformer blocks | 111.9M |
69
+ | Token embedding (tied with output) | 16.8M |
70
+ | N-gram table | 15.0M |
71
+ | Layers | 31 |
72
+ | Hidden size | 512 |
73
+ | Attention | 8 heads of 64, full multi-head |
74
+ | MLP | SwiGLU, inner 1664 |
75
+ | Context | 2048 tokens |
76
+ | Position encoding | RoPE, theta 10,000 |
77
+ | Vocabulary | 32,768 (byte-level BPE, trained for this model) |
78
+
79
+ Two components differ from a standard decoder:
80
+
81
+ - **Canon layers.** Each block applies a causal 3-tap depthwise convolution to the fused query/key/value projection, so every position mixes in the two previous positions before attention.
82
+ - **N-gram table.** An exact lookup on the last two and three token ids (210,938 bigrams and 23,437 trigrams, no hashing) retrieves a learned rank-64 vector that is added to the residual stream before block 2.
83
+
84
+ Training packed several documents per sequence with attention, Canon and the n-gram lookup all masked at document boundaries; the modeling code reproduces this (`eos_resets_context` in the config).
85
+
86
+ ## Usage
87
+
88
+ ```python
89
+ from transformers import AutoModelForCausalLM, AutoTokenizer
90
+
91
+ repo = "opencerebral/Boris-2"
92
+ tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
93
+ model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True)
94
+
95
+ x = tok("The water cycle begins when", return_tensors="pt")
96
+ y = model.generate(**x, max_new_tokens=40, do_sample=False)
97
+ print(tok.decode(y[0], skip_special_tokens=True))
98
+ ```
99
+
100
+ Plain PyTorch custom code, no extra dependencies, no KV cache. Run in float32 or bfloat16; the residual stream is kept in float32 internally.
101
+
102
+ ## Training
103
+
104
+ | Field | Value |
105
+ |---|---:|
106
+ | Tokens | 200.0B main run + 40M final stages |
107
+ | Hardware | 1x NVIDIA V100 32GB, about 59,500 tokens per second (hand-written Volta attention and fused kernels) |
108
+ | Precision | float16 mixed precision, float32 residual stream |
109
+ | Batch | 524,288 tokens per step to 170B, then 1,048,576 (doubled after a pilot showed lower loss) |
110
+ | Sequence length | 2048 |
111
+ | Optimizer | Muon (matrices) and AdamW (embedding, n-gram table, norms, Canon) |
112
+ | Schedule | warmup, constant learning rate to 174B, then 1-sqrt decay to zero over 26B tokens |
113
+
114
+ Main run data: up to 55B tokens about 89% ClimbMix and 11% FineMath; from 55B about 90% ClimbMix, 10% UltraData-Math L3 and 0.15% Orca-Math. From 150B to 174B the mix ramps linearly to the decay mix.
115
+
116
+ Decay mix (174B to 196.5B), by tokens:
117
+
118
+ | Source | Share |
119
+ |---|---:|
120
+ | ClimbMix | 73.92% |
121
+ | UltraData-Math L3 | 12% |
122
+ | Cosmopedia v2 WikiHow-style tutorials | 10.9% |
123
+ | Cosmopedia v1 tutorials (HellaSwag-title filtered) | 1.1% |
124
+ | DCLM-Baseline | 1% |
125
+ | MetaMathQA (GSM8K-derived rows) | 0.75% |
126
+ | Calc-ape210k / Calc-mawps (training splits) | 0.18% |
127
+ | Orca-Math | 0.15% |
128
+
129
+ The last 3.5B tokens shift to Preview-2's decay mix (about 5% MetaMathQA and 1.5% elementary word problems).
130
+
131
+ Final stages, starting from the 200B checkpoint:
132
+
133
+ 1. 30M tokens at 0.1x peak learning rate (1-sqrt to zero): mostly ClimbMix and Cosmopedia tutorials, plus UltraData-Math, MetaMathQA and Orca-Math.
134
+ 2. 10M tokens at 0.02x peak learning rate (1-sqrt to zero): LibreMath v1 only, an OpenCerebral synthetic math word-problem set (not yet public).
135
+
136
+ ## Contamination
137
+
138
+ No benchmark training, validation or test split was trained on. Every source except ClimbMix was filtered against every evaluation item (HellaSwag, ARC, PIQA, ArithMark-3) with a 13-gram overlap check; LibreMath additionally carries 8-gram bans against ArithMark-3, SVAMP and ASDiv, and the how-to data excludes HellaSwag's WikiHow titles. ClimbMix, the bulk of the data, has not been filtered.
139
+
140
+ ## Limitations
141
+
142
+ A 144M-parameter base model. It makes factual and arithmetic mistakes, loses track of longer arguments, and repeats itself under greedy decoding. It has no safety tuning.
benchmarks.csv ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model,checkpoint,tokens_B,phase,hellaswag,arc_easy,arc_challenge,piqa,arithmark3,arithmark_scorer,open_slm_index,val_loss
2
+ Boris-2 (main run),export_0010B,10.0,stable,37.12,52.15,27.05,67.95,35.9,boris eval.py,22.19,2.8393
3
+ Boris-2 (main run),export_0020B,20.0,stable,38.56,52.9,28.58,67.85,37.6,boris eval.py,23.47,2.8092
4
+ Boris-2 (main run),export_0030B,30.0,stable,39.42,54.42,29.78,68.39,38.6,boris eval.py,24.82,2.7919
5
+ Boris-2 (main run),export_0040B,40.0,stable,39.32,52.86,27.73,67.25,36.7,boris eval.py,23.05,2.7832
6
+ Boris-2 (main run),export_0050B,50.0,stable,39.8,55.64,29.86,68.17,38.7,boris eval.py,25.1,2.7829
7
+ Boris-2 (main run),export_0060B,60.0,stable,39.9,56.78,28.07,67.9,35.8,boris eval.py,24.18,2.7774
8
+ Boris-2 (main run),export_0070B,70.0,stable,40.05,55.01,29.61,67.52,37.3,boris eval.py,24.34,2.7744
9
+ Boris-2 (main run),export_0080B,80.0,stable,40.37,55.72,28.24,68.01,35.7,boris eval.py,24.23,2.7755
10
+ Boris-2 (main run),export_0090B,90.0,stable,40.54,56.14,28.16,67.52,36.3,boris eval.py,24.22,2.7758
11
+ Boris-2 (main run),export_0100B,100.0,stable,40.75,56.19,29.18,69.37,38.0,boris eval.py,25.91,2.7713
12
+ Boris-2 (main run),export_0110B,110.0,stable,40.51,56.06,29.52,69.75,38.5,boris eval.py,26.19,2.7756
13
+ Boris-2 (main run),export_0120B,120.0,stable,40.65,56.44,30.03,68.28,38.6,boris eval.py,25.62,2.7692
14
+ Boris-2 (main run),export_0130B,130.0,stable,40.95,55.18,28.84,67.95,38.6,boris eval.py,25.11,2.7659
15
+ Boris-2 (main run),export_0140B,140.0,stable,41.07,54.88,28.75,68.12,36.7,boris eval.py,24.72,2.7662
16
+ Boris-2 (main run),export_0150B,150.0,stable,40.92,55.01,30.03,68.39,38.5,boris eval.py,25.5,2.7644
17
+ Boris-2 (main run),export_0160B,160.0,stable,41.81,53.54,29.01,68.77,39.5,boris eval.py,25.81,2.7655
18
+ Boris-2 (main run),export_0170B,170.0,stable,41.8,55.56,29.86,69.7,39.9,boris eval.py,26.94,2.764
19
+ Boris-2 (main run),export_0180B,180.0,decay,46.7,58.46,30.97,71.65,42.0,boris eval.py,31.03,2.6499
20
+ Boris-2 (main run),export_0190B,190.0,decay,48.5,58.8,32.08,71.76,43.1,boris eval.py,32.27,2.594
21
+ Boris-2-Preview-1,final (50B + 2.5B decay),52.5,preview,45.23,58.38,29.95,69.21,37.6,official,27.91,2.6252
22
+ Boris-2-Preview-2,final (100B + 2.5B decay),102.5,preview,46.59,59.13,30.2,70.84,42.2,official,30.57,2.6074
23
+ Boris-2-Preview-3 (internal),final (150B + 2.5B decay),152.5,preview,46.76,58.88,30.46,70.51,43.7,official,30.81,2.5917
24
+ Boris-2-Preview-3b (internal),"final (150B + 2.5B decay, Preview-2 mix)",152.5,preview,46.91,57.79,32.17,71.06,41.1,official,30.66,2.6021
25
+ Boris-2,stable phase end (pre-decay),174.0,stable,44.32,56.78,29.95,69.59,41.7,boris eval.py,28.47,2.7092
26
+ Boris-2,main run final (200B),200.0,final,50.36,60.1,32.25,72.91,42.0,official,33.59,2.5383
27
+ Boris-2,release (200B + 40M final stages),200.04,release,50.26,59.81,32.0,72.91,45.1,official,34.19,