/ Модель

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

Лицензия
Apache 2.0
Библиотека
pytorch
Опубликована
18 ноя 2026

pramen-498m

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

Декомпилятор на 498 млн параметров, который восстанавливает вероятный код C из ассемблера функций Windows и MS-DOS.

166скачиваний за 30 дней0лайковвеса обновлены18 ноя 2026

Бенчмарки

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

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

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

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

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

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

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

PRA-MEN 498M — нейросетевой декомпилятор от radix16, преобразующий ассемблер одной функции в C. Модель предназначена для кода Windows и MS-DOS, собранного компиляторами MSVC, Open Watcom, Microsoft C 5.1 и Digital Mars; поддерживает 17 вариантов целевой платформы, разрядности и оптимизации. Это авторегрессионный decoder-only трансформер в стиле GPT-2 с 498 млн параметров, обученный с нуля на 3 млрд токенов ассемблера и C, с собственным токенизатором на 16 384 токена.

Модель можно применять для восстановления исходной структуры функций, анализа старых программ и игр, а также подготовки кандидатов на исходный код для последующей проверки. Вариант с выбором лучшего из нескольких кандидатов использует перекомпиляцию результата соответствующим компилятором. По данным карточки, на тестах HumanEval-C качество greedy-декодирования составляет 45,5%, а лучший результат из восьми кандидатов — 57,3%; на отложенных функциях точное совпадение при повторной компиляции достигалось в 29,4% случаев без объявлений и в 39% с объявлениями.

Результат является гипотезой исходного кода: имена придумываются, типы угадываются, а логику необходимо проверять. Модель обрабатывает по одной функции за раз, примерно до 3 500 входных токенов; без объявлений глобальные переменные и структуры видны лишь как адреса и смещения. Обучение охватывало перечисленные компиляторы, поэтому код Borland, Turbo C, GCC и MinGW находится вне обучающего распределения. Лицензия — Apache-2.0.

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

  • восстановление кода C из функций x86 и x86-64
  • декомпиляция старых программ Windows, собранных MSVC
  • анализ и перенос функций из игр и программ для MS-DOS
  • подготовка вариантов исходного кода для повторной компиляции и проверки

Ограничения

Выход — предположение: имена переменных и функций придумываются, типы угадываются, а логику нужно проверять. Модель рассчитана на одну функцию примерно до 3 500 входных токенов и на код от поддерживаемых компиляторов; другие компиляторы находятся вне обучающего распределения.

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

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

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

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

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

Открыть на Hugging Face

PRA-MEN 498M · neural decompiler for Windows and MS-DOS

Pramen (Czech for source, spring) turns the assembly of a single function back into C. It targets the toolchains of the Windows / DOS world rather than Linux/GCC.

This is the larger model (498 M parameters). A smaller, faster model with the same interface is radix16/pramen-223m – see Which one? below.

varianttarget
msvc-x64-Od / msvc-x64-O2 / msvc-x64-O1Windows x64, MSVC, no optimization / /O2 / /O1
msvc-x86-Od / msvc-x86-O2 / msvc-x86-O1Windows x86 (32-bit cdecl), MSVC
dos16-small-od / dos16-small-oxMS-DOS 16-bit real mode, small model, Open Watcom, no optimization / -ox
dos16-large-ox / dos16-large-osMS-DOS 16-bit real mode, large model (far calls), Open Watcom -ox / -os
dos32-od / dos32-ox (new)MS-DOS 32-bit protected mode (DOS/4GW, flat), Open Watcom wcc386, register calling (-5r)
dos16-msc-small-od / -small-ox / -large-ox (new)MS-DOS 16-bit, Microsoft C 5.1
dos16-dmc-small-o / dos16-dmc-large-o (new)MS-DOS 16-bit, Digital Mars C

It is a 498 M parameter decoder-only transformer (GPT-2 style) trained from scratch – no natural language, just assembly and C, with its own 16 384-token tokenizer (the same as the 223M model).

The output is a proposal. It usually compiles and often has the right structure, but names are invented (they are not in the binary), types are guessed and the logic has to be checked.

