File size: 4,699 Bytes
fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fabff55 fc4ad9c 1a279d1 fc4ad9c fabff55 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c fabff55 fc4ad9c fabff55 fc4ad9c fabff55 fc4ad9c fabff55 fc4ad9c fabff55 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fc4ad9c 1a279d1 fabff55 1a279d1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | ---
license: apache-2.0
pipeline_tag: text-generation
language: en
tags:
- tiny
- tiny-lm
- tiny-model
- slm
- SLM
- small-language-model
- from-scratch
- llama
datasets:
- HuggingFaceFW/fineweb-edu
- allenai/dclm-baseline
metrics:
- perplexity
---
# LDT-10M
A 10.28M-parameter LLaMA-style language model, trained from scratch on FineWeb-Edu + DCLM.
**Requested by [DedeProGames](https://huggingface.co/DedeProGames) on the [model-requests board](https://huggingface.co/spaces/Compactbot/model-requests) (#12).**
## Architecture
| Parameter | Value |
|---|---|
| Params | **10,284,480** |
| Layers | 5 |
| d_model | 320 |
| Heads | 5 (MHA, GQA not used at this scale) |
| FFN dim | 896 (SwiGLU) |
| Vocab | 12,288 (gollem BPE) |
| Context | 512 |
| Embeddings | Tied (lm_head β tok.weight) |
| Norm | RMSNorm (eps 1e-5) |
| Attention | RoPE + causal SDPA |
| Dtype | float32 |
Standard LLaMA block: RMSNorm β MHA (RoPE) β residual β RMSNorm β SwiGLU FFN β residual.
## Training
| | |
|---|---|
| Steps | 4,000 |
| Batch size | 64 |
| LR | 3e-4 β 3e-5 (cosine decay) |
| Data | FineWeb-Edu (30.1M tok) + DCLM baseline (21.4M tok) = **~50.5M tokens** |
| Tokens/param | **~4.9** |
| Hardware | RTX 5090 (32 GB), GPU |
| Final val loss | **4.6020** (ppl 99.68) |
### β οΈ Honest caveat: undertrained and incoherent
DedeProGames requested **2.6B tokens**. This checkpoint is at **50.5M tokens** β a ~50Γ shortfall. The GPU was occupied by other work for most of the training window, and the CPU was over-subscribed.
At 4.9 tok/param the model has learned the **surface shape** of English β real words, parseable sentences, no token loops β but **not coherent meaning**. The val loss (4.602) is well below the 7.38 unigram floor, so it genuinely uses context rather than just reproducing the marginal word distribution; but the prose is **semantically incoherent** (word salad): grammatically plausible sentences that don't mean what they say.
This is a **first checkpoint**, not the final deliverable. Continued training toward the 2.6B budget is planned.
## Eval (40 samples, 8 prompts Γ 5 seeds, temp 0.8, top-k 40)
| Metric | Value |
|---|---|
| mean loop_frac | 0.042 |
| max loop_frac | 1.0 (one sample) |
| Degenerate? | **No** |
| Below unigram floor? | **Yes** (4.602 < 7.38) |
### Sample outputs
> "The cat sat on the earth and it will be asleep. It is also a little time to get up the world. So the world is a fancy mound, and it is a little more common one. The last thing about the world is a part of a real life. It would be a great place, like it and in the earth. The problem is, the old world will be a good idea. So the world is just a bit of a whole larvity."
> "She opened the door and started her home and said she was in the room. The only time she wasn think she was being a young girl. She didn't have that. She was not like the kids that was the one who had been killed in the kitchen. She was in a house a few months later. She was a very small girl and she was at her friends."
> "Once upon a time, the person will be sent to each other, or if you are going to go through it. So, you know, that's the question of what we are talking about. But a lot of people are going to have a good chance of a feeling. But that is, I do not know what they're going to do."
> "def hello(): I can understand how to make a word. You can't find the word to say (they'll do anything) and try to explain it. I'm not sure if I can't read it, but I'm trying to figure out what to do to say, but I'm sure I'm using a code that I have to look at the other side of a computer."
These are real outputs from the eval run (not hand-picked for coherence). The text is grammatically structured β real words, parseable sentences, no token loops, no broken tokens β but semantically incoherent. That is the honest state of a 10M model at 4.9 tok/param.
## Usage
The model uses a custom `LDT` architecture (standard LLaMA block, no special tricks). The safetensors file contains 47 tensors with tied embeddings (lm_head is not stored separately; it shares `tok.weight`).
To load with a custom model class, you need a small LLaMA-style implementation matching the config above. The training script (`train_ldt10m_fixed.py`) contains the full architecture definition.
## What this is NOT
- Not a 2.6B-token model (that's the target; this is the 50.5M checkpoint)
- Not a coherent-text model (it produces grammatically-structured word salad at this token budget)
- Not a general-purpose assistant (it's a raw LM, no instruction tuning)
- Not a replacement for anything larger β it's a research checkpoint in a from-scratch training run |