Unseen1980 commited on
Commit
83f504f
·
verified ·
1 Parent(s): e6b666d

model card: public release — results, speed claim, architecture, limitations

Browse files
Files changed (1) hide show
  1. README.md +129 -37
README.md CHANGED
@@ -1,54 +1,146 @@
1
  ---
2
- library_name: pytorch
3
- tags: [daedalus, checkpoint, wsd]
 
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
- # Daedalus — training checkpoints
7
 
8
- Working checkpoints for [unseen1980/daedalus](https://github.com/unseen1980/daedalus):
9
- a ~150M-parameter LFM2-class conv/attention hybrid, trained on a rented GPU box
10
- that does not survive a recycle. AGENT.md §0.2: *"Never store state only on this
11
- box... If it isn't pushed, it doesn't exist."*
12
 
13
- These are `torch.save` payloads, not `transformers` weights. Final GGUF exports
14
- live elsewhere.
15
 
16
- ## Layout
17
 
18
- | branch | path | contents | size |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  |---|---|---|---|
20
- | `rolling` | `rolling/<run>/weights.pt` | weights only, bf16 | 321 MB |
21
- | `<run>-stable-end-step<N>` | `milestone/<run>/checkpoint.pt` | weights + Muon + AdamW state, fp32 | 1.4 GB |
 
 
 
 
 
22
 
23
- `rolling` is overwritten roughly every 2 hours and exists purely so that losing
24
- the instance costs at most two hours rather than the whole run. Each milestone
25
- branch is written once and is never overwritten.
26
 
27
- `latest-rolling-<run>.json` and `latest-milestone-<run>.json` on `main` record
28
- step and tokens-seen, so progress can be read without downloading a checkpoint.
29
 
30
- ## The milestone is a branch point
 
31
 
32
- It is written at the step the WSD schedule leaves its stable phase
33
- (`decay_frac=0.45`, i.e. 55% of the run), with full optimizer state. That is the
34
- practical advantage of WSD over cosine: pre-decay weights can be trained further
35
- on more or different data and then re-decayed, whereas a model already annealed
36
- to lr≈0 needs an lr re-warmup from a converged state and does measurably worse.
37
- Optimizer state is included because a branch that has to rebuild Muon's momentum
38
- buffers and AdamW's moments loses ground on restart.
39
 
40
- ```bash
41
- python train.py --run-name hero-ext --config daedalus-150m \
42
- --data-dir data/shards --total-tokens <new budget> \
43
- --resume 'hub://Unseen1980/daedalus-checkpoints/milestone/hero/checkpoint.pt?rev=hero-stable-end-step<N>'
44
  ```
45
 
46
- `--resume` accepts `hub://owner/repo/path?rev=branch` directly and resolves it to
47
- a local file, so restoring from here takes the same code path as a local resume.
 
 
48
 
49
- ## Verification
 
 
 
50
 
51
- The upload and restore path was checked live against this repo before any long
52
- run depended on it LFS, branch creation, and a clean-directory download and
53
- resume. Worst relative weight delta through the bf16 round trip: 0.0039.
54
- See `runs/preflight/hub-restore.md` in the GitHub repo.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: apache-2.0
3
+ library_name: gguf
4
+ pipeline_tag: text-generation
5
+ language:
6
+ - en
7
+ tags:
8
+ - daedalus
9
+ - cpu-inference
10
+ - gguf
11
+ - hybrid
12
+ - conv-attention
13
+ base_model: Unseen1980/daedalus-checkpoints
14
  ---
15
 
16
+ # Daedalus-150M
17
 
18
+ A 150M-parameter language model built for **CPU inference**. Two thirds of its
19
+ layers are short convolutions with a fixed-size state instead of attention, so
20
+ decoding does not slow down as the context grows.
 
21
 
22
+ Trained from scratch on 59.9B tokens. Code and paper:
23
+ [unseen1980/daedalus](https://github.com/unseen1980/daedalus).
24
 
25
+ ## Quick start
26
 
27
+ ```bash
28
+ brew install llama.cpp # or build from ggml-org/llama.cpp
29
+ hf download Unseen1980/daedalus-checkpoints instruct/model-q4_0.gguf --local-dir ./daedalus
30
+
31
+ llama-cli -m ./daedalus/instruct/model-q4_0.gguf -cnv \
32
+ --temp 0.8 --top-p 0.9 --repeat-penalty 1.15
33
+ ```
34
+
35
+ **Pass sampling flags.** llama.cpp defaults `--repeat-penalty` to 1.0, i.e. off,
36
+ and this model will loop on a repeated token without it.
37
+
38
+ ## Files
39
+
40
+ | File | Size | What |
41
+ |---|---|---|
42
+ | `instruct/model-q4_0.gguf` | 102 MB | chat model, 4-bit — **start here** |
43
+ | `gguf/hero-base-q4_0.gguf` | 102 MB | base model, text completion |
44
+ | `gguf/instruct-f16.gguf` | 323 MB | instruct, f16 — for re-quantising |
45
+ | `gguf/hero-base-f16.gguf` | 323 MB | base, f16 |
46
+ | `hf/instruct/`, `hf/base/` | 321 MB | HF-format safetensors + tokenizer |
47
+ | `final/hero/checkpoint.pt` | 1.4 GB | base weights + optimizer state |
48
+ | `final/post-sft/final.pt` | 642 MB | instruct weights, full precision |
49
+
50
+ The **base** model deliberately carries no chat template. Giving one to a base
51
+ model makes llama.cpp wrap prompts in markup it never saw during training, which
52
+ produces fluent but unrelated output. Use plain prompts, or `llama-completion`.
53
+
54
+ ## Results
55
+
56
+ Five-task mean over HellaSwag, ARC-Easy, PIQA, OpenBookQA and WinoGrande, with
57
+ every peer re-scored on the same harness rather than quoted from its paper.
58
+
59
+ | Model | Training tokens | 5-task mean |
60
+ |---|---|---|
61
+ | **Daedalus-150M** | **59.9B** | **47.31** |
62
+ | MobileLLM-125M | 1T | 46.3 *(published)* |
63
+ | GPT-2 124M | — | 42.2 |
64
+ | OPT-125M | 180B | 42.1 |
65
+ | GPT-neo-125M | 300B | 41.9 |
66
+ | Pythia-160M | 300B | 41.0 |
67
+ | SmolLM2-135M | 2T | 51.2 |
68
+
69
+ Validation bits-per-byte **0.8685** over 645M held-out tokens.
70
+
71
+ SmolLM2-135M stays ahead on quality — conceded in advance. The trade this model
72
+ makes is speed.
73
+
74
+ ## Speed
75
+
76
+ CPU decode, 4-bit, 8 threads, against a parameter-matched all-attention twin
77
+ trained on identical data:
78
+
79
+ | Context | Daedalus | Dense twin | Ratio |
80
  |---|---|---|---|
81
+ | 0 | 1112 tok/s | 923 tok/s | 1.20× |
82
+ | 512 | 960 tok/s | 664 tok/s | 1.45× |
83
+ | **2048** | **739 tok/s** | **420 tok/s** | **1.76×** |
84
+
85
+ **The trend is the result.** At an empty context the hybrid has nothing to gain —
86
+ its advantage *is* the key–value cache it does not keep. Against an external
87
+ 135M peer the same pattern reaches **2.08×** at 2048 tokens.
88
 
89
+ Per token of context this model reads 6,144 bytes of cache against a 24-layer
90
+ all-attention model's 12,288 half. At 2048 tokens that is 12.6 MB re-read per
91
+ generated token instead of 25.2 MB.
92
 
93
+ ## Architecture
 
94
 
95
+ ```
96
+ 18 blocks, d_model 768, vocab 49,152, context 2048
97
 
98
+ block: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
99
+ type: C C C C A C C A C A C A C A C C A C
 
 
 
 
 
100
 
101
+ A = full attention (6) GQA, 12 query heads / 4 KV heads
102
+ C = short convolution (12) depthwise, kernel 3, fixed 2-step state
 
 
103
  ```
104
 
105
+ Tied embeddings, 2048 FFN, RoPE θ=1e6. `Q4_0` chosen for ARM kernel speed rather
106
+ than its error curve.
107
+
108
+ ## Training
109
 
110
+ 59.9B tokens over a 16.9B-token corpus (~3.5 epochs, capped at 4 per source) of
111
+ public English data weighted toward educational text: FineWeb-Edu 37.5%,
112
+ DCLM-baseline 22.5%, Stack-Edu 9%, FinePDFs-Edu 8%, FinePhrase 7%,
113
+ Cosmopedia-v2 5%, FineMath + InfiWebMath 6%, FineWiki-en 3%, dialogue 2%.
114
 
115
+ Muon on weight matrices, AdamW on embeddings and norms. WSD schedule with linear
116
+ decay to zero over the final 45%. One RTX 5090, ~$46 of GPU time.
117
+
118
+ Post-training: SFT on smol-smoltalk, then one DPO round on UltraFeedback.
119
+
120
+ ## Limitations
121
+
122
+ - **English only**, 2048-token context, single seed.
123
+ - **4-bit costs ~6% perplexity**, not the ~2.5% intended — quantisation-aware
124
+ training was built and validated, then crashed on activation and never ran.
125
+ The f16 files let you re-quantise without retraining.
126
+ - **~48% of convolution channels are dead** (13.6M inert parameters). They
127
+ cannot be pruned at export: llama.cpp shape-checks those tensors against the
128
+ model width.
129
+ - **Vocabulary is oversized** at 49,152 — inherited from a tokenizer chosen for
130
+ a distillation plan that was cancelled. Scaling laws suggest 24–32k here; it
131
+ costs 23% of parameters to a lookup table.
132
+ - **Mixture skew 10.42** against a 10.0 pre-registered limit, from training
133
+ 59.9B tokens on a 16.9B corpus.
134
+ - It is a 150M model. It writes fluent, plausible text and gets many facts
135
+ wrong. The right reference class is GPT-2 124M.
136
+
137
+ ## Citation
138
+
139
+ ```bibtex
140
+ @misc{koutsiaris2026daedalus,
141
+ title = {Daedalus-150M: A Convolution--Attention Hybrid Designed for CPU Inference},
142
+ author = {Christos Koutsiaris},
143
+ year = {2026},
144
+ url = {https://github.com/unseen1980/daedalus}
145
+ }
146
+ ```