n64dllm-v1

A LoRA fine-tune of Qwen3-Coder-30B-A3B-Instruct for N64 matching decompilation: given MIPS assembly, write C that recompiles byte-identically under the original SGI IDO 5.3/7.1 compilers. Trained on roughly 74k examples mined from 11 community decomp projects. Every training pair was verified by recompiling it with the original compiler and byte-comparing against the shipped ROM, and every number below is judged the same way. No similarity metrics anywhere.

Results

Held-out games the model never trained on (Pokemon Snap, Mischief Makers), identical prompts for all models, byte-exact recompilation as the judge:

Model exact match @1 pass@8
Qwen3-Coder-30B-A3B, stock 6.7%
n64dllm-v1, this Q4_K_M file 18.3% 20.0%
Claude Opus 4.8 20.0%

The MoE base has 3.3B active parameters, so this runs at about 90 tok/s on an M4 Max. Cheap sampling plus a compiler oracle is the intended usage pattern.

Files

  • n64dllm-v1-Q4_K_M.gguf: for llama.cpp, LM Studio, or any GGUF runtime. Quantization was gated by re-running the benchmark on this exact file; it lost nothing vs bf16.
  • adapter/: the LoRA (rank 64, attention projections) if you want to keep training.

Usage

llama-server -m n64dllm-v1-Q4_K_M.gguf --port 8081 -ngl 99 -c 16384 --jinja -fa on

The prompt format matters. Supply the declared prototype from the project's headers; in ablation it was worth 11.7 points:

You are an expert N64 matching-decompilation model. Given MIPS assembly produced by the ido5.3 compiler, output C that recompiles to a byte-identical match.

; compiler: ido5.3
; declared prototype: void func_80123456(Actor* this, s32 arg1);
; target assembly:
<output of objdump -dr --disassemble=<fn> on the target object>

; matching C:

You will get the best results inside an agent harness with the compiler in the loop: sample several candidates, recompile each, byte-compare, feed diffs back. The project repo ships a ready-made skill file for Codex and OpenCode plus a verification harness built on n64-decomp-workbench.

Limitations

Function signatures should be supplied, not guessed; cross-game struct internals are the main remaining failure mode. Assembly beyond ~4k tokens was not trained on. v1 covers IDO games only, not the GCC-family titles. General coding ability of the base survives the fine-tune (the LoRA touches attention projections only), and tool calling works.

Intended use

Research and community decompilation assistance. Matching decompilation is an existing community practice aimed at interoperability and preservation; this model writes new C and contains no game assets. Not for commercial use of decompiled output. The training data is not distributed.

Downloads last month
39
GGUF
Model size
31B params
Architecture
qwen3moe
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for jlebthedude/n64dllm-v1

Quantized
(164)
this model