Download

The whole workbench is a folder of Python and a small React app. Clone or unzip it, install two requirement files, and run your first ask within the hour.

What you need

Python 3.10 or newer. A GPU helps but is not required: torch runs on CUDA, on DirectML for AMD and Intel on Windows, and on CPU for the small scratch model. Node.js 18+ if you want the browser workspace. About two gigabytes of disk for the tree and an index of a mid-sized corpus.

Install

pip install -r requirements.txt gives you torch, numpy and tokenizers, which is everything the scratch lane needs. The fine-tune lane will add a second file with transformers, peft, datasets and accelerate when it lands. Start the API with scripts/slm-web-api and the workspace with scripts/slm-frontend; open localhost on port 5173.

First run

slm index, then slm build-chunks, then slm train-new --model my-docs-v1 --max-iters 1500, then slm ask --model my-docs-v1 --question "What is this repo?" --answer-mode extractive. The answer comes with the paths and line ranges it was drawn from.

Where it lives in Leumas

The tree is shared/engines/slm/python in the Leumas monorepo, ported whole from the original repository. The Python is unchanged; the JavaScript around it is the contract this site and Studio use.