Instructions to use jkminder/d12_135m_seed1_sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jkminder/d12_135m_seed1_sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jkminder/d12_135m_seed1_sft", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("jkminder/d12_135m_seed1_sft", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jkminder/d12_135m_seed1_sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jkminder/d12_135m_seed1_sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jkminder/d12_135m_seed1_sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jkminder/d12_135m_seed1_sft
- SGLang
How to use jkminder/d12_135m_seed1_sft with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "jkminder/d12_135m_seed1_sft" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jkminder/d12_135m_seed1_sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "jkminder/d12_135m_seed1_sft" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jkminder/d12_135m_seed1_sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jkminder/d12_135m_seed1_sft with Docker Model Runner:
docker model run hf.co/jkminder/d12_135m_seed1_sft
Scaling Ladder — d12 (135M total parameters), seed 1, chat-SFT
Research artifact. The chat-SFT of d12_135m_seed1 — size d12, pretraining seed 1 of the plain-architecture Scaling Ladder (base models trained for 200 tokens per parameter). A small research model tuned for basic chat: helpfulness is limited by its size, and it has no safety training.
This revision (main) mirrors ds0_r1, this seed's standard chat-SFT.
Recipe
One pass of nanochat's chat-SFT mixture, applied to the base repository's
main revision (the 200-tokens-per-parameter model):
smol-smoltalk
(460K conversations) + MMLU auxiliary-train x3 + GSM8K main train x4 (with
one calculator tool-call rendered per solution), interleaved by a fixed
shuffle and then permuted by the revision's SFT data seed. The optimizer is
a cold start (+sft.load_optimizer=0): fresh optimizer state, not the
pretraining optimizer's. Learning rates start at 0.8x the pretraining
values, no warmup, linear decay to zero over the second half; 931-933
steps at this size. Per-revision training provenance (cluster, code commit)
is in the table below.
Revisions
Every revision is one chat-SFT run of the same base model:
ds<k>— SFT data seed k: the permutation of the training-data order (all runs share the data; only the order differs).r<j>— replicate j: an independent repeat at identical configuration. The replicate index is never read by training, so repeats differ only through run-to-run (GPU) nondeterminism.mainmirrorsds0_r1, this seed's standard chat-SFT.
Seed-1 repositories carry a noise battery (replicates ds0_r1..r8, data
seeds ds1..ds7 at r1) from a study of SFT run-to-run variance; the
other seeds have ds0_r1 only. Runs are added as they finish, so a missing
revision only means it has not landed yet.
| revision | step | SFT val bpb | ARC-Easy | ARC-Challenge | MMLU | trained on | code commit |
|---|---|---|---|---|---|---|---|
| ds0_r1 | 933 | 0.3669 | 0.4099 | 0.3294 | 0.3239 | bulbasaur | fe20a844ca92 |
| ds0_r2 | 933 | 0.3669 | 0.4028 | 0.3362 | 0.3207 | charmander | affd94ff568e |
| ds0_r3 | 933 | 0.3669 | 0.4104 | 0.3370 | 0.3220 | charmander | affd94ff568e |
| ds0_r4 | 933 | 0.3669 | 0.4061 | 0.3319 | 0.3201 | charmander | affd94ff568e |
| ds0_r5 | 933 | 0.3669 | 0.4028 | 0.3336 | 0.3243 | charmander | affd94ff568e |
| ds0_r6 | 933 | 0.3669 | 0.4078 | 0.3251 | 0.3213 | charmander | affd94ff568e |
| ds0_r7 | 933 | 0.3669 | 0.4104 | 0.3242 | 0.3198 | charmander | affd94ff568e |
| ds0_r8 | 933 | 0.3669 | 0.4057 | 0.3370 | 0.3203 | charmander | affd94ff568e |
| ds1_r1 | 933 | 0.3668 | 0.3981 | 0.3242 | 0.3193 | bulbasaur | affd94ff568e |
| ds2_r1 | 932 | 0.3669 | 0.4112 | 0.3481 | 0.3180 | bulbasaur | affd94ff568e |
| ds3_r1 | 932 | 0.3669 | 0.4066 | 0.3353 | 0.3169 | charmander | affd94ff568e |
| ds4_r1 | 932 | 0.3668 | 0.4162 | 0.3430 | 0.3175 | charmander | affd94ff568e |
| ds5_r1 | 933 | 0.3669 | 0.4108 | 0.3285 | 0.3170 | charmander | affd94ff568e |
| ds6_r1 | 931 | 0.3669 | 0.4099 | 0.3259 | 0.3161 | charmander | affd94ff568e |
| ds7_r1 | 932 | 0.3669 | 0.3981 | 0.3353 | 0.3136 | charmander | affd94ff568e |
Accuracies are fractions from each run's own chat_eval pass (full test suites, greedy decoding: temperature 0, 1 sample, 512 max new tokens; the same harness across all runs and sizes). "SFT val bpb" is the run's final validation loss (bits per byte) on the mixture's held-out split. A "-" means that run's eval has not landed yet.
Anneal-mark chat-SFTs
The base repository also holds the model annealed at every mark of its
pretraining run: base revision TPP_x is the model annealed at x tokens per
parameter (TPP_200 is the base main). The revisions below apply the same
chat-SFT recipe to each of those marks, one run per mark (SFT data seed 0,
replicate 1). Their names carry the mark with three digits (TPP_010 ..
TPP_180); each row links the base revision it was trained from. These runs
were trained at code commit a06bf32, which clamps the SFT
learning-rate schedule so the last step cannot run at a negative learning
rate; the TPP_200 chat-SFTs above predate that fix, and their one final step
ran at a slightly negative learning rate (about -0.0004x the peak, read from
a d12 run's log; the factor depends on the step count).
| revision | base revision (annealed at) | base step | SFT step | SFT val bpb | trained on |
|---|---|---|---|---|---|
| TPP_010 | TPP_10 (10 tokens per parameter) |
1933 | 933 | 0.3910 | charmander |
| TPP_020 | TPP_20 (20 tokens per parameter) |
3933 | 933 | 0.3786 | charmander |
| TPP_030 | TPP_30 (30 tokens per parameter) |
5933 | 933 | 0.3747 | bulbasaur |
| TPP_040 | TPP_40 (40 tokens per parameter) |
7933 | 933 | 0.3730 | squirtle |
| TPP_060 | TPP_60 (60 tokens per parameter) |
12433 | 933 | 0.3709 | bulbasaur |
| TPP_080 | TPP_80 (80 tokens per parameter) |
16433 | 933 | 0.3695 | squirtle |
| TPP_100 | TPP_100 (100 tokens per parameter) |
20933 | 933 | 0.3678 | squirtle |
| TPP_120 | TPP_120 (120 tokens per parameter) |
24933 | 933 | 0.3664 | bulbasaur |
| TPP_140 | TPP_140 (140 tokens per parameter) |
29183 | 933 | 0.3651 | bulbasaur |
| TPP_160 | TPP_160 (160 tokens per parameter) |
33433 | 933 | 0.3641 | bulbasaur |
| TPP_180 | TPP_180 (180 tokens per parameter) |
37433 | 933 | 0.3644 | bulbasaur |
Usage
The chat template is bundled; format conversations with
apply_chat_template:
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "jkminder/d12_135m_seed1_sft"
revision = "main" # or any revision above
tok = AutoTokenizer.from_pretrained(repo, revision=revision, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
repo, revision=revision, trust_remote_code=True, dtype="bfloat16")
msgs = [{"role": "user", "content": "Why is the sky blue?"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
out = model.generate(ids, max_new_tokens=256)
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))
trust_remote_code=True is required: the architecture matches no stock
transformers class, so the modeling code ships in the repository
(modeling_nanochat_gpt.py, plain PyTorch). Generation stops on
<|assistant_end|>; sampling defaults (temperature 0.6, top_k 50) ship in
generation_config.json. The template renders nanochat's chat format
token-for-token (a leading system message is merged into the first user
message). Every revision's upload is byte-verified against the converted
checkpoint (hub listing sizes and content hashes); the conversion itself is
verified on at least one revision per repository by chat-template, logit
and loss equivalence against the original training code — a revision that
was verified carries the record verify_results.json.
Architecture, tokenizer, training data
Identical to the base repository — a plain GPT (nanochat with all optional architecture mechanisms disabled), nanochat BPE tokenizer (32,768 tokens), base pretraining on ClimbMix; see d12_135m_seed1 for the full description. Weights are bfloat16 safetensors, the training compute precision.
License
- Model weights: cc-by-nc-4.0 (the base model mirrors its ClimbMix training data's research-only license, and this fine-tune mirrors the base).
- Modeling/configuration code: MIT (derived from karpathy/nanochat; see the bundled LICENSE file).
- Downloads last month
- 442
Model tree for jkminder/d12_135m_seed1_sft
Base model
jkminder/d12_135m_seed1