My genetic algorithm lost to a dynamic program
EMPAS searches per-layer quantization with NSGA-II. Against an exact solver on the same proxy at the same bit budget, the genetic algorithm ties or loses.
0.7 to 1.3 millinatsGA behind the exact optimum at 4 of 6 budgets
Written up , revised
Symptom
Two claims on the EMPAS page had nothing underneath them. The genetic algorithm was said to find good mixed-precision configurations, but I had compared it with nothing. And quantized decoding was said to be 2 to 3 times faster, a figure from one cold FP16 run set against warm quantized runs.
Hypothesis
The loss proxy sums a cost per layer. A sum like that, under a bit budget, is a knapsack, and a knapsack has an exact solution by dynamic programming. I expected a genetic algorithm to tie at best. For latency I suspected the cold start, because the FP16 run was 486 ms.
Evidence
First I checked that the proxy deserves any search. I measured 30 genomes on the full validation split (299,520 tokens). The proxy built on the real quantization backend correlates with measured loss at r = 0.988 (95% interval 0.975 to 0.997). The simulated quantizer I started with reaches 0.933.
Then I compared methods at the same bit budget on the test split (340,992 tokens), scored once. GA and random search are means over 10 seeds, and random search got the same number of unique evaluations as the GA.
Uniform int8 at 8 bits loses 18.0. Source: EMPAS results/phase3/SUMMARY.md, section 4.
NSGA-II beats random search at all six budgets and uniform int8 by 43% at 8 bits or fewer. It ties the exact optimum at 5, is better by 0.24 at 6 (interval −0.47 to −0.01), and is worse by 0.7 to 1.3 at 7, 8, 10 and 12. Greedy beats the DP optimum on hardware at 12, because the proxy ignores layer interactions.
For latency I warmed up for 20 iterations and timed 100 decode steps in each of 5 interleaved rounds. FP16 takes 10.90 ms per token, 4-bit 14.19 and 8-bit 22.44.
Root cause
The problem was exactly solvable, so the search added nothing the solver did not. The speed claim was a measurement error: bitsandbytes dequantizes on the fly, and batch-1 decoding of a 1.1B model is bound by kernel launches, so fewer bits means more work.
Fix
I withdrew the speed claim and dropped the latency objective, a bits-over-16 score whose correlation with measured decode time is −0.66, the wrong sign. I fitted the VRAM model to measurements: the intercept is 307 MiB, where my guess of 1,024 MiB overestimated peak memory by 53%. The page now says the evidence supports the proxy and the mixed-precision idea, and does not support the genetic algorithm for this objective.
Regression guard
The protocol was written before any result existed, and deviations are appended, never edited in. p3_04_compare.py refuses to run on the test split a second time unless you pass --force, and a forced rerun is recorded in the output. The test suite grew from 56 to 74.
Status
Closed for the claim, open for the method. A genetic algorithm could earn its place on an objective with layer interactions, where the sum no longer holds and the exact solver stops applying. I have not tested one. All of this is one model, one backend, one laptop GPU and WikiText-2 perplexity, with no downstream task accuracy measured.