Views
No views yet
nanochat is and you'll get unknown architecture: nanochat. You need a build from this fork:nanochat)src/models/ plus six small edits. For now you build from source.freq_scale = -1.0 to compensate, that's the only ugly part of the implementation)gpt.py on current master of nanochat, watch out: it's diverged a lot. Smear gates, value embeddings, residual lambdas, none of that is in d34. d34 was trained at commit 2c4473d (Jan 11 2026), back when the architecture was much simpler. I wasted an hour matching the wrong file before realizing.nanochat-d34-f32.gguf 8.3 GB reference. matches a pure-PyTorch forward bit for bit.
nanochat-d34-bf16.gguf 4.2 GB near-lossless half precision. use this, not fp16.
nanochat-d34-Q8_0.gguf 2.2 GB
nanochat-d34-Q6_K.gguf 2.1 GB
nanochat-d34-Q5_K_M.gguf 1.7 GB matched the f32 greedy exactly on my test prompt
nanochat-d34-Q4_K_M.gguf 1.6 GB typical default
nanochat-d34-IQ4_XS.gguf 1.3 GB
nanochat-d34-Q3_K_M.gguf 1.3 GB starts to wander at this size, but still coherentf16 file: nanochat's ReLU² FFN can produce activations above 65,504 at deep layers relu(x)² reaches ~88,000 by block 33 and llama.cpp's CPU fp16 matmul downcasts the fp32 activation to fp16 before multiplying, so those values overflow and you get NaN logits silently. bf16 has the full fp32 exponent range with the same byte size, no overflow, so it's the right "half precision" for this arch. That's why bf16 is here and f16 isn't.1git clone -b nanochat https://github.com/ulanch/llama.cpp.git
2cd llama.cpp
3cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
4 -DLLAMA_CURL=OFF -DLLAMA_BUILD_SERVER=ON \
5 -DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_TESTS=OFF
6cmake --build build -j 8 --target llama-cli llama-completion llama-server llama-quantizeLLAMA_BUILD_SERVER=ON is required even if you only care about llama-cli (it's gated on the server build upstream, no idea why). Metal on Apple Silicon and AVX2/512 on x86 are picked up automatically via -DGGML_NATIVE=ON, which is the default.1./build/bin/llama-completion -m nanochat-d34-Q5_K_M.gguf \
2 -p "The capital of France is" -n 40 --temp 0 -no-cnv-no-cnv is required, otherwise the CLI renders the chat template and drops you into an interactive session../build/bin/llama-server -m nanochat-d34-Q5_K_M.gguf -c 2048 --jinja --port 8080--jinja is required too, the built-in chat-template parser doesn't recognize this template and crashes on startup. The Jinja parser handles it cleanly../build/bin/llama-quantize nanochat-d34-bf16.gguf nanochat-d34-IQ3_M.gguf IQ3_M