Skip to main content

Rigma

CI PyPI Python License: Apache 2.0

Local LLM deployment that tunes itself to your machine — a chat UI, an OpenAI-compatible endpoint, and an agent that can use tools.

Rigma probes your GPU and RAM, works out the model, quant and flags your hardware can actually hold, downloads a pinned llama.cpp build, and serves it.

Unlike generic runners, Rigma applies the tuning that actually matters per machine: MoE expert offload (--n-cpu-moe) sized to your RAM, architecture-aware KV-cache policies (e.g. q8_0 K-cache floor on DeltaNet-family models), backend selection per GPU generation (e.g. Vulkan over ROCm on RDNA4), flash attention, and session persistence (--slot-save-path) on by default. Every decision is auditable: rigma plan --explain shows the arithmetic and sources.

Quickstart (pre-alpha)

pip install rigma
rigma up                       # opens the chat UI; add a model from the Models page
rigma up --model <slug>        # probe, resolve, download that model, and serve it

A browser tab opens either way, and any OpenAI-compatible tool can use http://127.0.0.1:11500/v1 once a model is loaded. With no --model, up starts the UI without probing or downloading anything — a fresh install lands on an empty Models page, where picking a model runs the same probe-resolve-download path.

Chats persist server-side across restarts — the browser UI lists past sessions in a rail, renders markdown with fenced code, and supports regenerate. Each session carries its own system prompt (the registry ships sensible defaults per use case — general, creative, coding — so creative-writing models stay in character from the first message) and a per-session "use my documents" RAG toggle; retrieved sources appear inside the search_my_documents step in the transcript. A copy button and edit-last live in the legacy UI at /rizz.

Commands

Command What it does
rigma up Start everything; opens the chat UI in your browser
rigma chat Chat with the running model in the terminal; --session <id> resumes a session started in the browser UI
rigma status What's running, where
rigma stop Stop the model server and UI
rigma models What fits your machine
rigma plan --explain What plan would choose, and why. When a community combo matches your hardware it reports the match and its source rather than re-deriving the fit; rigma up --dry-run is the accurate preview of a launch, since it also applies a model's pinned defaults
rigma doctor What Rigma detects on this machine
rigma update Pull the latest community combo registry
rigma bench Measure real speed; --evidence FILE exports registry-format proof
rigma rag add PATH Index a folder into your local knowledge base (Raggity sidecar)
rigma rag ask "..." Answer grounded in your documents, naming the sources it used, via your tuned model

rigma up flags: --model SLUG · --use-case coding · --port 11500 · --no-browser · --ctx N · --reasoning on|off|auto · --reasoning-budget N · --fa on|off|auto · --spec none|draft-mtp|… · --detach · --no-calibrate · --yes · --dry-run

Status

Pre-alpha (M5). rigma bench records machine-local calibration that outranks registry combos on your machine, and a failed launch automatically falls back (smaller quant → CPU floor) with each step explained. Combos come in two grades: verified (benchmarked on real hardware, evidence attached) and provisional (research-seeded fit math — run one and PR your numbers to rigma-registry). Verified so far:

Hardware Model Backend Result
RX 9070 XT 16GB + 16GB RAM tier (Windows) Qwen3.6-35B-A3B UD-Q3_K_XL, ctx 32K, n_cpu_moe 10 Vulkan (llama.cpp b9867) verified 2026-07-06: 57.1 t/s gen, 689 t/s prefill @ 4K prompt

The 9070 XT combos are keyed to the ram-16 tier. A machine with more RAM and no combo of its own falls back to the nearest lower tier, and rigma plan --explain names the tier it used — the reference box measures 31.4 GB (tier 32) and takes the ram-16 combo above.

Methods (set a chat up for the work, then automate it)

A Method configures a whole activity in one click — system prompt, sampler profile, thinking effort, tool posture and a Notes template — and then goes further: it carries rules, macros and workflows you can author yourself.

Six ship built in: Coding, Writing a book, Roleplay, Research, Learning, Organizing files.

  • Macro — a button above the message box. Finish chapter summarises the chapter into your story bible and opens the next one.
  • Rule — either standing guidance folded into the system prompt, or a trigger that fires on its own (after a chapter file changes, remind me to update the bible).
  • Workflow — a named multi-step sequence.

All three are the same thing underneath: a step list. A step is one of tool, prompt, settings, note or new_chat, and steps can carry placeholders — {{var}}, {{last_reply}}, {{step:0}}, {{ask:Label}}, {{transcript}}, {{title_next}}, {{selection}}.

Make your own: hit + Create method in the Methods panel. That opens a chat where the model has only the method-building tools, so it can do nothing but help you build one — it asks a question, calls a tool, and the method takes shape beside the chat as it goes. Hit Save method when you like it.

