← MobileLLM-R1 360M

Multi-model · embeddings + text-generation · on-device

Grounded reasoning: MiniLM retrieves, MobileLLM-R1 reasons

Two models, one pipeline, zero server. all-MiniLM-L6-v2 turns a small knowledge base into vectors and finds the facts closest to your question; MobileLLM-R1 then reasons over only those facts — showing its working — instead of guessing from memory. This is retrieval-augmented generation with a reasoning model in the generator seat, entirely on-device.

Run it

Two models load independently: MiniLM is ~23 MB, MobileLLM-R1 ~676 MB (q4, cached after first load).

Retriever · all-MiniLM-L6-v2

Reasoner · MobileLLM-R1-360M

Retrieved facts (MiniLM · cosine similarity)

The top facts MiniLM selects will appear here.

Grounded reasoning (MobileLLM-R1)

R1's step-by-step answer, built from only the retrieved facts, streams here.

How the pipeline works

  1. Embed — MiniLM (feature-extraction, mean-pooled + normalised) maps each fact and the question to a 384-dim vector.
  2. Retrieve — cosine similarity ranks the facts; the top 3 are kept.
  3. Reason — the retrieved facts become R1's context with an instruction to reason step by step using only them, and to say so if they're insufficient — the guard against hallucination.

Change a fact and the retrieval changes; ask something the facts don't cover and a good grounded model declines. Everything — both models, the vectors, the similarity — runs on your device.