Skip to content
#small language model Open access

End-to-end decision latency of a confidence-gated Laya–phi4 cascade on one consumer GPU

Oct 2026 · Zenodo (CERN European Organization for Nuclear Research)
Topic Modeling Natural Language Processing Techniques

Abstract

A small, fast text classifier can answer the easy cases itself and pass only the uncertain ones to a large language model. Version 1.0 of this work estimated how much time such a two-stage setup saves; this version measures it while both models run on one consumer graphics card. The two-stage setup made the average decision take less than half as long as the large model alone. The version 1.0 formula for the expected decision time, fed with this run's separate timings of each model, matched the measured average closely. For the slowest items we could not tell whether the two-stage setup was faster or slower. The test items were repeated, so the large model's server sometimes found it had already processed the same prompt and could skip part of the work; a later estimate of the times without such whole-prompt reuse gives a larger average saving and still cannot tell for the slowest items. The large model was not tuned for speed, and this version does not show that the faster setup is as accurate. This version also corrects the size of the small model given in version 1.0: 322 million parameters, not 56 million. Details. A Laya text classifier (0.3.6 multilingual checkpoint) answers when its top probability is at least 0.90, otherwise the item goes to phi4:14b. Both models were resident on one RTX 4070, with phi4 served over localhost. The same 204-item holdout was run in six rounds of three arms (phi4 alone, Laya alone, cascade), 3672 timed decisions, under an internally preregistered, hash-frozen analysis plan. Each item's time in an arm is its median over the six rounds. Cascade minus phi4 alone, with 95 % bootstrap intervals over items: mean 100.7 against 226.8 ms, difference -126.0 ms [-142.1, -109.7]; median 17.0 against 223.7 ms, difference -206.7 ms [-246.3, -197.3]; 95th percentile 304.4 against 293.7 ms, difference +10.7 ms [-3.3, 31.5], undecided. The v1.0 cost model predicted the live mean (arithmetic mean over rounds, 101.1 ms) with an error of -1.0 ms [-2.3, 0.2]. Qualifications: the items recurred in every round and the phi4 server kept a prompt cache, so 29 % of phi4 calls in the phi4-alone arm and 39 % in the cascade found their whole prompt already processed; a post hoc estimate that adds back the prompt processing these hits skipped, keeping the reuse of each task's shared prompt prefix, gives a mean difference of about -145 ms and leaves the tail undecided. The phi4 baseline used the v1.0 settings, not tuned for speed. This run does not show that the cascade is as accurate as phi4 alone: on the first round both arms got 180 of 204 items right, though not the same items (six gains and six losses for the cascade). Package: the note (PDF; Markdown in the archive), the frozen plan and freeze file, run and analysis code with tests, per-call and per-block records without item texts, logs and reports. Item texts are not included. Code under MIT, everything else under CC BY 4.0 (file LICENSE); EXPORT_MANIFEST.json lists every file and every change made for publication. Note added 12 October 2026: the latest version of this record is version 1.2 (DOI 10.5281/zenodo.23315083), which corrects and extends the text of this version and does not change any numerical result reported here. Appendix A7 drops the offer of data on request and names instead the public files and the join that reproduce the accuracy counts; three references were added (Gim et al. 2024; Geifman and El-Yaniv 2017; Guo et al. 2017); the 0.90 gate is stated as a cut on the small model's own confidence score, not a guarantee of 90 % correctness; the routing label set is stated to have no out-of-scope category; the correction of the small model's size to 322 million parameters now cites the publisher's model card; appendix A8 records the model reviews; and a new appendix A11 lists each change. No measurement or analysis was repeated, and the deposit of version 1.2 differs from this one only in the note file, the export script and EXPORT_MANIFEST.json. The files of this version remain unchanged and the record remains available under the same DOI. All versions: DOI 10.5281/zenodo.22922768.

View source

Similar papers

#small language model Dataset Open access Oct 2026

Socratic guiding questions in synthetic arithmetic data: matched LoRA runs (revision v2)

Supporting data, adapters, predictions and code for the article *Low-Cost LoRA Fine-Tuning of Small Language Models for Multi-Step Arithmetic Reasoning* by Jake O'Grady, Asena Isik Gürhan, Chee Fong Ting and Effirul Ramlan (University of Galway). We generated 20,000 GSM8K-derived arithmetic problems with step-by-step s...

O'Grady, Jake, Gürhan, Asena Isik, Chee, Fong Ting et al. · 465 citations
#computer vision Open access Jun 2016

Software Development in Startup Companies: The Greenfield Startup Model

The results are packaged in the Greenfield Startup Model (GSM), which explains the priority of startups to release the product as quickly as possible, and the need to shorten time-to-market, by speeding up the development through low-precision engineering activities.

Carmine Giardino, Nicolò Paternoster, M. Unterkalmsteiner et al. · 178 citations · ⚡14
#computer vision Open access Oct 2016

Software Startups - A Research Agenda

Software startup companies develop innovative, software-intensive products within limited timeframes and with few resources, searching for sustainable and scalable business models.

M. Unterkalmsteiner, P. Abrahamsson, Xiaofeng Wang et al. · 157 citations · ⚡17
#machine learning Review Open access Oct 2016

“Failures” to be celebrated: an analysis of major pivots of software startups

This study conducts a case survey study based on the secondary data of the major pivots happened in 49 software startups, and demonstrates that customer need pivot is the most common among all pivot types.

Sohaib Shahid Bajwa, Xiaofeng Wang, Anh Nguyen-Duc et al. · 127 citations · ⚡15
#computer vision Review Open access May 2015

A survey study on major technical barriers affecting the decision to adopt cloud services

The comparison of adopter and non-adopter sample reveals three potential adoption inhibitor, security, data privacy, and portability, which underlines the importance of the technical and security perspectives for research investigating the adoption of technology.

Nattakarn Phaphoom, Xiaofeng Wang, S. Samuel et al. · 111 citations · ⚡8
#computer vision Open access Feb 2018

Lean Internal Startups for Software Product Innovation in Large Companies: Enablers and Inhibitors

This study investigates how Lean internal startup facilitates software product innovation in large companies and identifies its enablers and inhibitors, and shows the potential of the method-in-action framework to investigate the Lean startup approach in non-startup context.

Henry Edison, Nina M. Smørsgård, Xiaofeng Wang et al. · 78 citations · ⚡6

Related blog posts

MIT News · Artificial Intelligence Oct 15, 2026

AI model decodes the language cells use to communicate

A new computational approach reveals how cells communicate to assemble into tissues. This could accelerate stem cell engineering, improve disease models, and inform therapies.

Microsoft Research Blog Oct 15, 2026

Proof-based general-purpose computing with Magnetar

Zero-knowledge proofs can verify computing results without rerunning workloads or exposing sensitive data. Magnetar helps bring them into the mainstream with support for standard programming languages, major speed gains, and quantum-resistant security. The post Proof-based general-purpose computing with Magnetar appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.