In fifteen minutes you will run two models on your own machine: a small language model that answers a question, and an OCR model that reads an image. Nothing you send leaves the computer, and there is no key to paste. This is the smallest possible QVAC program. Every project on this site grows from the same four calls: loadModel, an inference call, unloadModel, and close.

What you need

  • Node.js 22.17 or newer and npm
  • A recent Mac with Apple Silicon, or another machine QVAC supports
  • Internet for the first run only, to download the model files

1. Create the project

We pin the version so this lesson keeps working when the SDK moves on.

2. Ask a local model a question

Create chat.mjs:
chat.mjs
Run it twice:
The first run downloads the model, so it is slow. The second reuses the cached file and starts much faster. That difference is the lifecycle from AI is not one box: downloaded is not loaded.
Turn off Wi-Fi and run it a third time. It still answers.

3. Read text from an image

Save any screenshot with text in it as sample.png, then create read.mjs:
read.mjs
Each block carries the recognised text, where it sits in the image, and a confidence score. Compare a few of them with the image. Some will be imperfect, and that is the point: model output is evidence, and your application decides what to do with it.

What just happened

The finally block matters. A model left loaded keeps its memory until the process exits.

Where to go next

Build Redact

Turn this OCR call into a complete, reviewed redaction workflow.

Inside Leash

See what a full local assistant on QVAC looks like.