matthewhaynesonline/gemma-4-E2B-it-crap
The matthewhaynesonline/gemma-4-E2B-it-crap model is a 5.1 billion parameter LoRA fine-tune of google/gemma-4-E2B-it, specifically trained to generate raw executable Linux x86_64 binaries directly from natural language descriptions. This model bypasses traditional compilers by emitting machine code byte-for-byte as a hex string. It is part of the Compiler Replacement for Assembling Programs (CRAP) project, designed for direct binary generation tasks.
Loading preview...
Overview
This model, gemma-4-E2B-it-crap, is a 5.1 billion parameter LoRA fine-tune of Google's gemma-4-E2B-it base model. Its core innovation lies in its ability to generate complete Linux x86_64 executable binaries directly from natural language prompts, outputting the machine code as a hex string. This approach effectively skips the compilation step, directly producing functional binaries.
Key Capabilities
- Direct Binary Generation: Translates natural language descriptions (e.g., "Generate a Linux x86_64 binary that prints 'hello world'") into raw ELF (Linux x86_64) binaries.
- Compiler Replacement: Functions as a "Compiler Replacement for Assembling Programs" (CRAP), emitting machine code byte-for-byte.
- High Accuracy on Specific Tasks: Achieves 87.0% pass rate on its evaluation harness, where a pass requires the emitted hex to decode, parse as a valid ELF, and run with exact expected stdout and exit code.
- System Prompt Robustness: While a canonical system prompt is preferred for optimal performance, the model is robust to paraphrased prompts or no system prompt at all.
Known Limitations
- Output Formatting: Generated binaries typically include a trailing newline in their output.
- Write-Length Errors: Can miscount
write-length for arbitrary strings, leading to truncated or padded output. - Byte Repetition Sensitivity: Adjacent duplicate bytes in target strings can increase the likelihood of errors.
- Exit Code Inaccuracies: Decimal-to-hex immediate encoding for exit codes can be off (e.g.,
exit(223)might produce222). - In-Distribution Performance: Performs best on strings similar to its training data; genuinely novel words show lower accuracy.
- Single-Turn Only: Optimized for single-turn interactions; multi-turn conversations may degrade performance.
- Linux x86_64 Specific: Only generates binaries for Linux x86_64 architecture; behavioral correctness is not guaranteed for other platforms like macOS Mach-O.
When to Use This Model
This model is ideal for developers and researchers exploring novel methods of code generation, particularly those interested in direct machine code synthesis for Linux x86_64. It's suitable for tasks requiring the creation of small, specific binaries from natural language, especially when the target strings are within its training distribution. Its unique capability to bypass traditional compilers makes it a valuable tool for understanding and experimenting with low-level binary generation.