Views
No views yet
Total params: 54,538,752 (~54.5M)
Hidden dim: 512
Layers: 12
Attention heads: 8 (MHA, no GQA)
Head dim: 64
MLP intermediate: 2048 (SwiGLU)
Vocab size: 8192
Max sequence: 8192
Attention pattern: Gemma 4 alternating sliding window (window=1024) + global, last layer global
Norm: RMSNorm, pre-norm
Position encoding: RoPE on Q and K
Embeddings: tied input/output
Activation: SwiGLU
MoE: none
Engram: nonePhase 1 (pretrain):
Compute: Thunder Compute single GPU
Steps: 48,220 of a 100,000 step target (paused early)
Throughput: 86,800 tokens per second
Optimizer: Muon for hidden 2D weights, AdamW for embeddings and norms
LR schedule: WSD (warmup-stable-decay)
Stabilizers: lm_head logit cap 30, z-loss coefficient 1e-4
Phase 2 (anneal):
Compute: Colab A100
Steps: 20,000 (full anneal complete)
Final cross-entropy: 3.27
Mix: OpenWebMath, FineWeb-Edu carryover, NuminaMath, MetaMathQA, ArXiv, Cosmopedia, AI2 ARCmodels/model.pt — anneal final checkpoint (model state only, 105 MB bf16)models/pretrain.pt — pretrain step 47,500 (with optimizer state, 217 MB)models/tokenizer.json — custom 8192-vocab BPEcode/ — minimum loading code (model.py, config.py, tokenizer.py, muon.py)1import sys, torch
2sys.path.insert(0, 'code')
3from config import Config
4from model import ToyLM
5from tokenizer import load_tokenizer
6
7ck = torch.load('models/model.pt', map_location='cpu', weights_only=False)
8cfg = Config(**ck['cfg']) if isinstance(ck['cfg'], dict) else ck['cfg']
9model = ToyLM(cfg).cuda().to(torch.bfloat16)
10model.load_state_dict(ck['model'])
11model.eval()
12
13tok = load_tokenizer('models/tokenizer.json')
14ids = torch.tensor([tok.encode('The capital of France is').ids], device='cuda')
15with torch.no_grad():
16 for _ in range(40):
17 logits, _ = model(ids)
18 nxt = logits[:, -1].argmax(-1, keepdim=True)
19 ids = torch.cat([ids, nxt], 1)
20print(tok.decode(ids[0].tolist()))| Prompt | Output |
|---|---|
The capital of France is | "covered by the Crown" (for example, the Great Seal of France...) |
To compute 12 plus 7, we can | now use the first 6 as a reversible input... |
Question: What is 23 + 19? Answer: | The answer is 23. Answer: 23. Answer: 23 (loops) |
def fibonacci(n): | // Appendix A. - S. B. V. Shanker. - S. M. P. Gerber... |
Once upon a time, in a small village, | a woman is a gentleman in a village with an infinite wealth... |
Solve: 17 * 23 = ? | ?????\n***** (breakdown) |
@misc{shard40mv1,
author = {Shane (Crownelius)},
title = {Shard-40m-v1: a 54.5M dense transformer trained on consumer compute},
year = {2026},
publisher = {HuggingFace},
url = {https://huggingface.co/CompactAI-O/Shard-40m-v1}
}