Safety. A macro that only reads runs straight away. Anything that writes, moves, runs a command, or lets the model loose with its tools asks first, with a one-line preview naming the real files — Finish chapter: will run write_file on story_bible.md. Choose Always allow and it stops asking for that macro. That choice is stored on your machine and is never part of a shared method.

Sharing. A method is a JSON file in Rigma's home — ~/.rigma/methods/ (%USERPROFILE%\.rigma\methods\ on Windows). Export it, send it, import theirs. Importing never overwrites one of yours and never carries someone else's "always allow".

Skills (instructions you pull in mid-chat)

A Skill is a block of instructions you write once and drop into any chat by typing /name — no method to apply, no settings to change. Where a Method configures a whole activity, a Skill is a single reusable briefing: house style, a checklist, the shape of a file format you keep explaining.

/wildcard write me three variants

The skill's text goes in front of your ask for that turn only. Manage them in the Skills panel, or write them by hand: each one is a .md file in ~/.rigma/skills/ (%USERPROFILE%\.rigma\skills\ on Windows), so they live in your editor and your git repo like anything else. /skill:name works too, and a message that merely starts with a slash and names no skill — a path, a lone / — is sent exactly as you typed it.

In the chat

  • Type ahead. Send a follow-up while a reply is still streaming and it queues; the model starts on it the moment the current turn ends. The queue is in memory, so it never survives a restart — a prompt waiting behind a generation stops meaning anything once the server is gone.
  • Stop keeps what you got. Stopping a reply aborts the request and keeps the text already on screen, marked as a partial, instead of discarding it.

RAG (chat with your documents)

Rigma pairs with Raggity (AGPL-3.0, runs as a separate low-RAM process — ~300 MB) for grounded, cited answers from your own files through your tuned local model: pip install raggity[server], then rigma rag add <folder> and rigma rag ask "...". If raggity isn't on PATH, point RIGMA_RAGGITY_CMD at it.

Working on Rigma

git config core.hooksPath .githooks

One hook, and it matters: src/rigma/data/ui_v2/ is a built artifact that is committed, because the wheel ships it and an end user's machine never runs Node. Changing frontend-v2/src/ without npm run build therefore releases the old interface — and nothing else catches it, since pytest doesn't know the bundle exists and vitest tests the source. The hook refuses that commit and tells you what to run.

Running the tests

python -m pytest                  # everything except the hardware tests
python -m pytest -m hardware      # the opt-in live ones: a real GPU, real DSH turns

pyproject.toml puts src on sys.path (pythonpath) and excludes the hardware marker by default (addopts), so a fresh clone can run the suite without pip install -e ., and bare pytest means the same set CI runs. Two things are worth knowing:

  • A subprocess does not inherit that. pythonpath is a pytest setting; a test that spawns sys.executable gets a fresh interpreter, which resolves rigma from site-packages if an older copy is installed there. CI installs editable (pip install -e .[dev]), so it cannot bite there; locally, pip install -e . is what makes those tests exercise the tree you are editing. The symptom when it bites: a subprocess test fails with ModuleNotFoundError for a module that plainly exists, or behaves like an older release.
  • The hardware tests do real work — they drive DSH turns against a fake engine and need a GPU/model for others — which is why they are opt-in. pytest tests/test_harness_dsh_live.py -m hardware runs just the DSH ones.

License: Apache-2.0.

Metadata

Release files for rigma 0.12.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rigma 0.12.2
File Size Uploaded Provenance Actions
rigma-0.12.2.tar.gz 2.3 MB With provenance Details for rigma-0.12.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rigma 0.12.2
File Interpreter ABI Platform Actions
rigma-0.12.2-py3-none-any.whl Python 3 none any Details for rigma-0.12.2-py3-none-any.whl

Total release size: 3.3 MB

Release files / rigma-0.12.2.tar.gz

Download URL rigma-0.12.2.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
435ce1234ab0a1d4670d5be87bc443bfb828cb0f34034df83af9402a57ddacd9
BLAKE2b-256 checksum
How to use checksums
5688d7166406abda6d6272dd5b3161e94640b3c42ee25890fd7460004989c243
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release files / rigma-0.12.2-py3-none-any.whl

Download URL rigma-0.12.2-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
351404cc951566391df9b0ea369f9d99e3595a3dab469aa7f48f7ce1b5dd71f4
BLAKE2b-256 checksum
How to use checksums
6c889f4706c8337ea702d6bcd26e5ce32ba82f2712582ccf31d767260eb9c37a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Security for rigma 0.12.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rigma-0.12.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page