What's new in 1.3

  • Larger model: 24 layers × 1 280 instead of 16 × 1 024, trained on more data (3.0 B assembly → C tokens).
  • Seven new DOS variants: 32-bit DOS/4GW code from Open Watcom (most DOS games of the 90s), Microsoft C 5.1 and Digital Mars for 16-bit DOS.
  • Declarations (--context), --candidates 8, int8 and the web UI work as in 1.2. With declarations, 39 % of held-out functions recompile to exactly the input assembly (223M: 35 %).

Versions

Each release is a git tag of this repository; hf download radix16/pramen-498m --revision v1.3 always gives exactly that release, without --revision you get the newest. The version number is shared by the whole Pramen family (pramen-223m is at 1.2).

versiondatechangesHumanEval-C, best of 8held-out exact match
v1.32026-11-18first 498M release, 7 new DOS variants57.3 %29.4 %

Which one?

pramen-498m (this)pramen-223m
HumanEval-C, best of 8 (avg. of 5 variants)57.3 %53.6 %
HumanEval-C, greedy45.5 %41.4 %
variants17 (incl. DOS 32-bit, MS C, Digital Mars)10
download (fp32 / int8)2.0 GB / 0.6 GB0.9 GB / 0.3 GB
CPU speedabout 2× slowerfaster

Use the 498M model when you have a GPU, need the DOS 32-bit / MS C / Digital Mars variants, or want the best output; the 223M model on a laptop CPU.

Results

HumanEval-C from LLM4Binary/decompile-eval (CC0), recompiled with the same toolchains as the training data – 205 tasks (196–203 per variant). A task counts as solved when the decompiled C compiles (as C17 with the standard headers) and passes the original tests (re-executability). Max 600 new tokens.

variant223M greedy498M greedy223M --candidates 8498M --candidates 8
msvc-x64-Od57.1 %60.6 %72.9 %75.9 %
msvc-x64-O229.2 %33.7 %39.1 %44.1 %
msvc-x86-Od56.7 %55.2 %70.0 %70.4 %
dos16-small-od41.8 %50.5 %55.1 %58.2 %
dos16-large-ox22.3 %27.4 %31.0 %38.1 %
average41.4 %45.5 %53.6 %57.3 %

New variants, HumanEval-C greedy: dos32-od 51.5 %, dos32-ox 30.9 %, dos16-dmc-small-o 29.8 %, dos16-dmc-large-o 32.1 % (196–204 tasks each). Microsoft C 5.1 cannot compile the C99 test code, so the dos16-msc-* variants are only measured on the held-out functions below.

MBPP-C from the same dataset (first 400 tasks, 338–357 usable per variant), greedy, same rules:

variant223M498M
msvc-x64-Od57.3 %57.9 %
msvc-x64-O230.1 %30.9 %
msvc-x86-Od56.6 %55.5 %
dos16-small-od44.0 %50.7 %
dos16-large-ox27.5 %29.3 %
average43.1 %44.9 %

Held-out ExeBench functions (never used in training, compiled with their real dependencies), greedy: how often the output recompiles to exactly the input assembly, and how often it compiles at all.

exact matchcompiles
223M, 10 original variants (1 431 pairs), no declarations26.3 %46.5 %
498M, 10 original variants (1 431 pairs), no declarations29.4 %50.2 %
223M, 10 original variants, with the function's declarations34.7 %63.7 %
498M, 10 original variants, with the function's declarations39.1 %68.2 %
498M, 7 new DOS variants (1 898 pairs), no declarations39.4 %65.6 %

Per new variant (exact / compiles): dos32-od 38 / 63 %, dos32-ox 35 / 57 %, dos16-msc-small-od 51 / 88 %, dos16-msc-small-ox 54 / 85 %, dos16-msc-large-ox 46 / 85 %, dos16-dmc-small-o 41 / 71 %, dos16-dmc-large-o 47 / 76 %.

examples.json contains 12 classic functions × 6 variants with this model's outputs and test results (56 / 72 pass; the 223M model: 52 / 72) – they are also shown in the web UI.

Quick start

pip install huggingface_hub
hf download radix16/pramen-498m --local-dir pramen     # or: git clone https://huggingface.co/radix16/pramen-498m
cd pramen
pip install -r requirements.txt                   # torch, tokenizers, safetensors

# command line (model is found in the current folder)
python -m pramen example-count_words-msvc-x64-Od.asm --variant msvc-x64-Od

# with declarations: a function over a struct
python -m pramen example-order_total-msvc-x64-Od.asm --variant msvc-x64-Od --context example-order_total.h

