A 7B-parameter transformer model is trained from scratch to optimize LLVM assembly for code size, taking unoptimized assembly as input and outputting a list of compiler options for best optimization.
The model is trained to predict the instruction counts before and after optimization and the optimized code, improving its performance and understanding depth, and outperforms existing methods by reducing instruction counts by 3.0%.