/ Модель

Характеристики

Параметры
44,9 млн
Лицензия
Apache 2.0
Архитектура
elastic · dense
Опубликована
12 авг 2026

theOG-50M

Генерация текстаТекст → текст3 профессии

Компактная модель DrunkkToys для локальной генерации и автодополнения кода, обученная с нуля и выровненная методом DPO.

158скачиваний за 30 дней1лайквеса обновлены16 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

theOG-50M — компактная модель генерации кода от DrunkkToys, обученная с нуля и затем дообученная методом DPO на парах предпочтений, где выбранные ответы прошли модульные тесты. По данным карточки, эта версия содержит около 50 млн параметров; её архитектура ElasticGPT имеет 10 слоёв с размерностью 512 и 4 головы внимания, а токенизатор использует собственный BPE-словарь на 16 тысяч токенов. Модель предназначена для локального автодополнения кода, работы офлайн на ноутбуке или встраивания в приложения без отправки кода в облако, а также для изучения небольших языковых моделей.

В README приведены результаты на задачах генерации кода, включая HumanEval и MBPP, но они показывают ограниченную точность небольшой модели. Репозиторий содержит веса в форматах PyTorch и MLX, а также GGUF-вариант базового чекпойнта; GGUF использует нестандартную архитектуру и не загружается обычной сборкой llama.cpp без патча. Архитектура не зарегистрирована в Transformers, поэтому AutoModelForCausalLM напрямую не работает. Лицензия репозитория — Apache-2.0.

Сценарии применения

  • локальное автодополнение кода в редакторе
  • генерация кода Python для небольших задач
  • офлайн-помощник по программированию на ноутбуке
  • встраивание генерации кода в приложение без облачного API
  • изучение и эксперименты с небольшой языковой моделью

Ограничения

Модель небольшая и показывает ограниченные результаты на тестах генерации кода. Архитектура ElasticGPT не поддерживается напрямую Transformers, а включённый GGUF-файл требует патча архитектуры для загрузки в llama.cpp.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

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)

benchmarkbase 2a28067c…this model c2479a07…delta
graded L1-L10 v218/3021/30+3
HumanEval-16415/16419/164+4
MBPP-50018/50020/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)

modelparamsgraded v2 strict (greedy)HE-164 pass@32
theOG-50M (this model)50.7M21/30not run yet
theOG-50M base50.7M19/3032/164
theOG-50M DPO v250.7M20/3036/164
CodeGen-350M357M20/3051/164

On 18/30 vs 19/30 for "base". Both rows are the same weights (2a28067c…; theOG_50M_deep and theOG_50M_deep_dpo are byte-identical checkpoints under two directory names). The 18/30 in the greedy table is the MLX bench_graded harness; 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

parameters50.7M
layers × hidden10 × 512
attention heads4
FFN2048, SwiGLU
vocabulary16,000 (custom BPE)
context1024
position encodingRoPE + learned

Files

  • model_state.pt — theOG_50M_dpo_v4 weights (sha256 c2479a076101fd79…)
  • tokenizer.json — custom 16k BPE tokenizer
  • config.json — model configuration
  • mlx/ — theOG_50M_dpo_v4 in MLX format (custom model.py with QK-norm + learned pos-embed, logits-parity verified vs the torch reference)
  • gguf/ — theOG_50M_deep_dpo (the base 2a28067c…, not DPO v4) as f16 GGUF, 114 tensors, round-trip max abs err 4.88e-04. Written under the custom theog50m arch key: a stock llama.cpp cannot load it without an arch patch. See gguf/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"]

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

Архитектура elastic неизвестна transformers в образе рантайма.

Класс архитектуры
ElasticGPT
Ревизия весов
70017e0

0 моделей