Installation¶
pip install solvi # core: numpy, scipy, pydantic (imported only for typed parts and serialization)
pip install "solvi[model]" # + torch, transformers, for the ModernBERT extractors (solvi.extract_*) and the decider
pip install "solvi[onnx]" # + onnxruntime, tokenizers: the decider (solvi.core.deciders) on CPU without torch
# and LongSpanExtractor's prediction (backend="onnx"); training needs [model]
pip install "solvi[serve]" # + fastapi, uvicorn: solvi serve over HTTP
pip install "solvi[mcp]" # + the official MCP SDK for solvi serve --mcp (without it, a built-in stdio server is used)
pip install "solvi[duckdb]" # + duckdb: stored decisions in a DuckDB file; "solvi[postgres]" for PostgreSQL
pip install "solvi[lora]" # + torch, transformers, peft>=0.19: solvi.experimental.lora.adapt_lora, a LoRA adapter per question (experimental)
pip install "solvi[smt]" # + z3-solver: narrows / widens proved over a rule's text (solvi.experimental.changes, Consistency(prove=True))
On x86_64 macOS (Intel), whose last torch is 2.2.2, see the LoRA page for a
working set (torch 2.2.2, numpy<2, transformers 4.48, peft 0.19) and SOLVI_NO_COMPILE=1, which loads the torch
decider without torch.compile.
For development, from a clone: uv sync, then uv run pytest.