Manuscript Offprint

arXiv:2609.02760

Measurement-Driven Sub-Network Selection for On-Premise Retrieval-Augmented Factory Agents

Vasileios Rizeakos, Georgios Paisios, Alexandros Machairas, Michael Birbas, Athanasios Bachoumis

1st Vasileios Rizeakos

AI lab of enakronIC PC Aspasias 72, 15561, Cholargos, Greece 0000-0003-4475-6232

2nd Georgios Paisios

Electrical & Computer Engineering University of Patras Rio Campus, 26504, Patras, Greece 0009-0006-9713-3046

3rd Alexandros Machairas

AI lab of enakronIC PC Aspasias 72, 15561, Cholargos, Greece 0009-0009-7391-4659

4th Michael Birbas

Electrical & Computer Engineering University of Patras Rio Campus, 26504, Patras, Greece 0000-0002-6124-221X

5th Athanasios Bachoumis

AI lab of enakronIC PC Aspasias 72, 15561, Cholargos, Greece 0000-0003-3887-9789

Abstract—On-premise assistants can give factory workers conversational access to machine documentation, but models capable of the task rarely fit shop-floor hardware. We show that after structural compression and retrieval-grounded adaptation, model size is no longer a reliable predictor of adapted answer quality: general capability falls almost linearly with parameter count, while judged retrieval-augmented answer quality does not. We therefore treat deployment as a post-adaptation selection problem, committing one sub-network per device on judged answer quality and measured on-device throughput under a configurable general-capability floor and memory budget; rules that optimize size, speed, or quality alone each give up capability or throughput. A weight-shared supernetwork trained with sandwich-style in-place distillation keeps this selection inexpensive. In a manufacturing-manual case study, extraction costs 13.7% of the unpruned model's judged quality and retrieval-grounded distillation returns it to within 4.6%, recovering two thirds of the loss, and the same assistant runs across three heterogeneous edge tiers at 1.3 to 5 watts standby.

Index Terms—Large Language Models, Knowledge Distillation, Super-network, Model Compression, Retrieval-Augmented Generation, Edge AI, Smart Manufacturing

I. INTRODUCTION

Much of the knowledge a factory worker needs at the machine lives in technical documentation consulted under time pressure. Large Language Models (LLMs) offer a natural-language interface to this material, and frameworks exist for mapping LLM capabilities onto manufacturing tasks [2] and for intent-based agentic automation [3]. Both presuppose a capable model at the point of use, which on a shop floor is an industrial controller or an embedded box whose documents and camera feeds may not leave the premises.

The obstacle is capacity versus footprint, since models that answer technical questions reliably carry billions of parameters, while representative edge hardware offers two to eight gigabytes of memory. Cloud offloading reintroduces latency, recurring cost, and data-sovereignty concerns; training a small model per deployment is uneconomical; and structural pruning

alone deteriorates the general capability that reliable answering requires [6], [7].

Rather than treating the problem as a single compression step, this paper formulates it as a multi-stage pipeline. The approach combines a weight-shared supernetwork trained through sandwich-style in-place distillation, a hardware-aware selection stage that identifies and commits to the most suitable sub-network for each deployment target, and a retrieval-grounded distillation stage that further specializes the selected model using factory-specific documentation. Finally, the resulting model is integrated into a tool-augmented runtime for deployment and execution. Two empirical findings shape the design. First, cheap selection proxies are structurally uninformative on our candidate grids, where the natural quality proxy is perfectly rank-correlated with parameter count. Second, a general-capability floor turns out to matter, disqualifying on both grids the very sub-networks a quality-throughput blend would otherwise select. The central claim of this paper follows: application adaptation can reorder compressed candidates, so deployment-time selection must run after adaptation, on measured application quality and device throughput under a general-capability constraint.

Concretely, we ask whether a single weight-shared supernetwork can provide sub-networks whose application-specific Retrieval-Augmented Generation (RAG) quality remains competitive after structural compression (RQ1), whether hardware-measured selection under a general-capability constraint outperforms parameter-count or proxy-based selection (RQ2), and whether the resulting pipeline can support practical on-premise deployment across heterogeneous edge hardware (RQ3).

This paper makes the following contributions:

  • Measured, capability-constrained selection: our central contribution, a hardware-grounded three-stage procedure (Sec. III-D) that commits one sub-network per deployment target by blending judged RAG quality with mea-

sured on-device throughput under a configurable general-capability floor, kept inexpensive by weight sharing and a three-anchor throughput predictor.

  • Compression pipeline: A two-stage distillation pipeline for deployable LLMs: sandwich-style in-place distillation of a weight-shared supernetwork with importance-calibrated sampling [1], followed by retrieval-grounded distillation from the unpruned teacher into the extracted sub-network via low-rank adapters.

  • Case-study deployment and evaluation: A document-grounded, tool-augmented assistant instantiated the manufacturing-LLM framework of [2], measured across three edge tiers on judged quality, routing, latency, memory, and energy under one protocol.

References (22)