Views
No views yet
The Hub's Safetensors panel reportsF16. That is the storage dtype, not the weight precision. The in-block linear weights inmodel.safetensorstake exactly three distinct values —scale × {-1, 0, +1}— but are stored dequantized into fp16 so any standard fp16 loader reads them with no custom code. The actual 1.58-bit packed form ismodel.tpack, and that is what the byte figures below measure.
| Parameters | 1,377,408 |
| Total bytes (packed, spec §6) | 1,216,896 (1.16 MiB) — 2.3× smaller than its fp16 twin |
| Layers / width / heads | 4 / 128 / 4 |
| Context | 512 |
| Vocab | 4,096 (custom BPE, ByteLevel) |
| In-block linear weights | ternary {-1,0,+1}, per-tensor absmean scale (1.58 bits/weight packed) |
| Embeddings / LM head (tied) | fp16 |
| Seeds | 0, 1 (both published, see below) |
| Training tokens | 500M |
model.safetensors (fp16). Ternary in-block linears are stored
dequantized — scale * {-1,0,+1} already materialized in fp16 — so both arms load
into the same fp16 model class.1from safetensors.torch import load_file
2from nanofable.config import TIERS
3from nanofable.model import build_model
4from nanofable.tokenizer import load_tokenizer
5from nanofable.generate import generate
6
7model = build_model(TIERS["tiny"], "fp16")
8model.load_state_dict(load_file("model.safetensors"), strict=False) # lm_head re-ties to tok_emb
9model.eval()
10
11tok = load_tokenizer("tokenizer.json")
12print(generate(model, tok, "Once upon a time", temperature=1e-4, top_k=0))model.safetensors # seed 1 — the weights this card describes
config.json
model.tpack # packed browser payload (the compressed artifact)
meta.json eval.json metrics.csv
tokenizer.json # 4,096-vocab custom BPE
seed0/ # second training replica, same files| seed 0 | seed 1 (root) | |
|---|---|---|
| Val PPL | 52.37 | 54.83 |
| Judge (0-5, n=200) | 0.865 [0.79, 0.94] | 0.945 [0.86, 1.03] |
model.tpack is the packed browser payload (pack format v1), with in-block linears at
1.58 bits/weight. This is the artifact the byte accounting above refers to, and what
the demo site streams.model.safetensors is not the compressed form — it stores the ternary
weights dequantized (scale × {-1,0,+1} materialized back into fp16), so it is the
same size as its fp16 twin. That is deliberate: it keeps the weights loadable by any
standard fp16 model class. The compression is real, but it lives in the .tpack.