Memon Labs

LuthorSQL, a System 1 model for databases

Private models that cut your LLM bill.

Memon Labs builds models that run on your own servers and answer the routine requests before they reach the LLM you pay for. LuthorSQL does it for database questions, and LuthorText for documents.

Fig. 1
in  Revenue by region last quarter?
Your serversLLM providerLuthorSQLYour LLM
Ask it

Pick a question and follow it. Then move the bar and ask again.

Answered on your servers70%
Sent on to the LLM30%
LLM calls avoided0

Estimated saving

$17,220a month, or $206,640 a year

A live sketch of the routing, not a benchmark. Ask it a question or drag the sliders. The scores on those questions are examples. A lower bar keeps more questions on your servers and risks more wrong answers, so we set it by measuring on your data.

  1. 01

    A question arrives.

    From your product, the same way it does today.

  2. 02

    LuthorSQL answers if it is sure.

    In under a second, on your own servers, with no API call.

  3. 03

    If it is not sure, your LLM answers.

    Hard questions go to the LLM you already use, as they do today.

LuthorSQL is not an LLM.

It is a System 1 model for databases. An LLM writes its answer one token at a time. LuthorSQL is a 7B model that reads the question once and fills in a typed query plan in a single pass. It runs its best candidates against your database, and a second adapter scores how sure it is. All of that takes under a second on one GPU.

The design was inspired by Jev, TypeSafe's System One model, which returns typed decisions with probabilities instead of text. TypeSafe on System One models →

One question, two ways

The questionWhich five customers spent the most in 2025?

LuthorSQL0.84 s

Fills the whole plan in one pass, in 125 milliseconds, then checks it.

  • showcustomers.name.98
  • showsum(orders.amount).97
  • filteryear(orders.order_date) = 2025.95
  • groupcustomers.id.98
  • ordersum(orders.amount) desc.96
  • limit5.99

It points at values and never writes one. A compiler writes the SQL.

30 candidate queries, run on your database

A second adapter scores each onebar 72%

94% sure. Answered on your servers. No API call.

An LLM2.54 s

Writes the query one token at a time.

SELECT c.name, SUM(o.amount) AS spent
FROM customers c
JOIN orders o ON o.customer_id = c.id
WHERE EXTRACT(YEAR FROM o.order_date) = 2025
GROUP BY c.id, c.name
ORDER BY spent DESC
LIMIT 5;

54 tokens, one after another. Same answer, and you pay for the call.

A sketch, not a recording. LuthorSQL's side plays at its measured pace on one H100. The plan takes 125 milliseconds and the checked answer 0.84 s at the median. The queries, the scores and the LLM's pace are examples.

Fig. 2 / Measured

Nearly half the questions never reached the big model.

102of 227
answered by LuthorSQL
33.3%
lower cost than Opus alone
95.15%vs 95.59%
accuracy, with and without

We registered this test before running it. LuthorSQL ran on one GPU in front of Claude Opus and answered only what it was sure about. Each dot is one of the 227 questions.

LuthorSQL, Memon et al., UC Irvine. Paper in preparation. Questions over databases published after the big model's training cutoff. Cost interval 26.5 to 39.1%. Accuracy difference not significant.

Fig. 3 / Privacy

What LuthorSQL answers never leaves.

  • It runs where your data already lives.

    Your cloud account, your own GPU, or a Mac Studio-class machine. LuthorSQL fits in about 9 GB.

  • What it answers makes no outside call.

    The request, the answer and the model stay inside your network.

  • The rest goes where it goes today.

    Only requests LuthorSQL is unsure about reach your LLM provider. No new vendor sees anything.

Your networkYour appLuthorSQLAnswerYour LLMonly what it is unsure about

Who builds it

One researcher, and the paper behind the numbers.

I'm Ibrahim Memon, an ML researcher at UC Irvine. LuthorSQL, a paper I lead with three co-authors, puts a 7B model in front of an LLM agent and measures what that saves. Through Memon Labs I build the same thing for companies.

The measured numbers on this page are from LuthorSQL. LuthorText applies the same idea to documents, and what it saves on your data is the first thing we would measure.

68.03%
on the BIRD hidden test set, scored by the BIRD team
0.84 s
per question on one H100 GPU
~9 GB
of memory with 8-bit weights, at the same accuracy
5
other SQL engines without retraining, within 3.1 points

The paper

LuthorSQL: A One-Pass Text-to-SQL Model as System 1 for a Slower LLM Agent

Memon et al. UC Irvine. In preparation. All four figures above are measured, not estimated.

$17,220 a month is worth 15 minutes.

That is our estimate for a $41,000 monthly LLM bill. Change the numbers. On the call we check it against your real traffic.

Book a 15-minute call

Not your call alone?

Show this to whoever signs off.