14 Downloads Updated 1 week ago
ollama run supergoatscriptguy/mnemonic:126m-q4_0
A small chat model written entirely in assembly, trained from scratch on one home graphics card.
Everything that made this model is hand-written x86-64 assembly (NASM) and hand-written PTX for the GPU: downloading and parsing the data, training the tokenizer, pretraining, chat fine-tuning, quantization, and even the tool that wrote these GGUF files. There’s no Python, no PyTorch and no CUDA toolkit anywhere in the pipeline, only the Windows API and the NVIDIA driver.
ollama run supergoatscriptguy/mnemonic
| Tag | Model | Format | Size | Notes |
|---|---|---|---|---|
latest, 300m |
300M | Q8_0 | 324 MB | the default, about the same quality as full precision |
300m-q4_0 |
300M | Q4_0 | 189 MB | smaller and faster, slightly worse |
300m-f16 |
300M | F16 | 610 MB | 16-bit, for reference |
126m |
126M | Q8_0 | 135 MB | the first version |
126m-q4_0 |
126M | Q4_0 | 85 MB | |
126m-f16 |
126M | F16 | 253 MB |
Mnemonic is small: 304 million parameters for the current version, a few hundred times smaller than the models people usually chat with. It’s good at:
It isn’t reliable for facts, math or long answers. It will confidently make things up, so don’t trust its dates and numbers. It works best one question at a time; start a new chat when you change topic.
The 300M is a clear step up from the 126M: it gets more facts right, formats its answers better and rambles less.
| 300M | 126M | |
|---|---|---|
| Architecture | Llama-style decoder: RoPE, RMSNorm, SwiGLU, grouped-query attention, tied embeddings, no biases | same |
| Parameters | 304M | 126M |
| Layers | 24 | 16 |
| Width | 1024, 16 query heads, 4 key/value heads | 768, 12 query heads, 4 key/value heads |
| Feed-forward | 2816 | 2048 |
| Context | 2048 tokens | 1024 tokens |
| Vocabulary | 32,768, byte-level BPE trained from scratch | same |
Both models were trained on a single RTX 5070 Ti at home.
The GPU side uses tensor-core matmuls (mma.sync, bf16 with fp32 accumulation) and flash attention, all written in PTX. Every fast kernel is checked against a simple reference kernel, and the backward pass is checked with finite differences.
<|bos|><|user|>Hi! Who are you?<|end|><|assistant|>Hi! I'm Mnemonic, a compact AI assistant built entirely in hand-written assembly. What can I help you with today?<|end|>
The template and stop token are already set up. The default sampling is temperature 0.7, top-p 0.9, top-k 64. For more predictable answers, lower the temperature:
/set parameter temperature 0.3
Made by Supergoatscriptguy.