Views
No views yet
<|forward|> - Standard left-to-right generation<|backward|> - Right-to-left generation (reversed sequences)| Parameter | Value |
|---|---|
| Parameters | ~760M |
| Layers | 20 |
| Hidden Size | 1280 |
| Attention Heads | 10 |
| Vocab Size | 65,536 |
| Context Length | 2,048 |
1import torch
2from nanochat.checkpoint_manager import load_model
3
4# Load model (automatically detects direction from checkpoint)
5model, tokenizer, meta = load_model("base", device="cuda", model_tag="d20_bidirectional")
6direction = meta["direction"] # "bidirectional"
7
8# For backward models, reverse your input before generation
9# and reverse the output after generation1# CLI chat
2python -m scripts.chat_cli --source=base --model-tag=d20_bidirectional
3
4# Web interface
5python -m scripts.chat_web --source=base --model-tag=d20_bidirectional1@misc{nanochat-bidirectional,
2 author = {Raghav},
3 title = {nanochat 760M Bidirectional},
4 year = {2025},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/raghavt/nanochat-760M-bidirectional}
7}