User01110 commited on
Commit
b1dee4f
·
verified ·
1 Parent(s): a2c9b48

Benchmark-selected step 1000: Open SLM average 33.88%

Browse files
Files changed (5) hide show
  1. README.md +12 -12
  2. benchmark_results.json +18 -18
  3. model.safetensors +1 -1
  4. modeling_cma.py +7 -18
  5. training_config.json +1 -4
README.md CHANGED
@@ -21,8 +21,8 @@ Benchmark-selected checkpoint from a 7.85M-parameter
21
  Channel-Mixing Attention generalist language model using the unmodified native
22
  GPT-S 4,096-token tokenizer. It has no arithmetic-specific token splitting,
23
  place embeddings, role embeddings, or inference-time equation detection. It
24
- was selected at step 0 for an Open SLM Leaderboard-style average of
25
- 30.66%. WikiText normalized BPB is reported separately
26
  and is not used for selection.
27
 
28
  ## Loading
@@ -69,7 +69,7 @@ ordinary causal-language-model text, with no task-specific model features or
69
  tokenizer transformations. All four training sources are streamed natural-text
70
  corpora.
71
 
72
- ## Zero-shot evaluation at step 0
73
 
74
  The four lm-eval tasks use normalized accuracy when supplied by lm-eval
75
  0.4.12, with float32 weights and softmax. ArithMark
@@ -77,17 +77,17 @@ uses float32 weights and its official raw continuation log-likelihood-sum rule.
77
 
78
  | Benchmark | Accuracy |
79
  |---|---:|
80
- | HellaSwag | 26.31% |
81
- | ARC-Easy | 25.55% |
82
- | ARC-Challenge | 23.46% |
83
- | PIQA | 49.56% |
84
- | ArithMark-2 | 22.28% |
85
- | ARC mean | 24.51% |
86
- | Open SLM Leaderboard-style average | 30.66% |
87
 
88
  The average is `(HellaSwag + mean(ARC-Easy, ARC-Challenge) + PIQA +
89
  ArithMark-2) / 4`, matching the Open SLM Leaderboard formula.
90
 
91
- WikiText-103 validation at this step: loss 8.3686, perplexity
92
- 4309.76, normalized BPB 3.7838 over 358,911
93
  scored tokens and 1,145,226 normalized UTF-8 bytes.
 
21
  Channel-Mixing Attention generalist language model using the unmodified native
22
  GPT-S 4,096-token tokenizer. It has no arithmetic-specific token splitting,
23
  place embeddings, role embeddings, or inference-time equation detection. It
24
+ was selected at step 1,000 for an Open SLM Leaderboard-style average of
25
+ 33.88%. WikiText normalized BPB is reported separately
26
  and is not used for selection.
27
 
28
  ## Loading
 
69
  tokenizer transformations. All four training sources are streamed natural-text
70
  corpora.
71
 
72
+ ## Zero-shot evaluation at step 1,000
73
 
74
  The four lm-eval tasks use normalized accuracy when supplied by lm-eval
75
  0.4.12, with float32 weights and softmax. ArithMark
 
77
 
78
  | Benchmark | Accuracy |
79
  |---|---:|
80
+ | HellaSwag | 27.81% |
81
+ | ARC-Easy | 32.11% |
82
+ | ARC-Challenge | 21.42% |
83
+ | PIQA | 55.06% |
84
+ | ArithMark-2 | 25.88% |
85
+ | ARC mean | 26.76% |
86
+ | Open SLM Leaderboard-style average | 33.88% |
87
 
88
  The average is `(HellaSwag + mean(ARC-Easy, ARC-Challenge) + PIQA +
89
  ArithMark-2) / 4`, matching the Open SLM Leaderboard formula.
90
 
91
+ WikiText-103 validation at this step: loss 3.5111, perplexity
92
+ 33.48, normalized BPB 1.5875 over 358,911
93
  scored tokens and 1,145,226 normalized UTF-8 bytes.
