← All models · Qwen3-Embedding 0.6B

Multi-model · embeddings + text-generation · WebAssembly (CPU)

On-device RAG: Qwen3-Embedding retrieves, Qwen2.5 answers

Two models, one pipeline, zero server. Qwen3-Embedding turns your knowledge base into instructed vectors and finds the passages closest to the question; Qwen2.5-0.5B then answers only from those passages and cites them. This is retrieval-augmented generation — the pattern behind most "chat with your docs" products — running entirely on the CPU.

Run it

Two models load independently on the CPU: the embedder is ~585 MB, Qwen is ~530 MB. First load downloads both; after that they auto-init from cache.

Retriever · Qwen3-Embedding 0.6B

Generator · Qwen2.5-0.5B

Retrieved passages (Qwen3-Embedding · cosine similarity)

The top passages the embedder selects will appear here.

Grounded answer (Qwen2.5)

Qwen's answer, built only from the retrieved passages, streams here.

How the pipeline works

  1. Embed — the question is wrapped in Qwen3-Embedding's retrieval instruction and mapped to a 1024-d vector; each passage is embedded raw.
  2. Retrieve — cosine similarity ranks the passages; the top 2 are kept.
  3. Generate — the retrieved passages become Qwen2.5's context with an instruction to answer only from them and say "I don't know" otherwise — the guard against hallucination.

Change a passage and the retrieval changes; ask something not covered and a good RAG answer declines. Everything — both models, the vectors, the similarity — runs on your device.