Downloads · 30 days
14
11% of all-time downloads
maximorulli/nanochat-adamW
nanochat-adamW is a text generation model from maximorulli. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This repository hosts maximorulli/nanochat-adamW, a d26 Nanochat decoder-only causal language model with custom Transformers remote code for loading the architecture and tokenizer.
Downloads · 30 days
14
11% of all-time downloads
All-time downloads
131
Public
Repo size
5.2 GB
Likes
0
Public
Click a slice to open those files.
.pt5.2 GB · 100%
From the Hugging Face model README
This repository hosts maximorulli/nanochat-adamW, a d26 Nanochat decoder-only causal language model with custom Transformers remote code for loading the architecture and tokenizer.
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("maximorulli/nanochat-adamW", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("maximorulli/nanochat-adamW", trust_remote_code=True, torch_dtype="auto")
15 * tanh(logits / 15).The tokenizer is a custom RustBPE/tiktoken-style tokenizer with GPT-4-like splitting and 32768 vocabulary entries. It was trained with a 2,000,000,000 character cap and a 10,000 document cap.
Special tokens:
| Token | ID |
|---|---|
| `< | bos |
| `< | user_start |
| `< | user_end |
| `< | assistant_start |
| `< | assistant_end |
| `< | python_start |
| `< | python_end |
| `< | output_start |
| `< | output_end |
Token byte statistics: min 1, max 19, mean 6.6029, std 2.8250.
| Metric | Value |
|---|---|
| Hub repo | maximorulli/nanochat-adamW |
| Variant | AdamW full |
| Checkpoint step | 7226 |
| Optimizer | adamw_only |
| Training tokens | 7,577,010,176 |
| Validation BPB | 0.861691430098635 |
| Batch size | 1,048,576 tokens |
| CORE estimate | not reported |
| MFU | 70.77% |
| Training FLOPs | 4.980988e+19 |
| Training time | 938.86 minutes |
| Peak memory | 47998.42 MiB |
Base/tokenizer/pretraining:
karpathy/fineweb-edu-100b-shuffle, parquet shards shard_00000.parquet through shard_01822.parquet.T=2048.SFT provenance documented for this training series:
HuggingFaceTB/smol-smoltalk, train and test.cais/mmlu, auxiliary_train for SFT training and all/test for validation/evaluation.openai/gsm8k, main/train for SFT training and main/test for validation/evaluation.SimpleSpelling(size=200000, split=train).SpellingBee(size=80000, split=train).SpellingBee(size=256, split=test).Evaluation datasets:
allenai/ai2_arc: ARC-Easy test and ARC-Challenge test.cais/mmlu: all/test.openai/gsm8k: main/test.openai/openai_humaneval: test.Compared with GPT-2:
| Category | Bytes | GPT-2 tokens | GPT-2 ratio | Ours tokens | Ours ratio | Diff |
|---|---|---|---|---|---|---|
| news | 1819 | 404 | 4.5 | 403 | 4.51 | 0.2% |
| korean | 893 | 745 | 1.2 | 797 | 1.12 | -7.0% |
| code | 1259 | 576 | 2.19 | 620 | 2.03 | -7.6% |
| math | 1834 | 936 | 1.96 | 1025 | 1.79 | -9.5% |
| science | 1112 | 260 | 4.28 | 258 | 4.31 | 0.8% |
| fwe-train | 4208518 | 900364 | 4.67 | 892476 | 4.72 | 0.9% |
| fwe-val | 4776536 | 1031472 | 4.63 | 1026947 | 4.65 | 0.4% |
Compared with GPT-4:
| Category | GPT-4 tokens | GPT-4 ratio | Ours tokens | Ours ratio | Diff |
|---|---|---|---|---|---|
| news | 387 | 4.7 | 403 | 4.51 | -4.1% |
| korean | 364 | 2.45 | 797 | 1.12 | -119.0% |
| code | 309 | 4.07 | 620 | 2.03 | -100.6% |
| math | 832 | 2.2 | 1025 | 1.79 | -23.2% |
| science | 249 | 4.47 | 258 | 4.31 | -3.6% |
| fwe-train | 874799 | 4.81 | 892476 | 4.72 | -2.0% |
| fwe-val | 1004142 | 4.76 | 1026947 | 4.65 | -2.3% |
These related downstream/SFT results are included for context and should not be read as direct base-checkpoint metrics unless explicitly stated.
Muon-full-derived SFT, source d26, SFT step 501:
| Task | Score |
|---|---|
| SFT validation BPB | 0.27659193826474665 |
| ARC-Easy | 0.6439 |
| ARC-Challenge | 0.5017 |
| MMLU | 0.3881 |
| GSM8K | 0.1039 |
| HumanEval | 0.122 |
| SpellingBee | 0.9922 |
| ChatCORE | 0.3772 |
Eval settings: dtype=bfloat16, temperature=0, max_new_tokens=512, top_k=50, batch_size=8.
AdamW-source SFT, base model step 7226, SFT step 501:
Muon step-2000-source SFT, base model step 2000, SFT step 80:
This is a small research/training artifact intended for experimentation with Nanochat-style training, optimizer comparisons, tokenizer behavior, and lightweight causal language modeling. It has not been aligned for broad production use.
The model may produce incorrect, unsafe, biased, or low-quality text. The base checkpoints are not instruction-tuned chat assistants. Context length is 2048 tokens. Generation through the included Transformers implementation is portable but does not include the original training code's custom Flash Attention path.