Compactbot commited on
Commit
fc4ad9c
·
verified ·
1 Parent(s): a7dc088

Add honest model card (architecture, training, undertraining status, real samples)

Browse files
Files changed (1) hide show
  1. README.md +101 -0
README.md ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ pipeline_tag: text-generation
4
+ language: en
5
+ library_name: transformers
6
+ tags:
7
+ - tiny
8
+ - tiny-model
9
+ - slm
10
+ - small-language-model
11
+ - sub-10m
12
+ - llama
13
+ - from-scratch
14
+ metrics:
15
+ - perplexity
16
+ ---
17
+
18
+ # LDT-10M
19
+
20
+ A **10,284,480-parameter** LLaMA-style text model, trained from scratch. This is a
21
+ verified **first checkpoint** for the LDT-10M request (model-requests #12,
22
+ DedeProGames) — real weights, real training, but **undertrained** (see the honest
23
+ status below). It is not a quality release yet; the card states that plainly.
24
+
25
+ ## Architecture
26
+
27
+ Standard LLaMA block, no sliding window, no GQA:
28
+
29
+ | field | value |
30
+ |---|---|
31
+ | params (learnable) | **10,284,480** |
32
+ | layers | 5 |
33
+ | d_model | 320 |
34
+ | heads | 5 (head_dim 64) |
35
+ | FFN | SwiGLU, inter 896 |
36
+ | vocab | 12,288 (gollem byte-level BPE) |
37
+ | context | 512 |
38
+ | embeddings | tied (lm_head → tok.weight) |
39
+ | norm | RMSNorm, pre-norm |
40
+ | attention | causal, RoPE (base 10000) |
41
+
42
+ The parameter count is the learnable total: the raw safetensors sum is 14,216,640,
43
+ which double-counts the tied embedding (tok.weight 12288×320 = 3,932,160) that
44
+ `head.weight` aliases. Tied, the true count is 10,284,480.
45
+
46
+ ## Training
47
+
48
+ - **Data:** FineWeb-Edu (~30.1M tokens) + DCLM-baseline (~21.4M tokens) = **~50.5M tokens**.
49
+ - **Steps:** 4000 (the requested 2.6B-token budget is **not** met — see below).
50
+ - **Final val loss:** 4.6020 (ppl 99.68) on the held-out split.
51
+ - Trained from scratch (no base model).
52
+
53
+ ## Honest status: undertrained, not broken
54
+
55
+ The model learned real context — val loss 4.602 is well below the 7.38 unigram
56
+ floor, so it is **not** flatlined and **not** degenerate. But it has seen only
57
+ ~50.5M tokens ≈ **4.9 tokens/param**, far below the ~10–20+ tok/param small
58
+ models typically need for coherent prose. The result is grammatical but
59
+ semantically thin: wordy, repetitive, and it drifts off-topic mid-sentence.
60
+
61
+ Real samples (best.pt, step 4000, temp 0.8, top-k 40) — no broken tokens, no
62
+ token-loops:
63
+
64
+ > "The sun is" → "The sun is assembled by a new study because he is an associate
65
+ > of the study of the disease in the early years. I've been interested in having
66
+ > a very different study…"
67
+
68
+ > "Once upon a time" → "Once upon a time, she is an attack. But he is not a good
69
+ > idea. But it is something that does not have a moment of his own life…"
70
+
71
+ > "The cat sat on the" → "The cat sat on the ground. The sunp is a piece of light
72
+ > and is not a good deal of tear. The new story of the MD's Ford…"
73
+
74
+ > "def hello():" → "def hello(): I have a lot of the best. I'm not sure what
75
+ > happened to me. I'll be able to do anything, but I think it's been just a lot
76
+ > to say…"
77
+
78
+ **What this is:** a verified, non-degenerate 10M checkpoint that learned grammar
79
+ and surface fluency. **What it is not:** a coherent prose model. It is a first
80
+ milestone on the path to the requested 2.6B-token model, not the destination.
81
+
82
+ ## Loading
83
+
84
+ Self-contained `model.py` (no transformers dependency required):
85
+
86
+ ```python
87
+ import torch
88
+ from model import LDT
89
+
90
+ m = LDT.from_pretrained("model.safetensors", device="cpu")
91
+ ids = torch.tensor([[1, 2, 3]]) # token ids
92
+ out = m.generate(ids, max_new_tokens=64, temperature=0.8, top_k=40, seed=0)
93
+ ```
94
+
95
+ The tokenizer is a byte-level BPE (`tokenizer.json`, vocab 12288).
96
+
97
+ ## Roadmap
98
+
99
+ Continuing training toward the 2.6B-token budget is the next step; this repo
100
+ will be updated (or a v2 published) once the model is coherent. This checkpoint
101
+ is kept public as an honest intermediate, not a finished model.