Instructions to use DrunkkToys/theOG-50M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use DrunkkToys/theOG-50M with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf DrunkkToys/theOG-50M # Run inference directly in the terminal: llama cli -hf DrunkkToys/theOG-50M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf DrunkkToys/theOG-50M # Run inference directly in the terminal: llama cli -hf DrunkkToys/theOG-50M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf DrunkkToys/theOG-50M # Run inference directly in the terminal: ./llama-cli -hf DrunkkToys/theOG-50M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf DrunkkToys/theOG-50M # Run inference directly in the terminal: ./build/bin/llama-cli -hf DrunkkToys/theOG-50M
Use Docker
docker model run hf.co/DrunkkToys/theOG-50M
- LM Studio
- Jan
- vLLM
How to use DrunkkToys/theOG-50M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DrunkkToys/theOG-50M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DrunkkToys/theOG-50M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DrunkkToys/theOG-50M
- Ollama
How to use DrunkkToys/theOG-50M with Ollama:
ollama run hf.co/DrunkkToys/theOG-50M
- Unsloth Studio
How to use DrunkkToys/theOG-50M with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for DrunkkToys/theOG-50M to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for DrunkkToys/theOG-50M to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for DrunkkToys/theOG-50M to start chatting
- Docker Model Runner
How to use DrunkkToys/theOG-50M with Docker Model Runner:
docker model run hf.co/DrunkkToys/theOG-50M
- Lemonade
How to use DrunkkToys/theOG-50M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull DrunkkToys/theOG-50M
Run and chat with the model
lemonade run user.theOG-50M-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
theOG-50M
A 50.7M-parameter code generation model trained from scratch, aligned with DPO on execution-verified preference pairs β every "chosen" completion in the preference set actually passed the task's unit tests.
Small enough to run on a laptop CPU. Deep rather than wide (10 layers Γ 512), a choice made from measurement: at this scale depth beat width on every benchmark we ran.
This version β DPO v4 (2026-08-16)
model_state.pt is theOG_50M_dpo_v4, sha256 c2479a076101fd79β¦, DPO from
the deep fine-tuned base 2a28067c9755β¦ on 43 execution-verified pairs
(beta 0.2, lr 5e-6, 300 steps, accum 8, reference = frozen base). Held-out val CE
moved 0.4311 β 0.4504 (+0.019), 20x under the degradation flag β the preference
objective moved the logits without damaging the LM.
Results
Greedy (true argmax, identical MLX harness, measured for this version)
| benchmark | base 2a28067c⦠|
this model c2479a07β¦ |
delta |
|---|---|---|---|
| graded L1-L10 v2 | 18/30 | 21/30 | +3 |
| HumanEval-164 | 15/164 | 19/164 | +4 |
| MBPP-500 | 18/500 | 20/500 | +2 |
First DPO checkpoint with a verified, stable, across-the-board greedy gain β graded +3, HE +4, MBPP +2, no benchmark lost, val CE stable.
External calibration β vs Salesforce CodeGen-350M (357M, 7x larger)
| model | params | graded v2 strict (greedy) | HE-164 pass@32 |
|---|---|---|---|
| theOG-50M (this model) | 50.7M | 21/30 | not run yet |
| theOG-50M base | 50.7M | 19/30 | 32/164 |
| theOG-50M DPO v2 | 50.7M | 20/30 | 36/164 |
| CodeGen-350M | 357M | 20/30 | 51/164 |
On 18/30 vs 19/30 for "base". Both rows are the same weights (
2a28067cβ¦;theOG_50M_deepandtheOG_50M_deep_dpoare byte-identical checkpoints under two directory names). The 18/30 in the greedy table is the MLXbench_gradedharness; the 19/30 here is the torch autograde-strict harness. The +3 delta above is harness-consistent β base and DPO v4 were both measured on MLX.
Graded numbers from the benchmark record (BENCHMARK_PILOT_50M_2026-08-11.md,
same autograde-strict harness, greedy). HE-164 pass@32 for the 50M family from
the same record; CodeGen-350M measured 2026-08-15 (k=32, temp 0.8,
results/he164_k32_codegen350_final.json). DPO v4's own pass@32 has not been
run yet β the cell above says "not run yet" and will be filled in once
measured.
Test-time β K8 self-consistency + MBR-exec (no retraining)
On MBPP-500 the k=32 candidate headroom converts to pass@1 via execution-clustered
selection (MBR-exec, scripts/rerank_candidates.py): greedy 18 β MBR 53/500
(p = 3e-8), clean-solvable conversion 30.4% β 76.1%. On graded v2, K8 sampling
raises strict from 19 β 25/30.
Use cases
- Local code autocomplete β a lightweight completion for your editor that runs entirely on your laptop, offline, no cloud.
- On-device assistant β a tiny model you can embed in an app; your code and prompts never leave the device.
- Learning β run and inspect a real language model on your own machine, no GPU or API required.
Architecture
| parameters | 50.7M |
| layers Γ hidden | 10 Γ 512 |
| attention heads | 4 |
| FFN | 2048, SwiGLU |
| vocabulary | 16,000 (custom BPE) |
| context | 1024 |
| position encoding | RoPE + learned |
Files
model_state.ptβ theOG_50M_dpo_v4 weights (sha256c2479a076101fd79β¦)tokenizer.jsonβ custom 16k BPE tokenizerconfig.jsonβ model configurationmlx/β theOG_50M_dpo_v4 in MLX format (custommodel.pywith QK-norm + learned pos-embed, logits-parity verified vs the torch reference)gguf/β theOG_50M_deep_dpo (the base2a28067cβ¦, not DPO v4) as f16 GGUF, 114 tensors, round-trip max abs err 4.88e-04. Written under the customtheog50march key: a stock llama.cpp cannot load it without an arch patch. Seegguf/README.md.
Usage (PyTorch)
AutoModelForCausalLM does not work with this repo. The architecture is
custom (model_type: elastic, ElasticGPT) and is not registered in
Transformers, and this repo ships no modeling_*.py, so trust_remote_code
does not help either. Loading it raises:
ValueError: The checkpoint you are trying to load has model type `elastic`
but Transformers does not recognize this architecture.
AutoTokenizer does work. For the weights, use model_state.pt with the
model definition from the source repo, or use the MLX folder below.
from transformers import AutoTokenizer # tokenizer only
tok = AutoTokenizer.from_pretrained("DrunkkToys/theOG-50M")
Usage (MLX)
The mlx/ folder is a ready-to-load MLX model. Note that mlx_lm.load() takes
a repo id or a local path β "DrunkkToys/theOG-50M/mlx" is not a valid repo
id (three segments) and raises HFValidationError. Download the subfolder
first, then load the local path:
from huggingface_hub import snapshot_download
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler
path = snapshot_download("DrunkkToys/theOG-50M", allow_patterns="mlx/*")
model, tokenizer = load(f"{path}/mlx")
sampler = make_sampler(0.4, top_p=0.85, top_k=10, min_p=0.2)
out = generate(model, tokenizer, prompt="write a function that returns the sum of two numbers",
max_tokens=256, sampler=sampler)
print(out)
This is a 50M model: greedy sampling degenerates, and even loose sampling drifts
into token-repetition loops. The tuned serving settings are temp 0.4 /
top_p 0.85 / top_k 10 / min_p 0.2, with a repetition_penalty of 1.2 and a
stop at the model's natural closing code fence.
Serve it with mlx_lm.server β again pointing at the downloaded local folder:
python -c "from huggingface_hub import snapshot_download as d; print(d('DrunkkToys/theOG-50M', allow_patterns='mlx/*'))"
mlx_lm.server --model <printed-path>/mlx \
--temp 0.4 --top-p 0.85 --top-k 10 --min-p 0.2 --max-tokens 1024
mlx_lm.server only applies repetition_penalty and stop per request, so
send them in the request body:
curl -X POST http://127.0.0.1:8080/v1/chat/completions \
-H 'content-type: application/json' \
-d '{"model":"local","messages":[{"role":"user","content":"sum two numbers"}],
"temperature":0.4,"top_p":0.85,"top_k":10,"min_p":0.2,
"repetition_penalty":1.2,"stop":["\n```\n"]}'
Provenance
Every model this family publishes carries its sha256 and its base checkpoint sha256, because this project previously shipped nine repos containing one identical file. Verify before trusting the label:
from huggingface_hub import HfApi
[f.lfs.sha256 for f in HfApi().model_info("DrunkkToys/theOG-50M", files_metadata=True).siblings
if f.rfilename == "model_state.pt"]
- Downloads last month
- 594
We're not able to determine the quantization variants.