# web UI with examples → http://127.0.0.1:8780
python -m pramen.web

GPU: a few seconds per function. On CPU it is about twice as slow as the 223M model; --quantize int8 uses the ready-made int8/ copy (0.6 GB).

python -m pramen func.asm --variant dos32-ox --candidates 8       # pick the best of 8 by recompiling
python -m pramen func.asm --variant msvc-x86-Od --quantize int8   # CPU, smaller and faster (uses int8/)

Compilers for --candidates

--candidates recompiles every candidate with the compiler of the variant, so it needs that compiler:

variantscompilerwhere it is looked for
msvc-*Visual Studio 2022 / Build Toolsvcvars64.bat, or DECOMP_VCVARS
dos16-* (Watcom), dos32-*Open Watcom V2C:\WATCOM, or DECOMP_WATCOM
dos16-dmc-*Digital Mars C 8.57 + DOS 16-bit libraries (free download)tools\dmc\dm\bin\dmc.exe, or DECOMP_DMC
dos16-msc-*Microsoft C 5.1 from microsoft/MS-DOS (MIT, v4.0/src/TOOLS) run under MS-DOS Playertools\msc, tools\msdos-player\…, or DECOMP_MSC, DECOMP_MSDOS_PLAYER

Without a compiler the model still works; only --candidates is unavailable for that variant.

Getting the assembly

  • MSVC: dumpbin /disasm:nobytes program.obj – copy the block of one function.
  • Open Watcom, Microsoft C, Digital Mars (OMF .obj): wdis -a program.obj.
  • Ghidra: copy instructions from the Listing window. Turn off Markup Stack Variable References (Edit → Tool Options → Listing Fields → Operands Field).

pramen.normalize converts all of these into the exact form used in training.

Declarations (--context)

As in 1.2: struct / union / enum definitions, typedefs, extern globals and prototypes of called functions that the function uses. The Ghidra script pramen/ghidra/PramenContext.py exports them.

Prompt format

<|asm|>{variant}
{normalized assembly}
<|c|>
{declarations, optional – C lines, then a newline}
{C code}<|endoftext|>

Training

  • Data: assembly → C pairs from ExeBench functions, each compiled with MSVC 19.36, Open Watcom V2 (16 and 32 bit), Microsoft C 5.1 and Digital Mars 8.57, deduplicated (exact + near): 8.5 M pairs for the original variants plus 1.7 M pairs for the new DOS variants.
  • Additional C/C++ source code, mixed in so the model learns C syntax and idioms, from permissively licensed GitHub repositories (codeparrot/github-code-clean), The Stack, and several open-source projects (cJSON, fmt, nlohmann/json, and the GPL-2.0 source releases of Doom and Quake I–III).
  • Declarations and own verified outputs as in the 223M model 1.2.
  • Final mix: new DOS variants 30 %, original variants 55 %, declarations 15 %, so the model does not forget the original variants while learning the new ones.
  • Architecture: 24 layers, 1 280 hidden, 20 heads, MLP 5 120, context 4 096, learned positions, tied embeddings.

Limitations

  • one function at a time, up to ~3 500 input tokens (roughly 400–600 lines of assembly)
  • without declarations, globals and structs are only visible as addresses and offsets
  • variable and function names are invented
  • trained only on code produced by the compilers above; others (Borland / Turbo C, GCC/MinGW, …) are out of distribution
  • the C source of Doom is in the training data, so do not use Doom to evaluate it

License and data

Model weights and code: Apache-2.0. The training functions keep the licenses of their original GitHub repositories (as collected by ExeBench); the additional source code includes GPL-2.0 code (Doom, Quake). Use the outputs accordingly – decompiled code of third-party software is still subject to its original license.


Česky

Pramen 498M je větší model neuronového dekompilátoru Pramen: z assembleru jedné funkce napíše C. Proti menšímu pramen-223m je přesnější (HumanEval-C s výběrem z 8 kandidátů 57,3 % proti 53,6 %) a navíc umí 32bitový DOS (Open Watcom, DOS/4GW – většina DOS her 90. let), Microsoft C 5.1 a Digital Mars. Ovládání je stejné: pip install -r requirements.txt, pak python -m pramen.web nebo python -m pramen soubor.asm --variant dos32-ox.

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

Ревизия весов
85e393b

0 моделей