Instructions to use strectelite/PebbleGPT-320M-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use strectelite/PebbleGPT-320M-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="strectelite/PebbleGPT-320M-Instruct", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("strectelite/PebbleGPT-320M-Instruct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use strectelite/PebbleGPT-320M-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "strectelite/PebbleGPT-320M-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "strectelite/PebbleGPT-320M-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/strectelite/PebbleGPT-320M-Instruct
- SGLang
How to use strectelite/PebbleGPT-320M-Instruct 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 "strectelite/PebbleGPT-320M-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "strectelite/PebbleGPT-320M-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "strectelite/PebbleGPT-320M-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "strectelite/PebbleGPT-320M-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use strectelite/PebbleGPT-320M-Instruct with Docker Model Runner:
docker model run hf.co/strectelite/PebbleGPT-320M-Instruct
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -20,104 +20,187 @@ datasets:
|
|
| 20 |
|
| 21 |
## Table of Contents
|
| 22 |
|
| 23 |
-
1.
|
| 24 |
2. Usage
|
| 25 |
-
3.
|
| 26 |
-
4.
|
| 27 |
-
5.
|
| 28 |
-
6.
|
| 29 |
-
7.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
##
|
| 32 |
-
|
| 33 |
-
PebbleGPT-320M-Instruct is a 320M parameter language model trained for an
|
| 34 |
-
exploratory study. The question behind it: how far can one person get on roughly $60
|
| 35 |
-
of rented compute?
|
| 36 |
-
|
| 37 |
-
The result is a model that holds a coherent conversation, writes working Python, and
|
| 38 |
-
scores well above chance on standard commonsense and science benchmarks, while
|
| 39 |
-
remaining unreliable on facts.
|
| 40 |
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
-
|
| 46 |
-
- Attention: grouped query attention, 16 query heads, 4 KV heads
|
| 47 |
-
- Context: 2048 tokens
|
| 48 |
-
- Tokenizer: SmolLM2, 49,152 vocabulary
|
| 49 |
-
- Training tokens: 10.4B across three phases
|
| 50 |
-
- Compute cost: approximately $60
|
| 51 |
|
| 52 |
-
|
| 53 |
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
-
|
| 57 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 58 |
|
| 59 |
-
|
| 60 |
-
device = "cuda"
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
).to(device)
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|
|
|
|
|
|
|
| 69 |
|
| 70 |
-
|
| 71 |
-
outputs = model.generate(
|
| 72 |
-
**inputs, max_new_tokens=150, do_sample=True, temperature=0.7, top_k=40,
|
| 73 |
-
eos_token_id=tokenizer.convert_tokens_to_ids("<|im_end|>"),
|
| 74 |
-
)
|
| 75 |
-
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
|
| 76 |
|
| 77 |
-
|
| 78 |
-
|
| 79 |
|
| 80 |
-
|
| 81 |
|
| 82 |
-
The
|
| 83 |
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
<|im_start|>assistant
|
| 87 |
-
{response}<|im_end|>
|
| 88 |
|
|
|
|
| 89 |
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
-
|
| 93 |
|
| 94 |
-
| Benchmark |
|
| 95 |
-
|---|---|---|
|
| 96 |
-
| HellaSwag | acc_norm | 40.6 |
|
| 97 |
-
| PIQA | acc_norm | 66.8 |
|
| 98 |
-
| ARC-easy | acc_norm | 53.8 |
|
| 99 |
-
| ARC-challenge | acc_norm | 30.0 |
|
| 100 |
-
| IFEval | inst-level loose | 27.8 |
|
| 101 |
-
| IFEval | inst-level strict | 27.2 |
|
| 102 |
-
| IFEval | prompt-level loose | 14.4 |
|
| 103 |
-
| IFEval | prompt-level strict | 13.7 |
|
| 104 |
-
|
| 105 |
-
### Scores across training phases
|
| 106 |
-
|
| 107 |
-
| Benchmark | After pretraining | After annealing | After SFT |
|
| 108 |
|---|---|---|---|
|
| 109 |
-
| HellaSwag | 30.5 | 40.4 | 40.
|
| 110 |
-
| PIQA | 55.5 | 67.7 | 66.
|
| 111 |
-
| ARC-easy | 37.7 | 56.4 | 53.
|
| 112 |
-
| ARC-challenge | n/a | 31.1 |
|
| 113 |
| Training loss | 2.507 | 2.067 | n/a |
|
| 114 |
|
| 115 |
-
|
| 116 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
|
| 118 |
-
##
|
| 119 |
|
| 120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
|
| 122 |
| Parameter | Value |
|
| 123 |
|---|---|
|
|
@@ -126,113 +209,88 @@ they sit at or near chance.
|
|
| 126 |
| Layers | 24 |
|
| 127 |
| Hidden size | 1024 |
|
| 128 |
| Intermediate size | 2816 |
|
| 129 |
-
| Attention
|
| 130 |
-
| KV heads | 4 |
|
| 131 |
| Head dimension | 64 |
|
| 132 |
| Activation | SwiGLU |
|
| 133 |
| Normalization | RMSNorm, pre-norm |
|
| 134 |
| Positional encoding | RoPE, theta 10000 |
|
| 135 |
| Embeddings | Tied input and output |
|
| 136 |
| Context length | 2048 |
|
| 137 |
-
| Vocabulary size | 49,152 |
|
| 138 |
-
| Precision | bfloat16 mixed precision |
|
| 139 |
|
| 140 |
The intermediate size of 2816 is roughly 8/3 of the hidden size rather than the more
|
| 141 |
common 4x. SwiGLU uses three weight matrices where a standard feedforward layer uses
|
| 142 |
two, so the 8/3 ratio keeps the parameter count comparable to a non-gated layer at 4x
|
| 143 |
-
width.
|
| 144 |
-
|
| 145 |
-
The 49,152 token vocabulary was chosen over larger alternatives because embedding
|
| 146 |
-
tables do not shrink with model size. At 320M parameters a 128k vocabulary would
|
| 147 |
-
consume 37 percent of the parameter budget as a lookup table. The smaller vocabulary
|
| 148 |
-
reduces that to 14 percent.
|
| 149 |
|
| 150 |
-
###
|
| 151 |
|
| 152 |
10B tokens, 19,073 steps at 524,288 tokens per step.
|
| 153 |
|
| 154 |
-
| Source | Share |
|
| 155 |
-
|---|---|
|
| 156 |
-
| FineWeb-Edu | 42.5% |
|
| 157 |
-
| DCLM-Edu, filtered to edu_int_score >= 3 | 42.5% |
|
| 158 |
-
| Python-Edu | 10% |
|
| 159 |
-
| FineMath-4+ | 5% |
|
| 160 |
-
|
| 161 |
-
AdamW, betas 0.9 and 0.95, eps 1e-8. Weight decay 0.1 excluding embeddings and norms.
|
| 162 |
-
Gradient clipping 1.0. Warmup-Stable-Decay schedule, peak learning rate 5e-4, minimum
|
| 163 |
-
5e-5, 2,000 warmup steps, 10 percent decay window. Global batch 524,288 tokens.
|
| 164 |
-
|
| 165 |
-
Documents were filtered for n-gram repetition, tokenized, packed into fixed 2,049
|
| 166 |
-
token records with EOS separators, then shuffled at the sequence level.
|
| 167 |
|
| 168 |
-
|
| 169 |
-
|
|
|
|
| 170 |
|
| 171 |
-
###
|
| 172 |
|
| 173 |
-
300M tokens
|
| 174 |
-
|
|
|
|
| 175 |
|
| 176 |
| Source | Share | Purpose |
|
| 177 |
|---|---|---|
|
| 178 |
-
| Baseline replay from
|
| 179 |
| Cosmopedia wikihow | 20% | Procedural and physical reasoning |
|
| 180 |
| Cosmopedia stories | 10% | Everyday world knowledge |
|
| 181 |
| Cosmopedia openstax | 15% | Science curriculum content |
|
| 182 |
| Cosmopedia khanacademy | 15% | Science curriculum content |
|
| 183 |
|
| 184 |
-
Warm restart from the fully decayed phase 1 checkpoint, fresh optimizer state. Peak
|
| 185 |
-
learning rate 1.2e-4, roughly 25 percent of the original peak. 30 warmup steps, 85
|
| 186 |
-
percent decay window, 572 steps total.
|
| 187 |
-
|
| 188 |
-
This is a warm restart from a fully decayed checkpoint rather than a conventional
|
| 189 |
-
annealing phase applied to a pre-decay checkpoint.
|
| 190 |
-
|
| 191 |
Cosmopedia is synthetic data generated by Mixtral-8x7B-Instruct-v0.1. Its authors
|
| 192 |
decontaminated it against ARC, PIQA, HellaSwag, OpenBookQA, WinoGrande, MMLU, and
|
| 193 |
BoolQ using 10-gram overlap detection.
|
| 194 |
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
### Phase 3: Supervised fine-tuning
|
| 198 |
|
| 199 |
-
50,000 conversations from
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
|
| 201 |
-
|
| 202 |
-
turns, template tokens, and padding. Optimizer: AdamW, weight decay 0.01, learning
|
| 203 |
-
rate 2e-5, OneCycleLR cosine schedule, 3 percent warmup. Batch size 32, sequence
|
| 204 |
-
length 1,024, 3,126 steps.
|
| 205 |
-
|
| 206 |
-
Hardware: one A100 80GB, approximately 20 minutes.
|
| 207 |
-
|
| 208 |
-
### Compute
|
| 209 |
|
| 210 |
| Phase | Hardware | Duration | Cost |
|
| 211 |
|---|---|---|---|
|
| 212 |
-
|
|
| 213 |
-
|
|
| 214 |
-
|
|
| 215 |
-
|
|
| 216 |
-
| Debugging and failed runs | various | n/a | $19 |
|
| 217 |
-
| Total | | | ~$60 |
|
| 218 |
-
|
| 219 |
-
### Software
|
| 220 |
|
| 221 |
-
|
| 222 |
-
|
|
|
|
| 223 |
|
| 224 |
## Limitations
|
| 225 |
|
| 226 |
Factual reliability is poor. Asked for the capital of France, the model correctly
|
| 227 |
-
answers Paris and then places it in a charming town called Marseille. A
|
| 228 |
budget does not encode reliable world knowledge at this parameter count.
|
| 229 |
|
| 230 |
Instruction following is partial. An IFEval prompt-level strict score of 13.7 means
|
| 231 |
the model satisfies every constraint in a prompt roughly one time in seven.
|
| 232 |
|
| 233 |
Benchmark gains are concentrated. PIQA and ARC-easy improved most because the
|
| 234 |
-
|
| 235 |
-
than contamination, but it means the model is not uniformly stronger.
|
|
|
|
| 236 |
|
| 237 |
No safety alignment. Fine-tuned on SmolTalk only. No preference optimization, no red
|
| 238 |
teaming, no safety evaluation.
|
|
@@ -248,10 +306,12 @@ Apache 2.0
|
|
| 248 |
|
| 249 |
## Citation
|
| 250 |
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
## Table of Contents
|
| 22 |
|
| 23 |
+
1. The Story
|
| 24 |
2. Usage
|
| 25 |
+
3. Results
|
| 26 |
+
4. Architecture
|
| 27 |
+
5. Compute Cost
|
| 28 |
+
6. Limitations
|
| 29 |
+
7. License
|
| 30 |
+
8. Citation
|
| 31 |
+
|
| 32 |
+
## The Story
|
| 33 |
+
|
| 34 |
+
This model started as a straightforward question: how much of a real language model
|
| 35 |
+
pipeline can one person build and run alone, following the published methodology of
|
| 36 |
+
a real lab, on a small budget?
|
| 37 |
+
|
| 38 |
+
The starting point was Hugging Face's Smol Training Playbook, the account of how
|
| 39 |
+
SmolLM3 was built. Rather than improvise architecture and training decisions, this
|
| 40 |
+
project borrowed them directly wherever the Playbook had already run the ablation.
|
| 41 |
+
Grouped query attention at ratio 4, tied embeddings, SwiGLU, no QK-norm, no Z-loss,
|
| 42 |
+
embeddings excluded from weight decay, the AdamW hyperparameter triplet that has gone
|
| 43 |
+
unchanged from Llama 1 through DeepSeek V3, and a Warmup-Stable-Decay learning rate
|
| 44 |
+
schedule. The data mixture ratios (FineWeb-Edu and DCLM-Edu split 50/50, code capped
|
| 45 |
+
at 10 percent, math at 5 percent) and the evaluation suite (HellaSwag, PIQA, ARC-easy,
|
| 46 |
+
with the noisier benchmarks the Playbook itself flagged as unreliable dropped) came
|
| 47 |
+
from the same source. The one deliberate departure was the tokenizer: SmolLM3 uses a
|
| 48 |
+
128k vocabulary that makes sense at 3B parameters, but at 320M it would consume 37
|
| 49 |
+
percent of the parameter budget as a lookup table, so the smaller 49k SmolLM2
|
| 50 |
+
tokenizer was used instead.
|
| 51 |
+
|
| 52 |
+
Pretraining ran for 10B tokens on a single rented H100. The result was a functioning
|
| 53 |
+
base model with loss 2.507 and benchmark scores in the expected range for a model this
|
| 54 |
+
small and this undertrained relative to modern practice. Preparing the data, debugging
|
| 55 |
+
the pipeline, and a handful of false starts added real cost on top of the clean run
|
| 56 |
+
time, all folded into the totals below.
|
| 57 |
+
|
| 58 |
+
At that point the model was evaluated against a set of comparable public models,
|
| 59 |
+
matched as closely as possible on parameter count and training scale. Two benchmarks
|
| 60 |
+
stood out as places where the model was underperforming what the token budget should
|
| 61 |
+
have allowed: PIQA, which measures physical commonsense reasoning, and ARC-easy, which
|
| 62 |
+
measures grade school science reasoning. Rather than accept that gap or retrain from
|
| 63 |
+
scratch, the model went through a short mid-training pass (an annealing phase in the
|
| 64 |
+
Playbook's terminology) aimed specifically at those two benchmarks.
|
| 65 |
+
|
| 66 |
+
The mixture for that phase was 40 percent replay of the original pretraining data,
|
| 67 |
+
mixed with Cosmopedia's `wikihow` and `stories` splits for PIQA and its `openstax` and
|
| 68 |
+
`khanacademy` splits for ARC-easy. The run was a warm restart from the fully decayed
|
| 69 |
+
pretraining checkpoint, 300M tokens, 30 minutes, on a rented RTX PRO 6000. It was the
|
| 70 |
+
single highest return step in the entire project: HellaSwag rose from 30.5 to 40.4,
|
| 71 |
+
PIQA from 55.5 to 67.7, and ARC-easy from 37.7 to 56.4.
|
| 72 |
+
|
| 73 |
+
Supervised fine-tuning followed, using SmolTalk with ChatML formatting and loss
|
| 74 |
+
masked to assistant response tokens only. This phase was free. As a student with
|
| 75 |
+
Colab Pro access, the fine-tuning run used a Colab-provisioned A100 rather than a
|
| 76 |
+
rented one, and took about 20 minutes for 50,000 conversations across 2 epochs.
|
| 77 |
|
| 78 |
+
## Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
+
```bash
|
| 81 |
+
pip install transformers torch
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
```python
|
| 85 |
+
import torch
|
| 86 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 87 |
+
|
| 88 |
+
checkpoint = "strectelite/PebbleGPT-320M-Instruct"
|
| 89 |
+
device = "cuda" # or "cpu"
|
| 90 |
+
|
| 91 |
+
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
| 92 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 93 |
+
checkpoint, trust_remote_code=True
|
| 94 |
+
).to(device)
|
| 95 |
+
|
| 96 |
+
prompt = "Explain what recursion is in simple terms."
|
| 97 |
+
text = f"<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant\n"
|
| 98 |
+
|
| 99 |
+
inputs = tokenizer(text, return_tensors="pt").to(device)
|
| 100 |
+
outputs = model.generate(
|
| 101 |
+
**inputs,
|
| 102 |
+
max_new_tokens=150,
|
| 103 |
+
do_sample=True,
|
| 104 |
+
temperature=0.7,
|
| 105 |
+
top_k=40,
|
| 106 |
+
eos_token_id=tokenizer.convert_tokens_to_ids("<|im_end|>"),
|
| 107 |
+
)
|
| 108 |
+
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
`trust_remote_code=True` is required. The architecture is not registered in
|
| 112 |
+
`transformers`, so the model source ships alongside the weights. There is currently
|
| 113 |
+
no GGUF conversion, so this model does not run in llama.cpp or Ollama.
|
| 114 |
|
| 115 |
+
### Chat format
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
|
| 117 |
+
The model uses ChatML.
|
| 118 |
|
| 119 |
+
```
|
| 120 |
+
<|im_start|>user
|
| 121 |
+
{prompt}<|im_end|>
|
| 122 |
+
<|im_start|>assistant
|
| 123 |
+
{response}<|im_end|>
|
| 124 |
+
```
|
| 125 |
|
| 126 |
+
### Sample outputs
|
|
|
|
| 127 |
|
| 128 |
+
Write a Python function that reverses a string.
|
|
|
|
| 129 |
|
| 130 |
+
```python
|
| 131 |
+
def reverse_string(s):
|
| 132 |
+
return s[::-1]
|
|
|
|
| 133 |
|
| 134 |
+
# Test the function
|
| 135 |
+
s = "Hello"
|
| 136 |
+
print(reverse_string(s))
|
| 137 |
+
```
|
| 138 |
|
| 139 |
+
Explain what recursion is in simple terms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
|
| 141 |
+
> Recursion is a technique in programming to solve a problem by breaking it down into
|
| 142 |
+
> smaller, simpler parts, each of which can be solved independently.
|
| 143 |
|
| 144 |
+
Summarize why the sky is blue in one sentence.
|
| 145 |
|
| 146 |
+
> The sky is blue because it has a rich blue color.
|
| 147 |
|
| 148 |
+
The third example shows a common failure mode: fluent, correctly formatted, and
|
| 149 |
+
substantively empty.
|
|
|
|
|
|
|
| 150 |
|
| 151 |
+
## Results
|
| 152 |
|
| 153 |
+
All scores are zero-shot, full test sets, measured with
|
| 154 |
+
[lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness). The
|
| 155 |
+
comparison models below were evaluated with the identical harness, task versions, and
|
| 156 |
+
batch size, rather than taken from other papers, so the numbers are directly
|
| 157 |
+
comparable.
|
| 158 |
|
| 159 |
+
### Across this model's own training phases
|
| 160 |
|
| 161 |
+
| Benchmark | After pretraining | After mid-training | After SFT (this model) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
|---|---|---|---|
|
| 163 |
+
| HellaSwag (acc_norm) | 30.5 | 40.4 | 40.60 |
|
| 164 |
+
| PIQA (acc_norm) | 55.5 | 67.7 | 66.76 |
|
| 165 |
+
| ARC-easy (acc_norm) | 37.7 | 56.4 | 53.79 |
|
| 166 |
+
| ARC-challenge (acc_norm) | n/a | 31.1 | 29.95 |
|
| 167 |
| Training loss | 2.507 | 2.067 | n/a |
|
| 168 |
|
| 169 |
+
Mid-training produced most of the movement. Supervised fine-tuning held those gains
|
| 170 |
+
within one to three points, which is the ordinary cost of instruction tuning rather
|
| 171 |
+
than a sign that anything went wrong.
|
| 172 |
+
|
| 173 |
+
### Against comparable public models
|
| 174 |
+
|
| 175 |
+
| Model | Params | Training tokens | HellaSwag | PIQA | ARC-easy | ARC-challenge |
|
| 176 |
+
|---|---|---|---|---|---|---|
|
| 177 |
+
| GPT-2 | 124M | ~8-10B | 31.14 | 62.51 | 39.48 | 22.70 |
|
| 178 |
+
| Pythia-160M | 160M | 300B | 30.15 | 61.70 | 39.56 | 23.81 |
|
| 179 |
+
| Pythia-410M | 410M | 300B | 40.61 | 66.97 | 45.92 | 24.40 |
|
| 180 |
+
| SmolLM2-135M | 135M | 2T | 43.10 | 68.34 | 58.54 | 29.86 |
|
| 181 |
+
| **PebbleGPT-320M-Instruct** | **320M** | **10.4B** | **40.60** | **66.76** | **53.79** | **29.95** |
|
| 182 |
+
| SmolLM2-360M | 360M | 4T | 56.36 | 72.03 | 68.01 | 38.05 |
|
| 183 |
+
| Qwen3-0.6B-Base | 600M | 36T | 53.83 | 70.02 | 57.91 | 38.40 |
|
| 184 |
+
|
| 185 |
+
The closest comparison on training budget is GPT-2, which used a similar token count
|
| 186 |
+
to this model. At nearly identical data scale, this model is ahead on both ARC
|
| 187 |
+
benchmarks and roughly level on HellaSwag and PIQA. Against models trained on 30 to
|
| 188 |
+
3,500 times more data, the gap is real and is the honest limit of a 10.4B token
|
| 189 |
+
budget, not something the mid-training pass could fully close.
|
| 190 |
|
| 191 |
+
### Instruction following
|
| 192 |
|
| 193 |
+
Measured after supervised fine-tuning, since the base and mid-trained checkpoints
|
| 194 |
+
have no instruction-following behavior to measure.
|
| 195 |
+
|
| 196 |
+
| Metric | Score |
|
| 197 |
+
|---|---|
|
| 198 |
+
| IFEval inst-level loose | 27.8 |
|
| 199 |
+
| IFEval inst-level strict | 27.2 |
|
| 200 |
+
| IFEval prompt-level loose | 14.4 |
|
| 201 |
+
| IFEval prompt-level strict | 13.7 |
|
| 202 |
+
|
| 203 |
+
## Architecture
|
| 204 |
|
| 205 |
| Parameter | Value |
|
| 206 |
|---|---|
|
|
|
|
| 209 |
| Layers | 24 |
|
| 210 |
| Hidden size | 1024 |
|
| 211 |
| Intermediate size | 2816 |
|
| 212 |
+
| Attention | Grouped query attention, 16 query heads, 4 KV heads |
|
|
|
|
| 213 |
| Head dimension | 64 |
|
| 214 |
| Activation | SwiGLU |
|
| 215 |
| Normalization | RMSNorm, pre-norm |
|
| 216 |
| Positional encoding | RoPE, theta 10000 |
|
| 217 |
| Embeddings | Tied input and output |
|
| 218 |
| Context length | 2048 |
|
| 219 |
+
| Vocabulary size | 49,152, SmolLM2 tokenizer |
|
| 220 |
+
| Precision | bfloat16 mixed precision, fp32 master weights |
|
| 221 |
|
| 222 |
The intermediate size of 2816 is roughly 8/3 of the hidden size rather than the more
|
| 223 |
common 4x. SwiGLU uses three weight matrices where a standard feedforward layer uses
|
| 224 |
two, so the 8/3 ratio keeps the parameter count comparable to a non-gated layer at 4x
|
| 225 |
+
width, and matches what SmolLM2-135M and SmolLM2-360M both use at this scale.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
|
| 227 |
+
### Pretraining
|
| 228 |
|
| 229 |
10B tokens, 19,073 steps at 524,288 tokens per step.
|
| 230 |
|
| 231 |
+
| Source | Share |
|
| 232 |
+
|---|---|
|
| 233 |
+
| FineWeb-Edu | 42.5% |
|
| 234 |
+
| DCLM-Edu, filtered to edu_int_score >= 3 | 42.5% |
|
| 235 |
+
| Python-Edu | 10% |
|
| 236 |
+
| FineMath-4+ | 5% |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 237 |
|
| 238 |
+
AdamW, betas 0.9 and 0.95, weight decay 0.1 excluding embeddings and norms, gradient
|
| 239 |
+
clipping 1.0. Warmup-Stable-Decay schedule, peak learning rate 5e-4, minimum 5e-5,
|
| 240 |
+
2,000 warmup steps, 10 percent decay window.
|
| 241 |
|
| 242 |
+
### Mid-training
|
| 243 |
|
| 244 |
+
300M tokens, warm restart from the fully decayed pretraining checkpoint with a fresh
|
| 245 |
+
optimizer state. Peak learning rate 1.2e-4, roughly 25 percent of the original peak,
|
| 246 |
+
30 warmup steps, 85 percent decay window, 572 steps.
|
| 247 |
|
| 248 |
| Source | Share | Purpose |
|
| 249 |
|---|---|---|
|
| 250 |
+
| Baseline replay from pretraining mixture | 40% | Prevent narrowing |
|
| 251 |
| Cosmopedia wikihow | 20% | Procedural and physical reasoning |
|
| 252 |
| Cosmopedia stories | 10% | Everyday world knowledge |
|
| 253 |
| Cosmopedia openstax | 15% | Science curriculum content |
|
| 254 |
| Cosmopedia khanacademy | 15% | Science curriculum content |
|
| 255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 256 |
Cosmopedia is synthetic data generated by Mixtral-8x7B-Instruct-v0.1. Its authors
|
| 257 |
decontaminated it against ARC, PIQA, HellaSwag, OpenBookQA, WinoGrande, MMLU, and
|
| 258 |
BoolQ using 10-gram overlap detection.
|
| 259 |
|
| 260 |
+
### Supervised fine-tuning
|
|
|
|
|
|
|
| 261 |
|
| 262 |
+
50,000 conversations from
|
| 263 |
+
[SmolTalk](https://huggingface.co/datasets/HuggingFaceTB/smoltalk), 2 epochs. ChatML
|
| 264 |
+
format, loss masked to assistant response tokens only. AdamW at 2e-5, weight decay
|
| 265 |
+
0.01, OneCycleLR cosine schedule, 3 percent warmup, batch size 32, sequence length
|
| 266 |
+
1,024, 3,126 steps.
|
| 267 |
|
| 268 |
+
## Compute Cost
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 269 |
|
| 270 |
| Phase | Hardware | Duration | Cost |
|
| 271 |
|---|---|---|---|
|
| 272 |
+
| Pretraining, including data preparation and debugging | H100 SXM, plus a 32 vCPU instance for data prep | ~24 hours combined | $50 |
|
| 273 |
+
| Mid-training, including the data pipeline for it | RTX PRO 6000 | ~30 minutes | $1 |
|
| 274 |
+
| Supervised fine-tuning | A100, Colab Pro | ~20 minutes | $0 |
|
| 275 |
+
| **Total** | | | **~$60** |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 276 |
|
| 277 |
+
Roughly a third of the pretraining figure was spent on debugging rather than clean
|
| 278 |
+
training time. That cost is included rather than hidden, because it is a real part of
|
| 279 |
+
what a first solo attempt at this actually takes.
|
| 280 |
|
| 281 |
## Limitations
|
| 282 |
|
| 283 |
Factual reliability is poor. Asked for the capital of France, the model correctly
|
| 284 |
+
answers Paris and then places it in a charming town called Marseille. A 10.4B token
|
| 285 |
budget does not encode reliable world knowledge at this parameter count.
|
| 286 |
|
| 287 |
Instruction following is partial. An IFEval prompt-level strict score of 13.7 means
|
| 288 |
the model satisfies every constraint in a prompt roughly one time in seven.
|
| 289 |
|
| 290 |
Benchmark gains are concentrated. PIQA and ARC-easy improved most because the
|
| 291 |
+
mid-training data was selected to target them. This is a documented technique rather
|
| 292 |
+
than contamination, but it means the model is not uniformly stronger. Knowledge and
|
| 293 |
+
mathematical reasoning benchmarks remain at chance.
|
| 294 |
|
| 295 |
No safety alignment. Fine-tuned on SmolTalk only. No preference optimization, no red
|
| 296 |
teaming, no safety evaluation.
|
|
|
|
| 306 |
|
| 307 |
## Citation
|
| 308 |
|
| 309 |
+
```bibtex
|
| 310 |
+
@software{pebblegpt2026,
|
| 311 |
+
author = {Sriram, Sanjay},
|
| 312 |
+
title = {PebbleGPT: an exploratory study in training a language model
|
| 313 |
+
from scratch on a small budget},
|
| 314 |
+
year = {2026},
|
| 315 |
+
url = {https://huggingface.co/strectelite/PebbleGPT-320M-Instruct}
|
| 316 |
+
}
|
| 317 |
+
```
|