A LoRA adapter for ibm-granite/granite-4.2-8b that turns x86 assembly plus compiler context into readable C++ intended to recompile byte-for-byte with Microsoft Visual C++ 2008 SP1 (cl 15.00.30729.01). It is also trained to repair a failed candidate from compiler/checker feedback.
Each function was attempted up to 6 times, with checker feedback between attempts. Sampling used temperature 1.0 and top_p 0.95, with thinking off. A match counts only when the official checker reports a byte-exact match. Test functions and their near-duplicates were excluded from training.
| Base Granite 4.2 8B | This adapter | |
|---|---|---|
| Exact byte match | 7 (3.4%) | 26 (12.7%) |
| Compiled at least once | 53 (26%) | 131 (64%) |
| Compiled on first attempt | 9 (4%) | 62 (30%) |
| Output tokens used | 1.76M | 0.62M |
The adapter is strong on small functions: 26 of 84 functions under 64 bytes matched. It did not match any test function of 64 bytes or larger.
enable_thinking=Falsevllm serve ibm-granite/granite-4.2-8b --enable-lora --max-lora-rank 64 \
--lora-modules granite-msvc-decomp=<this-repo>
Send chat requests with chat_template_kwargs: {"enable_thinking": false}. Give the target's assembly,
calling-convention hint, compiler flags and the surrounding declarations, and ask for one complete
C++ definition in a ```cpp block.
ibm-granite/granite-4.2-8b