Harness or Fine-Tuning? Execution-Verified Agents for Qiskit-to-CUDA-Q Porting
A previous study found that fine-tuning a small open model for Qiskit-to-CUDA-Q translation ties a 4-shot prompt and that no model translated any of 27 real QED-C kernels. We ask whether an agent harness -- a loop in which the model runs code and checks its result -- is an alternative to fine-tuning, which parts matter, what each option costs, and when to use both. With the same execution-based verifier (correct only if the kernel matches the Qiskit reference state), a 3B-active mixture-of-experts model (Nemotron Cascade 2 30B-A3B) reaches 97% [89-99] on 60 tasks and 93.8% on all 640 with the full harness, against 0% in a single attempt. API knowledge and verification in the loop are what matter; a weak run-only verifier keeps most of the gain. Models without tool-use post-training do not gain from the loop (dense 4B/7B; Llama 4 Scout, 17B active). A fine-tuned 7B code model matches the harness on the sample at a fifth of the compute, but drops on unseen style (80% vs. 90.5%) and real QED-C kernels (where the harness reaches 63-100%). A verifier-gated cascade -- fine-tuned 7B first, harness only on rejection -- reaches 98.9% on all 640 tasks, 5 points above either system alone,…
- arXiv
- 2612.04403
- Authors
- Ana Paula Appel
- Categories
- cs.LG · cs.SE · quant-ph