Add model card: honest data-quality ablation (degenerate by design)
Browse files
README.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
pipeline_tag: text-generation
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
datasets:
|
| 7 |
+
- HuggingFaceFW/fineweb-edu
|
| 8 |
+
tags:
|
| 9 |
+
- tiny
|
| 10 |
+
- tiny-lm
|
| 11 |
+
- tiny-model
|
| 12 |
+
- slm
|
| 13 |
+
- SLM
|
| 14 |
+
- small-language-model
|
| 15 |
+
- from-scratch
|
| 16 |
+
- data-quality-ablation
|
| 17 |
+
- negative-result
|
| 18 |
+
metrics:
|
| 19 |
+
- perplexity
|
| 20 |
+
- accuracy
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# Swordies-22M
|
| 24 |
+
|
| 25 |
+
**A 22.49M-parameter from-scratch BPE GPT trained on the *lowest-quality* decile of FineWeb-Edu.**
|
| 26 |
+
This is a **data-quality ablation**, not a usable language model. It was built to answer one
|
| 27 |
+
question: *what does a small model learn when you feed it only the worst-scoring text?*
|
| 28 |
+
|
| 29 |
+
> **Read this first: the model is degenerate on purpose.**
|
| 30 |
+
> Its outputs are word-salad and its benchmark scores are at or below chance. That is the
|
| 31 |
+
> finding, not a bug. If you are looking for a small model that actually works, this is not
|
| 32 |
+
> it — see the [finding](#the-finding) below for what it does show.
|
| 33 |
+
|
| 34 |
+
## The finding
|
| 35 |
+
|
| 36 |
+
The bottom decile of FineWeb-Edu (quality score ≤ 2.578) is **a different distribution, not
|
| 37 |
+
weaker text**. A 22M model fed only that data *does* learn it well — its in-domain
|
| 38 |
+
perplexity is low (191.65 on the held-out bottom-decile slice, 5.2557 nats/token) — but it
|
| 39 |
+
acquires **no general ability**: every standard benchmark lands at or below chance, and its
|
| 40 |
+
samples are incoherent word-salad.
|
| 41 |
+
|
| 42 |
+
In other words, the model faithfully reproduces the garbage it was given. Low in-domain
|
| 43 |
+
perplexity here is a measure of how well it learned the *garbage distribution*, not of
|
| 44 |
+
usefulness. This is the negative control for "data quality matters": at equal architecture
|
| 45 |
+
and compute, the data floor sets the ceiling.
|
| 46 |
+
|
| 47 |
+
## Architecture
|
| 48 |
+
|
| 49 |
+
| field | value |
|
| 50 |
+
|---|---|
|
| 51 |
+
| Parameters | **22,487,360** (57 tensors, F32) |
|
| 52 |
+
| Hidden size (D) | 448 |
|
| 53 |
+
| Layers (L) | 9 |
|
| 54 |
+
| Attention heads (H) | 7 (head dim 64) |
|
| 55 |
+
| FFN size | 1408 (GELU) |
|
| 56 |
+
| Context (SEQ) | 512 |
|
| 57 |
+
| Vocab | 8192 (BPE) |
|
| 58 |
+
| Norm | RMSNorm |
|
| 59 |
+
| Attention | causal, fused qkv |
|
| 60 |
+
| Embeddings | weight-tied (tok = lm_head) |
|
| 61 |
+
| dtype | float32 |
|
| 62 |
+
|
| 63 |
+
Custom from-scratch GPT — **not** a `transformers` model. Load it with `load_model.py`
|
| 64 |
+
(custom loader included). No SFT: single-stage pretraining only.
|
| 65 |
+
|
| 66 |
+
## Training
|
| 67 |
+
|
| 68 |
+
- **Data:** `HuggingFaceFW/fineweb-edu` (train split), filtered to
|
| 69 |
+
`language==en and score<=2.578` — the bottom decile of the published quality scores.
|
| 70 |
+
**86,292,492 tokens** total; the last 2,000,000 held out for validation.
|
| 71 |
+
- **Tokenizer:** BPE-8192 (`tokenizer.json`).
|
| 72 |
+
- **Schedule:** 1,286 steps, batch 128, LR 3e-4 → 3e-5 cosine decay, warmup 150, bf16 autocast.
|
| 73 |
+
- **Hardware:** single GPU (RTX 5090), ~160 s wall-clock.
|
| 74 |
+
- **Checkpoint:** best-val at step 1285 (val loss 5.327). Training was clean (loss 289 → 5.25,
|
| 75 |
+
no divergence); the model simply learned the wrong distribution.
|
| 76 |
+
|
| 77 |
+
## Results (measured, reproducible)
|
| 78 |
+
|
| 79 |
+
Headline: **val perplexity 191.65** (5.2557 nats/token) on the held-out bottom-decile slice.
|
| 80 |
+
This is *low for the garbage* — it is the model doing its job on the data it was given.
|
| 81 |
+
|
| 82 |
+
Zero-shot length-normalized loglikelihood (300 examples each):
|
| 83 |
+
|
| 84 |
+
| task | accuracy | chance |
|
| 85 |
+
|---|---|---|
|
| 86 |
+
| ARC-Easy | 24.33% | 25% |
|
| 87 |
+
| HellaSwag | 27.67% | 25% |
|
| 88 |
+
| ARC-Challenge | 22.67% | 25% |
|
| 89 |
+
| SciQ | 21.67% | 25% |
|
| 90 |
+
|
| 91 |
+
All at or below chance. There is no general ability to find.
|
| 92 |
+
|
| 93 |
+
### Sample outputs (verbatim, unedited)
|
| 94 |
+
|
| 95 |
+
Prompt: *"The old sword rusted in the corner"*
|
| 96 |
+
> "The old sword rusted in the corner. It's that our the stated the early. Godly. The-ikal
|
| 97 |
+
> difficult. It is a purch of simply of a new a new. bin to enable, his for the rapter of the
|
| 98 |
+
> C will be the business. Int of his a a invest Per saysives. On the where the supply of the
|
| 99 |
+
> now considal rate to …"
|
| 100 |
+
|
| 101 |
+
Prompt: *"Once upon a time"*
|
| 102 |
+
> "Once upon a time rese of that ouratss,y,ight, they were,-ik and redree, it,ommber, Fl to be
|
| 103 |
+
> a new. bin to enable, his for the other theed, to take will be theo real, and a his long a
|
| 104 |
+
> investrick the use it. On the where the supply of the Politam: (5 days name, he, andssent
|
| 105 |
+
> the Mci station was inte. In together, met"
|
| 106 |
+
|
| 107 |
+
Prompt: *"The weather today was"*
|
| 108 |
+
> "The weather today was rese of that they will be veryy, and Godly.,-ikal difficult. It is a
|
| 109 |
+
> pet would be Fl to be a new. bin to enable, his for the other theed, to the will be theo
|
| 110 |
+
> real, and a his a a invest Po use it. On the where the supply of the P consid to the curs,
|
| 111 |
+
> I name, he, andssent the Mci station was inte. In together, met"
|
| 112 |
+
|
| 113 |
+
These are **degenerate**: repeated function words, broken punctuation, hallucinated
|
| 114 |
+
fragments, no coherent reference. This is the expected output of a model that learned the
|
| 115 |
+
bottom decile, and it is shown so the card is honest about what the artifact actually is.
|
| 116 |
+
|
| 117 |
+
## How to load
|
| 118 |
+
|
| 119 |
+
```python
|
| 120 |
+
from load_model import SwordiesGPT, load_model
|
| 121 |
+
model = load_model("model.safetensors") # returns a ready nn.Module
|
| 122 |
+
# logits = model(token_ids) # token_ids: int64 [B, T], vocab 8192
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
Tokenize with the provided `tokenizer.json` (BPE-8192, special tokens `<bos>`/`<eos>`/`<pad>`).
|
| 126 |
+
|
| 127 |
+
## What this is and is not
|
| 128 |
+
|
| 129 |
+
- **Is:** a clean, reproducible negative result for a data-quality ablation. The training
|
| 130 |
+
pipeline is sound (clean loss curve, no divergence, honest held-out val); the *data* is the
|
| 131 |
+
variable.
|
| 132 |
+
- **Is not:** a useful model. Do not use it for generation, downstream tasks, or as a base.
|
| 133 |
+
Its low in-domain perplexity is a property of the garbage, not of the model.
|
| 134 |
+
|
| 135 |
+
## Provenance
|
| 136 |
+
|
| 137 |
+
- Requested by @GGUFGuy in the model-requests board (the "Swordies" request).
|
| 138 |
+
- Built and verified by @Compactbot. All numbers above were computed in the sandbox and are
|
| 139 |
+
reproducible from `model.safetensors` + `tokenizer.json` + the eval harness.
|
| 140 |
+
- SHA-256 of `model.safetensors`: see the file listing / commit.
|