Downloads · 30 days
25
3% of all-time downloads
garagelm/hybrid-gpt-232m
hybrid-gpt-232m is a text generation model from garagelm. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A 232M-parameter research base model with hybrid local+global attention (sliding window w=64 on 12 of 16 layers, full causal attention every 4th layer), trained entirely on one Apple M4 Pro Mac mini on 1.0B tokens of…
Downloads · 30 days
25
3% of all-time downloads
All-time downloads
749
Public
Parameters
233M
465 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors465 MB · 99%
How the weights are stored.
BF16232M · 100%
From the Hugging Face model README
A 232M-parameter research base model with hybrid local+global attention (sliding window w=64 on 12 of 16 layers, full causal attention every 4th layer), trained entirely on one Apple M4 Pro Mac mini on 1.0B tokens of refined data. This card is self-contained — the training code lives in a research repo (github.com/GarageLM/garagelm) that may be private; everything needed to understand and evaluate the model is below.
Why it's interesting:
| Model | Train tokens | HellaSwag | PIQA | ARC-E | WinoGrande |
|---|---|---|---|---|---|
| hybrid-gpt-232m | 1B | .357/.397 | .633/.610 | .477/.450 | .517 |
| gpt2 (124M) | ~10B | .353/.427 | .610/.617 | .420/.380 | .530 |
| Pythia-160M | 300B | .350/.390 | .627/.627 | .460/.397 | .510 |
| SmolLM2-135M | 2T | .403/.553 | .653/.680 | .583/.437 | .490 |
(0-shot acc/acc_norm via lm-evaluation-harness, n=300/task, identical harness and example slices for every row — the reference models were re-run locally rather than quoting published full-set numbers, which use different settings and are not comparable.)
Decoder-only transformer: 16 layers, d_model 1024, 16 heads / 4 KV heads (GQA), SwiGLU FFN (hidden 2816), RoPE (θ=10000), RMSNorm, weight tying, context 1024, gpt2 BPE (vocab 50257). Attention is a sliding window of 64 tokens except layers 3/7/11/15, which are fully causal — the KV cache at full context is ~30% of an all-global equivalent, decoding at ~310 tok/s fp16 / ~530 tok/s 4-bit in MLX on M4 Pro (TTFT ≤75ms).
sample-10BT shards) + 15.5% Cosmopedia-v2 synthetic
textbooks. Sub-epoch (each token seen <1x on average).from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("garagelm/hybrid-gpt-232m")
model = AutoModelForCausalLM.from_pretrained("garagelm/hybrid-gpt-232m", trust_remote_code=True)
out = model.generate(**tok("The water cycle begins when", return_tensors="pt"), max_new_tokens=100)
print(tok.decode(out[0]))
No KV cache in this wrapper (research release; generation re-runs the prefix each step).
The MLX conversions are the runtime the throughput numbers above were measured under, and unlike this wrapper they carry real per-layer KV caches (bounded on the 12 sliding-window layers):
hybrid-gpt-232m-mlx — float16, 464MBhybrid-gpt-232m-mlx-4bit — 4-bit, 130MB, at +0.018 nats validation lossBoth are logit-parity-gated against this PyTorch implementation.
garagelm/hybrid-gpt-moe-284m-a114m
(8 experts, top-2, 284M total / 114M active, 100M tokens), is released as a
reproducibility artifact with its active-matched and memory-matched controls
on its card; it is not a stronger model than this one.garagelm/hybrid-gpt-232m-chat (v2: 310M-token
SmolTalk SFT + UltraFeedback DPO; IFEval 13.9% prompt-strict, at a
disclosed ~2-point full-set ARC-Easy cost vs this base — details on its
card).