sgc-522m-sft
sgc (Single-GPU Coder) is a 522M-parameter decoder-only transformer for Python and C++ code, pretrained from scratch on 103B tokens in 76.3 hours on one NVIDIA GH200 GPU. This repository holds the model after supervised fine-tuning (SFT) on reasoning traces, before reinforcement learning. The final model is sgc-522m.
- Paper: One GPU, 0.1 Trillion Tokens: Pretraining a Sub-Billion-Parameter Code Model
- Code, training and evaluation records: github.com/indrajeetadityaroy9/single-gpu-code-llm
Results
| Model | HumanEval | HumanEval+ |
|---|---|---|
| sgc-522m-base | 26.8 | 22.0 |
| sgc-522m-sft | 32.9 | 31.7 |
| sgc-522m | 40.9 | 38.4 |
pass@1 with greedy decoding, scored by EvalPlus. On 512 held-out KodCode problems (4 samples each at temperature 0.6, top-p 0.95, up to 16,384 tokens), this model's pass@1 is 0.334, and 918 of its 2,048 responses do not finish: most fall into a repeating loop. RL reduces this to 266 (sgc-522m).
Prompt format and usage
As for sgc-522m: the chat template renders <|bos|>, the user message,
then \n\n<think>\n; the model reasons, closes with </think> and answers. Serve it with the repository's
scripts/serve.sh iaroy/sgc-522m-sft, or load it with transformers (trust_remote_code=True).
Training
SFT for 2 epochs (7,676 steps, 11.32B tokens, 11.2 hours) of reasoning traces from Nemotron-Cascade SFT (code), Nemotron SFT Competitive Programming v2 and KodCode-V1-SFT-R1, starting from sgc-522m-base.