TinyQwen3-1.8M-Base
TinyQwen3-1.8M-Base is a small causal language model using the Qwen3 dense architecture.
The tokenizer and model weights were pretrained from scratch on the 50k configuration of TinyStories-Tiered, a cleaned, deterministic and tiered edition of TinyStories. No pretrained Qwen weights were used.
Model specification
| Property | Value |
|---|---|
| Architecture | Qwen3ForCausalLM |
| Parameters | 1,836,544 |
| Layers | 2 |
| Hidden size | 256 |
| Intermediate size | 768 |
| Attention heads | 4 |
| KV heads | 2 |
| Head dimension | 64 |
| Vocabulary | 1,024-token byte-level BPE |
| Context length | 256 |
| Tied input/output embeddings | Yes |
The repository contains an FP16 checkpoint at the root, with BF16 and FP32 checkpoints in the bf16/ and fp32/ subdirectories. The tokenizer is shared by all checkpoints and is loaded from the root.
Training
The training corpus is the train split of the 50k tier: 50,000 stories, about 14.66M tokens including one EOS per story as measured by the dataset's reference tokenizer. All tokens are packed into 256-token windows with one-token overlap, and the 50 epochs represent approximately 733M predicted-token exposures over the same training subset.
Each run trains a fresh 1,024-token byte-level BPE on the first 2,048 training stories. Because tiers are nested prefixes, this tokenizer sample is identical for every tier from 2k upward.
| Property | Value |
|---|---|
| Dataset | MehTheHedgehog/TinyStories-Tiered |
| Configuration | 50k |
| Revision | 2068b007ca3cc349857c8996bd7de5e169635220 |
| Epochs | 50 |
| Training batch size | 32 |
| Evaluation batch size | 64 |
| Optimizer | AdamW, betas (0.9, 0.95) |
| Learning rate | 0.0005 |
| Weight decay | 0.1 |
| Gradient clipping | 1.0 |
| Seed | 1234 |
| Token exposure | 733,112,000 |
| Training time | 3,786 sec / ~63 min |
| Epoch time | ~75 sec |
| GPU | Nvidia RTX 3060 6GB Mobile |
| Best checkpoint epoch | 49 |
| Best checkpoint token exposure | 718,449,760 |
| Epoch | Train loss |
|---|---|
| 1 | 2.5395 |
| 10 | 1.6710 |
| 25 | 1.5953 |
| 49 (best) | 1.5632 |
| 50 | 1.5626 |
| Split | Stories | Tokens | Role |
|---|---|---|---|
| Train | 50,000 | 14,662,240 | Training corpus |
| Validation | 2,500 | 727,083 | Per-epoch evaluation and checkpoint selection |
| Test | 2,500 | 710,835 | Single held-out evaluation of the best checkpoint |
To reproduce the recorded settings, run from this directory:
python train.py --tier 50k --epochs 50 --seed 1234
Checkpoints, the tokenizer, and metrics.json are written to the current working directory by default. Use --output-dir to choose another folder.
Evaluation
Training evaluates the tier's validation split after every epoch, and the best checkpoint is selected on it. The held-out test split is evaluated once on the best checkpoint and recorded as best_test.
The following results come from reloading and evaluating each serialized checkpoint on the packed validation split:
| Checkpoint | Cross-entropy (nats/token) | Perplexity | Next-token accuracy |
|---|---|---|---|
| FP16 | 1.662866 | 5.2744 | 58.9752% |
| BF16 | 1.663002 | 5.2751 | 58.9778% |
| FP32 | 1.662863 | 5.2744 | 58.9715% |
Cross-entropy is token weighted; perplexity is its exponential. These metrics use the model's 1,024-token tokenizer and 256-token context. The first token of the validation corpus supplies context rather than a prediction target.
Validation loss fell steadily and reached its minimum at epoch 49, the retained checkpoint:
| Epoch | Split | Eval loss | Perplexity | Next-token accuracy |
|---|---|---|---|---|
| 1 | validation | 2.0942 | 8.1190 | 51.05% |
| 10 | validation | 1.7314 | 5.6487 | 57.66% |
| 25 | validation | 1.6821 | 5.3770 | 58.64% |
| 49 (best) | validation | 1.6629 | 5.2744 | 58.97% |
| 49 (best) | test | 1.6598 | 5.2580 | 59.14% |
| 50 | validation | 1.6647 | 5.2843 | 59.00% |
Full epoch history, checkpoint evaluations and the held-out test result are available in metrics.json.
Attributions
Architecture
The model uses the Qwen3 architecture but does not contain pretrained Qwen weights.
Qwen3 is described in Qwen3 Technical Report, Yang et al. (2025). The model implementation is provided by Hugging Face Transformers.
Dataset
TinyStories-Tiered is a cleaned, deduplicated and tiered edition of TinyStories, derived from the work of Ronen Eldan and Yuanzhi Li, authors of TinyStories: How Small Can Language Models Be and Still Speak Coherent English?.
The source dataset is licensed under CDLA-Sharing-1.0. The dataset is loaded from Hugging Face; model exports contain no dataset text.