Views
No views yet
runs/run_lfm2_quantum_mini.sh.CCCCCCCCCCAAAAAA)n_embd=1024, 16 query heads / 8 KV heads (GQA), head_dim=64, seq_len=1024vocab_size=32768nanochat/gpt.py's QuantumMLP)theta=1e6, full (non-windowed) attention (window_pattern=L)config.json (metadata only) and meta_002162.json (exact
training config this checkpoint was produced with).transformers model -- there is no
AutoModel support. config.json is provided for discoverability/metadata
only; to actually load the model, use the bundled nanochat/ package as
shown below.nanochat/ source needed to load and run the
model, so it's self-contained (no need to clone the full training repo).1pip install torch tiktoken rustbpe filelock kernels
2# download this repo, e.g.:
3hf download MarkChenX/lfm2-quantum-128m --local-dir ./lfm2-quantum-128m
4cd lfm2-quantum-128m
5python inference.py --prompt "The history of quantum computing"inference.py for the full loading + generation code (~15 lines): it
calls nanochat.checkpoint_manager.build_model(".", step=2162, ...) to build
the model from model_002162.pt + meta_002162.json, loads the tokenizer
from tokenizer/, and streams tokens via the model's own .generate().optim_002162_rank0.pt is the matching Muon/AdamW optimizer state (momentum
buffers etc.) for this step. To continue pretraining with the original
Quantum-GPT repo, place model_002162.pt,
optim_002162_rank0.pt and meta_002162.json under
$NANOCHAT_BASE_DIR/base_checkpoints/lfm2-quantum-128m/, then run:RESUME_FROM_STEP=2162 MODEL_TAG=lfm2-quantum-128m bash runs/run_lfm2_quantum_mini.shmodel_002162.pt +
meta_002162.json + tokenizer/ are needed (the optimizer shard is
pretraining-only).