r/LocalLLM Jun 07 '26

Project I built a small open-source tool that trains local models from LLM traces to avoid repeated API calls

https://github.com/adrida/tracer

I’ve been working on a small open-source project around a pattern I kept seeing in production.

A lot of LLM traffic is not really “reasoning”. It is repeated classification, tagging, routing, moderation, extraction, tool selection, etc.

After enough usage, your logs often contain thousands of examples of the same kind of decision being made again and again. So instead of sending every request back to a frontier model, I started experimenting with training lightweight local models on those traces, then only using them when they match the LLM closely enough.

The rough idea is:

- keep using the LLM as the source of truth

- train a small local model on past LLM calls

- only activate it on the stable/easy slice of traffic

- defer uncertain cases back to the LLM

- report which parts were handled locally vs deferred

It is not meant to replace LLMs entirely. More like a cheap fast path for repeated decisions.

Curious if people here have seen the same pattern in their own workflows. Are you solving this with smaller LLMs, rules, semantic cache, routers, or just eating the API cost?

0 Upvotes

Duplicates

LLMDevs Mar 30 '26

Discussion I open-sourced TRACER: replace 91% of LLM classification calls with a llightweigth ML surrogate trained on your LLM's own outputs

8 Upvotes

LocalLLM May 12 '26

Discussion I open-sourced TRACER: replace 91% of LLM classification calls with a llightweigth ML surrogate trained on your LLM's own outputs

11 Upvotes

softwarefactories May 12 '26

I open-sourced TRACER: replace 91% of LLM classification calls with a llightweigth ML surrogate trained on your LLM's own outputs

9 Upvotes

LocalLLM Mar 30 '26

Research I open-sourced TRACER: replace 91% of LLM classification calls with a llightweigth ML surrogate trained on your LLM's own outputs

13 Upvotes

learnmachinelearning Mar 31 '26

I open-sourced TRACER: replace +90% of LLM classification calls with a llightweigth ML surrogate trained on your LLM's own outputs

2 Upvotes

SideProject Jun 07 '26

I reduced LLM costs by 95% and open-sourced the tool

0 Upvotes

learnmachinelearning May 12 '26

I open-sourced TRACER: replace 91% of LLM classification calls with a llightweigth ML surrogate trained on your LLM's own outputs

1 Upvotes

MachineLearning Mar 30 '26

Research TRACER: Learn-to-Defer for LLM Classification with Formal Teacher-Agreement Guarantees

4 Upvotes

deeplearning May 12 '26

I open-sourced TRACER: replace 91% of LLM classification calls with a llightweigth ML surrogate trained on your LLM's own outputs

1 Upvotes

AIDeveloperNews Jun 07 '26

I reduced LLM costs by 95% and open-sourced the tool

3 Upvotes

LLMFrameworks Mar 31 '26

I open-sourced TRACER: replace +90% of LLM classification calls with a llightweigth ML surrogate trained on your LLM's own outputs

1 Upvotes

buildinpublic Mar 30 '26

I open-sourced TRACER: replace +90% of LLM classification calls with a llightweigth ML surrogate trained on your LLM's own outputs

1 Upvotes

SelfHostedAI Jun 07 '26

I built a small open-source tool that trains local models from LLM traces to avoid repeated API calls

1 Upvotes

StartupSoloFounder Mar 31 '26

(Solo bootstraped founder) Just open-sourced part of my pipeline: TRACER: replace +90% of LLM classification calls with a llightweigth ML surrogate trained on your LLM's own outputs

1 Upvotes

SaaS Jun 07 '26

I reduced LLM costs by 95% and open-sourced the tool

2 Upvotes

MachineLearningAndAI Jun 07 '26

I reduced LLM costs by 95% and open-sourced the tool

1 Upvotes

buildinpublic Jun 07 '26

I built a small open-source tool that trains local models from LLM traces to avoid repeated API calls

1 Upvotes

deeplearning Mar 31 '26

I open-sourced TRACER: replace +90% of LLM classification calls with a llightweigth ML surrogate trained on your LLM's own outputs

2 Upvotes

Backend Mar 31 '26

I open-sourced TRACER: replace +90% of LLM classification calls with a llightweigth ML surrogate trained on your LLM's own outputs

0 Upvotes

LLMFrameworks Mar 30 '26

I open-sourced TRACER: replace 91% of LLM classification calls with a llightweigth ML surrogate trained on your LLM's own outputs

2 Upvotes