benchmark_results.json CHANGED
@@ -1,45 +1,45 @@
1
  {
2
- "step": 0,
3
  "parameters": 7849161,
4
  "lm_eval_version": "0.4.12",
5
  "num_fewshot": 0,
6
  "leaderboard_accuracy": {
7
- "arc_easy": 0.25547138047138046,
8
- "arc_challenge": 0.23464163822525597,
9
- "hellaswag": 0.26309500099581756,
10
- "piqa": 0.4956474428726877
11
  },
12
  "lm_eval_metric_policy": "acc_norm when available, otherwise acc",
13
  "selection_metric": "open_slm_leaderboard_average",
14
  "arithmark_2.0": {
15
- "acc": 0.2228,
16
- "correct": 557,
17
  "total": 2500,
18
  "by_operator_count": {
19
  "1": {
20
- "acc": 0.2208,
21
- "correct": 276,
22
  "total": 1250
23
  },
24
  "2": {
25
- "acc": 0.21866666666666668,
26
- "correct": 164,
27
  "total": 750
28
  },
29
  "3": {
30
- "acc": 0.234,
31
- "correct": 117,
32
  "total": 500
33
  }
34
  }
35
  },
36
- "arc_average": 0.2450565093483182,
37
- "open_slm_leaderboard_average": 0.30664973830420583,
38
  "average_formula": "(hellaswag + mean(arc_easy, arc_challenge) + piqa + arithmark_2.0) / 4",
39
  "validation": {
40
- "loss": 8.368637380723772,
41
- "perplexity": 4309.759498478308,
42
- "normalized_bpb": 3.7837711245079073,
43
  "tokens": 358911,
44
  "normalized_utf8_bytes": 1145226
45
  }
 
1
  {
2
+ "step": 1000,
3
  "parameters": 7849161,
4
  "lm_eval_version": "0.4.12",
5
  "num_fewshot": 0,
6
  "leaderboard_accuracy": {
7
+ "arc_easy": 0.32112794612794615,
8
+ "arc_challenge": 0.21416382252559726,
9
+ "hellaswag": 0.27813184624576776,
10
+ "piqa": 0.5505984766050055
11
  },
12
  "lm_eval_metric_policy": "acc_norm when available, otherwise acc",
13
  "selection_metric": "open_slm_leaderboard_average",
14
  "arithmark_2.0": {
15
+ "acc": 0.2588,
16
+ "correct": 647,
17
  "total": 2500,
18
  "by_operator_count": {
19
  "1": {
20
+ "acc": 0.248,
21
+ "correct": 310,
22
  "total": 1250
23
  },
24
  "2": {
25
+ "acc": 0.2866666666666667,
26
+ "correct": 215,
27
  "total": 750
28
  },
29
  "3": {
30
+ "acc": 0.244,
31
+ "correct": 122,
32
  "total": 500
33
  }
34
  }
35
  },
36
+ "arc_average": 0.2676458843267717,
37
+ "open_slm_leaderboard_average": 0.33879405179438626,
38
  "average_formula": "(hellaswag + mean(arc_easy, arc_challenge) + piqa + arithmark_2.0) / 4",
39
  "validation": {
40
+ "loss": 3.511079413898325,
41
+ "perplexity": 33.4843918019419,
42
+ "normalized_bpb": 1.58748913326839,
43
  "tokens": 358911,
44
  "normalized_utf8_bytes": 1145226
45
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:767c860fea9367ec00d2e2b3d271f29fa6d926be279518e1fe15fc59a0b37b0f
3
  size 36330428
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d3afa91d8c126df0efdf49b944fee4f838aadf2f6d5681ae9b1569fc5eee2942
3
  size 36330428
modeling_cma.py CHANGED
@@ -171,15 +171,10 @@ class CMA(nn.Module):
171
  k = F.normalize(k.float(), dim=-1).to(v.dtype)
172
  scale = self.logit_scale.clamp(max=math.log(100.0)).exp()
173
  scale = scale.view(1, self.h, 1, 1)
174
- routed = F.scaled_dot_product_attention(
175
- q * scale.to(q.dtype),
176
- k,
177
- v,
178
- attn_mask=self.bias.unsqueeze(0).to(q.dtype),
179
- dropout_p=0.0,
180
- is_causal=False,
181
- scale=1.0,
182
- )
183
  route_signal = (
184
  torch.einsum(
185
  "bhnd,hd->bhn", q.float(), self.route_gate_weight.float()
@@ -191,11 +186,6 @@ class CMA(nn.Module):
191
  contribution = route_coeff.unsqueeze(-1) * (routed - v)
192
  y = v + contribution
193
  if self.record_diagnostics:
194
- attn_logits = (
195
- q.float() @ k.float().transpose(-2, -1)
196
- ) * scale.float()
197
- attn_logits = attn_logits + self.bias.float().unsqueeze(0)
198
- attn = F.softmax(attn_logits, dim=-1, dtype=torch.float32)
199
  probs = attn.float().clamp_min(1e-9)
200
  entropy = -(probs * probs.log()).sum(dim=-1) / math.log(self.n)
201
  diagonal_mass = probs.diagonal(dim1=-2, dim2=-1).mean()
@@ -241,10 +231,9 @@ class Block(nn.Module):
241
  )
242
 
243
  def forward(self, x, cos, sin):
244
- # Expose the full attention -> residual -> norm -> CMA handoff to
245
- # Inductor as one graph so pointwise boundaries can be fused.
246
- x = torch.add(x, self.attn(self.n1(x), cos, sin))
247
- return torch.add(x, self.mix(self.n2(x)))
248
 
249
 
250
  class CMAModel(nn.Module):
 
171
  k = F.normalize(k.float(), dim=-1).to(v.dtype)
172
  scale = self.logit_scale.clamp(max=math.log(100.0)).exp()
173
  scale = scale.view(1, self.h, 1, 1)
174
+ attn_logits = (q @ k.transpose(-2, -1)) * scale.to(q.dtype)
175
+ attn_logits = attn_logits + self.bias.unsqueeze(0).to(q.dtype)
176
+ attn = F.softmax(attn_logits, dim=-1, dtype=torch.float32).to(v.dtype)
177
+ routed = attn @ v
 
 
 
 
 
178
  route_signal = (
179
  torch.einsum(
180
  "bhnd,hd->bhn", q.float(), self.route_gate_weight.float()
 
186
  contribution = route_coeff.unsqueeze(-1) * (routed - v)
187
  y = v + contribution
188
  if self.record_diagnostics:
 
 
 
 
 
189
  probs = attn.float().clamp_min(1e-9)
190
  entropy = -(probs * probs.log()).sum(dim=-1) / math.log(self.n)
191
  diagonal_mass = probs.diagonal(dim1=-2, dim2=-1).mean()
 
231
  )
232
 
233
  def forward(self, x, cos, sin):
234
+ x = x + self.attn(self.n1(x), cos, sin)
235
+ x = x + self.mix(self.n2(x))
236
+ return x
 
237
 
238
 
239
  class CMAModel(nn.Module):
training_config.json CHANGED
@@ -51,8 +51,5 @@
51
  "data_seed": 1337,
52
  "shuffle_buffer": 50000,
53
  "tokenize_batch_size": 64,
54
- "compile": true,
55
- "compile_mode": "max-autotune",
56
- "compile_fullgraph": true,
57
- "compile_dynamic": false
58
  }
 
51
  "data_seed": 1337,
52
  "shuffle_buffer": 50000,
53
  "tokenize_batch_size": 64,
54
+ "compile": true
 
 
 
55
  }