Harness or Fine-Tuning? Execution-Verified Agents for Qiskit-to-CUDA-Q Porting
Abstract
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, at a third of the harness compute. Translating every prompt from Portuguese to English changed no result significantly on 60 tasks. The choice depends on whether the base model can use the loop and on how far inputs drift from training.
Create a lesson
Metadata
- Categories
- cs.LG, cs.SE, quant-ph
- Comments
- 15 pages, 1 figure, 7 tables. Code: https://github.com/anapaulaappel/qiskit-to-cudaq-harness. Follow-up to arXiv:2611.29793
Related papers
When Does Fine-Tuning Overtake Prompting? An Accuracy and Cost Analysis of Small Language Models on Narrow Tasks
Shared title terminologycs.LGUrs Spiegelhalter, Jörg K. H. Franke, Frank Hutter
EWC-IA3: Adapter Geometry Determines Forgetting in Continual Parameter-Efficient Fine-Tuning
Shared title terminologycs.LGXiaoyan Li, Lanpei Li, Massimo Coppola et al.
Where Self-Hosted Fine-Tuning Overtakes Frontier In-Context Learning: A Measured Crossover on a Bounded Classification Task
Shared title terminologycs.LGGaston Besanson
Reward Fine-tuning of One-step Generators via Backward Drifting
Shared title terminologycs.LGJiwoo Yoon, Hyunsoo Song, Hoseong Hwang et al.
Not Intruders, but Over-Amplified Directions: Rethinking Forgetting in LoRA and Full Fine-Tuning
Shared title terminologycs.LGRongguang Liang, Renchi Yang
Fine-Tuning Large Models on Smaller GPUs: Does Streaming the Model One Layer at a Time (Layer-Streamed QLoRA) Match Standard QLoRA?
Shared title terminologycs.LGAshwini Mandal, Kashish Bataju, Projan Shakya et al.