Model reference · open weights
petitgpt is an open-weight language model from yqi0. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | yqi0 |
|---|---|
| Type | Language models |
| Task | Text gen |
| Parameters (lead) | 125M |
| Released | 2026-09-11 |
| Popularity | 1k downloads / month |
| Licence | Open weights |
About
A 124.6M-parameter language model trained from scratch
Author: Yang Qi · Checkpoint: alpha075 · Release: research-v1
GitHub project · Technical report · Run guide · File checksums
This project trains a 124.6M-parameter language model from scratch on a single NVIDIA RTX 4090, processing approximately 13B model-input positions during pretraining. This repository publishes the selected PetitGPT checkpoint, its custom tokenizer, the model configuration, and a native PyTorch inference implementation. It is intended for studying efficient small-model training, post-training trade-offs, and evaluation.
Compatibility: the released CLI requires a CUDA GPU and does not implement a Transformers AutoModel loading path. GGUF, ONNX, vLLM, llama.cpp, and CPU inference are neither implemented nor validated in this release.
Use a CUDA-enabled environment matching requirements-inference-tested.txt; the download command below assumes the Hugging Face CLI is already installed. The environment was Python 3.10.12, PyTorch 2.11.0+cu126, NumPy 2.2.6, tokenizers 0.22.2, and safetensors 0.8.0 on an RTX 4090. See the run guide for environment and input details.
hf download yqi0/petitgpt \
--revision 7bf3df96e6880b242b2907d1e68093435feacd75 \
--local-dir ./petitgpt-research-v1
(cd ./petitgpt-research-v1 && sha256sum -c SHA256SUMS)
python ./petitgpt-research-v1/inference.py \
--model-directory ./petitgpt-research-v1 \
--prompt "Say hello in one sentence." \
--profile bf16_native \
--max-new-tokens 32
The greeting prompt is only an example. Download the complete file set and keep the src/ directory in place—inference.py imports from it. The output is JSON containing the generated token IDs, the raw decoded text (including the terminal EOS token when one was produced), and the stop reason.
The same bundle also supports --profile fp32_math and chat-style input via --messages-json. Decoding is greedy; --max-new-tokens accepts 1–384; and the prompt plus the generation budget must fit within 2,048 tokens. Invalid input or context overflow raises an explicit error rather than being silently repaired or truncated. No default system message is inserted. The two numerical profiles are not claimed to produce identical output.
| Field | Value |
|---|---|
| Unique parameters | 124,635,456 |
| Layers / hidden width / FFN width | 30 / 576 / 1,536 |
| Attention | GQA: 9 query heads / 3 key-value heads; head dimension 64 |
| Position encoding | RoPE, theta 10,000, full head rotation |
| Normalization and MLP | RMSNorm (epsilon 1e-6), SwiGLU |
| Vocabulary / context | 32,000 / 2,048 |
| Embeddings | Tied input and output |
| Dropout / stored weights | 0.0 / FP32 |
The complete checkpoint-derived settings are in config.json. special_tokens_map.json describes the native token convention; it is not a Transformers loader contract.
Pretraining consumed approximately 13B tokens on a single RTX 4090: the exact retained packed count was 13,000,005,634 tokens, and optimizer updates traversed 12,999,720,960 model-input positions. It ran in two stages. Stage A (about 10B tokens) drew on FineWeb-Edu dedup (71.11%), DCLM-Edu (20.32%), FineWiki EN (5.08%), and Python-Edu (3.50%). Stage B (about 3B tokens) added structured tutorial content, PES2O, and StackExchange while retaining the Stage A source families. Stage budgets, source shares, pinned dataset revisions, and accounting definitions are in PRETRAIN_SOURCE_MIXTURE.csv and the technical report.
Ten recorded validation measurements, with no smoothing; lines connect observations within each stage. The Stage B detail panel uses a different vertical scale. See pretraining results for the values and measurement scope.
The released weights are a parameter interpolation between two post-training checkpoints. More precisely, in the released model's training path, P2 is supervised fine-tuning on concise instructions, and P3 is a further adaptation stage on basic instruction tasks with replay examples from earlier instruction data:
Pretrained Base → P2 instruction SFT → P3 step320
alpha075 = P2 + 0.75 × (P3_step320 − P2)
Later experiments explored DPO, response distillation, LoRA, and unified Base-SFT. Some brought local gains alongside losses in other capabilities; none was selected to replace alpha075. These experiments are not ancestors of the released weights. A separate soft-logit distillation lab used only external models. For exact hashes and branch history, consult MODEL_PROVENANCE.json and the technical report. Further detail is in the GitHub repository.
All comparisons below are against SmolLM-135M-Instruct and SmolLM2-135M-Instruct. The picture is mixed rather than uniformly favorable: under the project's fixed protocol, petitgpt-alpha075 leads both baselines on ARC-Easy and ARC-Challenge, trails both on PIQA and HellaSwag, and falls between SmolLM and SmolLM2 on IFEval.
All comparison results below were measured in this project on pinned model revisions; the SmolLM and SmolLM2 numbers are our own evaluations under the protocols described here, not scores copied from their official model cards.
| Model | ARC-Easy acc / acc_norm | ARC-Challenge acc / acc_norm | PIQA acc / acc_norm | HellaSwag acc / acc_norm |
|---|---|---|---|---|
| petitgpt-alpha075 | **57.74% / 52. |
From the published model card. Full card on the HuggingFace links in the sidebar.
How it works
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Text Generation | ARC-Easy | accuracy (zero-shot likelihood, FP32) | 57.740 |
| Text Generation | ARC-Easy | normalized accuracy (zero-shot likelihood, FP32) | 52.360 |
| Text Generation | PIQA | accuracy (zero-shot likelihood, FP32) | 63.490 |
| Text Generation | PIQA | normalized accuracy (zero-shot likelihood, FP32) | 62.300 |
| Text Generation | ARC-Challenge | accuracy (zero-shot likelihood, FP32) | 28.160 |
| Text Generation | ARC-Challenge | project-protocol normalized accuracy (zero-shot likelihood, FP32) | 32.680 |
| Text Generation | HellaSwag | accuracy (zero-shot likelihood, FP32) | 31.280 |
| Text Generation | HellaSwag | project-protocol normalized accuracy (zero-shot likelihood, FP32) | 35.600 |
| Text Generation | IFEval | prompt-level strict accuracy (native chat template, greedy, max_new_tokens=1280) | 17.190 |
| Text Generation | IFEval | instruction-level strict accuracy (native chat template, greedy, max_new_tokens=1280) | 28.540 |
| Text Generation | IFEval | prompt-level loose accuracy (native chat template, greedy, max_new_tokens=1280) | 17.740 |
| Text Generation | IFEval | instruction-level loose accuracy (native chat template, greedy, max_new_tokens=1280) | 29.980 |
Using it via the API
Once AxForge deploys petitgpt for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (petitgpt below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"petitgpt","messages":[{"role":"user","content":"Hello"}]}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.