Distilled models for a faster, cheaper hybrid AI agent

A hybrid agent for what-if questions on tabular data that answers 3.8 to 4.8× faster and at half the cloud cost of an all-cloud agent, with the data rows kept on-premises.

My role
Co-author, with Sourish Dey (SumUp)
Period
2026
Status
Preprint, not peer reviewed
3.8 to 4.8×
lower latency
2.1×
lower cloud cost
0.98
tool-call accuracy

The problem

Agents that answer what-if questions on tabular data call a prediction model many times per answer. A tabular foundation model (TabPFN) takes 12.6 s per prediction on a CPU, too slow for a multi-step agent, and an agent that runs entirely on a cloud LLM sends sensitive data to an external API. The question was how much of the work can move on-premises without losing answer quality.

What came of it

  • 3.8 to 4.8× lower end-to-end latency than the full-LLM agent on a 50-query benchmark, on a CPU host, a GPU and an Apple M5 Pro.
  • 2.1× lower cloud token cost, because the cloud LLM is called once per query, for tool selection and parsing only.
  • Raw data rows never reach the cloud API: prediction runs on a distilled model and the answer is written by a local small language model.
  • The trade-off is stated: answer faithfulness 0.75 against 0.83 for the full-LLM agent, and tool-call accuracy 0.98 against 0.90.
Bar chart of mean cloud API cost per 1,000 queries: 0.0959 US dollars for the hybrid agent, which makes one LLM tool call and generates the answer with a local small model, against 0.2021 dollars for the full-LLM agent that runs only on the cloud LLM.Bar chart of mean cloud API cost per 1,000 queries: 0.0959 US dollars for the hybrid agent, which makes one LLM tool call and generates the answer with a local small model, against 0.2021 dollars for the full-LLM agent that runs only on the cloud LLM.
One schema-constrained cloud call per query halves the token bill.

What I did

  • Hybrid agent: a single cloud LLM call (gpt-4o-mini) picks the tool and parses the question; a model distilled from TabPFN makes the prediction and a local Qwen2.5-3B model writes the answer, both on-premises.
  • Distilled model: a 17,059-parameter MLP that keeps 95 to 100% of TabPFN's accuracy across six datasets, and carries almost all of the speed-up.

Details and full results in the preprint, arXiv:2609.16091 (Sourish Dey and Aditya Kumar, 2026), not peer reviewed.

Stack

  • Python
  • LangGraph
  • LangSmith
  • OpenAI function calling
  • Qwen2.5-3B-Instruct
  • PyTorch
  • TabPFN
  • knowledge distillation

I am looking for a role in AI for materials and processes. Write to me atcontact@aditya-kumar.de.

All projects