Bragi-LLM: An 805 MB Hybrid Code-Generation System Reaches 92% MBPP via LLM-Symbolic Engine Routing
Description
Bragi-LLM is a sub-gigabyte (805 MB total) Python code-generation system that reaches 92% pass rate on the MBPP test split under 100-problem sustained evaluation (single-shot, greedy decoding, no retry).
It places within 2 absolute points of Qwen2.5-Coder-7B fp16 (94%, 14 GB, 17x the footprint), and 27 absolute points above the same 1.5B-Q3 backbone evaluated standalone (65%).
The system combines (i) a 786 MB Q3_K_M quantised Qwen2.5-Coder-1.5B-Instruct backbone with imatrix calibration, (ii) a 15 KB hand-engineered symbolic engine library of 50 unit-tested helpers covering rare formulas, and (iii) a 6 KB keyword-based intercept router that detects formula-class problems and routes them directly to the engine library, bypassing the LLM.
The dominant failure mode of the small backbone is rare-formula recall under quantisation noise, not reasoning capacity. Externalising this knowledge into a static library, then routing matched problems around the LLM, recovers the capability gap at near-zero deployment cost. The full stack runs on commodity CPU hardware with no API dependency and no recurring fees.
All artefacts under MIT License: Bragi-LLM (backbone + library + router + harness), Demeter-CodeBuilder (integration with the Code Tree IDE).
Notes (English)
Files
CITATIONS_VERIFIED.md
Additional details
Related works
- Is supplement to
- Software: https://github.com/norika1207-lab/Bragi-LLM (URL)
- Software: https://github.com/norika1207-lab/Demeter-CodeBuilder (URL)