v8.3, 71M parameters, FineWeb-Edu 1.42B tokens
Browse files- README.md +46 -1
- config.json +109 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
README.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: pytorch
|
| 3 |
+
tags: [text-generation, small-language-model, research]
|
| 4 |
+
datasets: [HuggingFaceFW/fineweb-edu]
|
| 5 |
---
|
| 6 |
+
|
| 7 |
+
# modelv8: v8.3, 71M parameters, trained on FineWeb-Edu
|
| 8 |
+
|
| 9 |
+
A small research language model from the speed-check-ai-traning project (branch `paper-faithful-hrm`).
|
| 10 |
+
It is a **base model**: trained only to continue web text, with no instruction or chat tuning.
|
| 11 |
+
|
| 12 |
+
## Architecture (v8.3)
|
| 13 |
+
- 6 blocks, width 768, 12 attention heads, MLP 3072, vocabulary 16,384 (BPE)
|
| 14 |
+
- Forgetting attention (FoX, no position encoding); blocks 1, 2, 4, 5 see a 64-token window, blocks 3 and 6
|
| 15 |
+
the whole text; Canon layers (4-token causal convolution); QK-norm; ReLU^2 MLP; value residual;
|
| 16 |
+
U-net skips; soft-capped logits
|
| 17 |
+
- 71,273,629 parameters (46,107,805 outside the embedding and output layer)
|
| 18 |
+
|
| 19 |
+
## Training
|
| 20 |
+
- FineWeb-Edu (sample-10BT), 1.42B tokens (~20 per parameter), one pass, 1,024-token pieces
|
| 21 |
+
- Muon (hidden matrices) + Adam-atan2; learning rate 0.0024 held, then decayed linearly to 0 over the
|
| 22 |
+
last 50% of steps; no EMA; bf16; one RTX 5090, 91.4 minutes
|
| 23 |
+
|
| 24 |
+
## Results (held-out FineWeb-Edu, live weights)
|
| 25 |
+
- held-out loss 3.204
|
| 26 |
+
- token accuracy 40.5%
|
| 27 |
+
- BLiMP (grammar, BabyLM 2026 filtered) 77.8%
|
| 28 |
+
|
| 29 |
+
## Limitations
|
| 30 |
+
Fluent and grammatical for a few sentences; common facts sometimes right ("Photosynthesis is the
|
| 31 |
+
process by which plants convert light energy into chemical energy"), specific facts often wrong,
|
| 32 |
+
loses the thread over longer text, loops under greedy decoding, almost no code. Not for any real use.
|
| 33 |
+
|
| 34 |
+
## Loading
|
| 35 |
+
Needs the model code from the project (`src/hrm_text`):
|
| 36 |
+
|
| 37 |
+
```python
|
| 38 |
+
import json, torch
|
| 39 |
+
from safetensors.torch import load_file
|
| 40 |
+
from hrm_text.models.hrm import ModelConfig, build_model
|
| 41 |
+
|
| 42 |
+
config = ModelConfig.from_saved(json.load(open("config.json"))["model_config"])
|
| 43 |
+
model = build_model(config)
|
| 44 |
+
model.load_state_dict(load_file("model.safetensors"))
|
| 45 |
+
model.eval()
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
Generation: `tools/talk.py` in the project (temperature 0.4-0.7 with top-k 20-50 reads best).
|
config.json
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_config": {
|
| 3 |
+
"vocab_size": 16384,
|
| 4 |
+
"max_seq_len": 1024,
|
| 5 |
+
"hidden_size": 768,
|
| 6 |
+
"num_heads": 12,
|
| 7 |
+
"num_kv_heads": null,
|
| 8 |
+
"n_layers": 4,
|
| 9 |
+
"expansion": 4.0,
|
| 10 |
+
"intermediate_override": null,
|
| 11 |
+
"h_cycles": 2,
|
| 12 |
+
"l_cycles": 3,
|
| 13 |
+
"tie_embeddings": false,
|
| 14 |
+
"mtp": false,
|
| 15 |
+
"vocab_multiple": 256,
|
| 16 |
+
"init_type": "lecun_normal",
|
| 17 |
+
"init_std": null,
|
| 18 |
+
"norm_eps": 1e-06,
|
| 19 |
+
"rope_theta": 10000.0,
|
| 20 |
+
"dropout": 0.0,
|
| 21 |
+
"prefix_lm": false,
|
| 22 |
+
"scale_embeddings": true,
|
| 23 |
+
"chunk_size": 8,
|
| 24 |
+
"l_blocks": 3,
|
| 25 |
+
"kernel_size": 3,
|
| 26 |
+
"l_mixer": "conv",
|
| 27 |
+
"h_blocks": 2,
|
| 28 |
+
"h_inner": 1,
|
| 29 |
+
"h_expansion": null,
|
| 30 |
+
"v3_pattern": "ggs|ggs|",
|
| 31 |
+
"gdn_version": 2,
|
| 32 |
+
"gdn_heads": 4,
|
| 33 |
+
"gdn_head_dim": 64,
|
| 34 |
+
"gdn_chunk": 32,
|
| 35 |
+
"gdn_backend": "torch",
|
| 36 |
+
"swa_window": 64,
|
| 37 |
+
"think_tokens": 2,
|
| 38 |
+
"think_mode": "chunk",
|
| 39 |
+
"n_loops": 1,
|
| 40 |
+
"n_loops_min": 0,
|
| 41 |
+
"position_coupling": false,
|
| 42 |
+
"coupling_offset": 24,
|
| 43 |
+
"canon": false,
|
| 44 |
+
"fox": false,
|
| 45 |
+
"gdn_bf16": false,
|
| 46 |
+
"v8_pattern": "llgllg",
|
| 47 |
+
"mlp_groups": 1,
|
| 48 |
+
"ngram_buckets": 0,
|
| 49 |
+
"ngram_layer": 1,
|
| 50 |
+
"value_embeds": 0,
|
| 51 |
+
"mudd": false,
|
| 52 |
+
"kv_heads": 0,
|
| 53 |
+
"loss_chunk": 1024,
|
| 54 |
+
"fold_forget": false,
|
| 55 |
+
"v8_learning": "backprop",
|
| 56 |
+
"fused_loss": true,
|
| 57 |
+
"bf16_residual": true,
|
| 58 |
+
"graph_masks": false,
|
| 59 |
+
"lean_kernels": false,
|
| 60 |
+
"forget_spread": false,
|
| 61 |
+
"forget_min": 8.0,
|
| 62 |
+
"forget_max": 2048.0,
|
| 63 |
+
"v9_prelude": "l",
|
| 64 |
+
"v9_core": "ld",
|
| 65 |
+
"v9_coda": "g",
|
| 66 |
+
"bp_loops": 0,
|
| 67 |
+
"gdn_negative": false,
|
| 68 |
+
"v11_core": "ldg",
|
| 69 |
+
"v11_halt": 0.01,
|
| 70 |
+
"v11_max_loops": 16,
|
| 71 |
+
"v12_state": 64,
|
| 72 |
+
"v12_rounds": 4,
|
| 73 |
+
"v12_stream": 0,
|
| 74 |
+
"v12_learn_dynamics": false,
|
| 75 |
+
"v12_seed": 0,
|
| 76 |
+
"v12_gated": false,
|
| 77 |
+
"v12_attention": 0,
|
| 78 |
+
"v13_state": 128,
|
| 79 |
+
"v13_rank": 64,
|
| 80 |
+
"v13_head_rank": 0,
|
| 81 |
+
"v13_local": true,
|
| 82 |
+
"v13_global_every": 10,
|
| 83 |
+
"v13_aux": 1.0,
|
| 84 |
+
"v13_plastic": false,
|
| 85 |
+
"tcn_layers": 26,
|
| 86 |
+
"tcn_kernel": 3,
|
| 87 |
+
"tcn_context": 512,
|
| 88 |
+
"tcn_mlp": false,
|
| 89 |
+
"arch": "v8"
|
| 90 |
+
},
|
| 91 |
+
"architecture": "hrm_text v8 (v8.3)",
|
| 92 |
+
"parameters": 71273629,
|
| 93 |
+
"non_embedding_parameters": 46107805,
|
| 94 |
+
"training": {
|
| 95 |
+
"lr": 0.0024,
|
| 96 |
+
"lr_schedule": "wsd",
|
| 97 |
+
"cooldown_ratio": 0.5,
|
| 98 |
+
"ema": null,
|
| 99 |
+
"optimizer": "muon",
|
| 100 |
+
"token_budget": 8192,
|
| 101 |
+
"epochs": 1
|
| 102 |
+
},
|
| 103 |
+
"results": {
|
| 104 |
+
"val_loss": 3.2039140844371112,
|
| 105 |
+
"val_accuracy": 0.40497566490240267,
|
| 106 |
+
"blimp": 0.7778463450520059,
|
| 107 |
+
"tokens": 1423046672
|
| 108 |
+
}
|
| 109 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19c36627a937548c231b69153c42537668cad2a7e4feacabcf1834240c3475e1
|
| 3 |
+
size 285103252
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|