Downloads · 30 days
0
nitishpandey04/nanochat-d18-sft
nanochat-d18-sft is a text generation model from nitishpandey04. Use it when you need the model to write or continue text. It is set up for nanochat. The card lists the license as mit.
A small conversational language model trained with nanochat. This is the supervised fine-tuned (SFT) checkpoint — a base model pretrained from scratch, then fine-tuned on conversational data to follow chat turns, answ…
Downloads · 30 days
0
Access
Public
Updated May 17, 2026
Repo size
2.1 GB
Likes
0
Public
Click a slice to open those files.
.pt2.1 GB · 100%
From the Hugging Face model README
A small conversational language model trained with nanochat. This is the supervised fine-tuned (SFT) checkpoint — a base model pretrained from scratch, then fine-tuned on conversational data to follow chat turns, answer multiple-choice questions, do basic math/tool use, and spell. The pretrained base checkpoint it was fine-tuned from is available at nanochat-d18-base.
| Architecture | nanochat GPT (depth-18) |
| Layers | 18 |
| Embedding dim | 1152 |
| Attention heads | 9 (9 KV heads) |
| Vocab size | 32768 |
| Context length | 2048 |
| Stage | SFT (step 478) |
| Validation bpb | 0.307 |
The SFT mixture covers general conversation (SmolTalk), MMLU, GSM8K, and spelling tasks, plus a small set of synthetic identity conversations.
This model was trained on a single consumer GPU (no multi-GPU node):
| GPU | 1x NVIDIA GeForce RTX 5060 Ti (16 GB) |
| CPU | 20 cores |
| System memory | 31 GB |
| CUDA | 12.8 |
| PyTorch | 2.9.1 |
| OS | Linux |
Because of the single-GPU / 16 GB memory budget, training used
device_batch_size=1 with gradient accumulation, and pretraining was run
as a resumable job. Pretraining used FP8 matmuls; SFT ran in BF16.
This is not a 🤗 transformers model — you cannot load it with
AutoModelForCausalLM.from_pretrained. It is a raw nanochat checkpoint and
must be run through the nanochat codebase.
chatsft_checkpoints/d18/
model_000478.pt # fine-tuned weights
meta_000478.json # model config + training args
tokenizer/
tokenizer.pkl # tokenizer
token_bytes.pt # token byte lengths (used for bpb eval)
The optimizer state is intentionally omitted (inference does not need it).
# 1. Clone nanochat and set up the environment
git clone https://github.com/karpathy/nanochat
cd nanochat
uv venv && source .venv/bin/activate
uv sync --extra gpu
# 2. Download this repo into the nanochat cache directory
export NANOCHAT_BASE_DIR="$HOME/.cache/nanochat"
hf download nitishpandey04/nanochat-d18-sft --local-dir "$NANOCHAT_BASE_DIR"
# 3. Chat with the model
python -m scripts.chat_cli # interactive
python -m scripts.chat_cli -p "Why is the sky blue?" # one-shot
python -m scripts.chat_web # web UI
chat_cli loads the SFT checkpoint (-i sft) by default.
MIT, following the nanochat project.