Where Self-Hosted Fine-Tuning Overtakes Frontier In-Context Learning: A Measured Crossover on a Bounded Classification Task
Abstract
When does a self-hosted fine-tuned model become cheaper than a frontier API at comparable task accuracy? We measured classification accuracy, training and serving costs, latency, and prompt-cache behavior on a bounded OpenOrca workload. A Llama-3.1-8B LoRA adapter trained on an owned laptop in 6.1 hours using 191 Wh of CPU and GPU package energy. It answered 814 of 949 classification items correctly, compared with 805 for Claude Sonnet 5.5 given a 4k reference manual (paired difference +0.9 percentage points, 95% bootstrap interval -1.4 to +3.3). The frontier model answered 746 correctly without the manual and 765 with its seven formatting rules alone; the rules-only prefix fell below the provider's caching minimum and so cost more per request than the warm-cached manual. At the study's full-utilization laptop allocation, the adapter recovered its fixed machine cost after 4,255 queries against the cached manual and 7,333 against the no-document comparator. A dedicated server at 1% utilization had no finite crossover against the cached manual. Increasing the manual from 4k to 64k produced no aggregate classification gain on 200 matched items while cached cost rose 7.6-fold. Median time to first token was 0.38 s for the adapter and 1.44 s for the frontier arm; when labels changed after deployment, the adapter kept the old answers on 83 to 88 percent of changed records while the frontier arm followed an updated manual. We release the test inputs, per-record predictions, cost calculations, and offline scoring code.
Create a lesson
Metadata
- Categories
- cs.LG, cs.SE
- Comments
- 19 pages, 3 figures. Code, data, per-record predictions and cost calculations at https://github.com/besanson/icl-vs-ft (tag v1.0.4)
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.
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.
Stabilizing Zeroth-Order Fine-Tuning of Mixture-of-Experts via One-Sided Estimation and Expert Replay
Shared title terminologycs.LGHuanyi Xie, Liangyu Wang, Youming Tao et al.