omni-local-llm
Which local model can your machine actually run?
Find out in one command, download the right file, and serve every local LLM behind one OpenAI-compatible API.
Try it (no install)
# Which quant of this model fits my GPU, and how many layers go on it?
uvx omni-local-llm fit unsloth/Qwen3-8B-GGUF
# Download the recommendation and save it as an alias
uvx omni-local-llm fit unsloth/Qwen3-8B-GGUF --pull --save-alias qwen3
Then run it with the llama.cpp backend (llama-cpp-python compiles on first install):
pip install "omni-local-llm[llama-cpp]"
omnillm chat --model qwen3
uvx comes with uv. pipx run omni-local-llm … works too.
What it does
1. fit: the right file for your hardware
Pass a Hugging Face repo, an installed Ollama model, or a .gguf file. fit reads the model's real architecture and file sizes (GGUF headers via HTTP range requests, so no download) and checks every quantization against your RAM and GPU:
- KV cache from the real shape, so grouped-query attention, MLA and
--kv-cache q8_0are accounted for - Where it runs: fully on GPU, Apple Silicon unified memory, split GPU + CPU with a concrete
n_gpu_layers, CPU only, or not at all - MoE aware: total vs. active parameters, with tips for keeping experts on CPU
--pulland--save-alias: download the recommended quant and get a ready-to-run alias
2. One API for every local server
Ollama, in-process llama.cpp, and any OpenAI-compatible server (vLLM, llama.cpp's llama-server, LM Studio, SGLang, KoboldCpp, MLX-LM, LocalAI) behind one interface. Name models once in omnillm.toml, and fall back automatically when a server is down:
[backends.lmstudio]
type = "openai"
base_url = "http://localhost:1234/v1"
[models.coder]
backend = "llama.cpp"
model = "unsloth/Qwen2.5-Coder-7B-Instruct-GGUF"
filename = "Qwen2.5-Coder-7B-Instruct-Q4_K_M.gguf"
n_ctx = 8192
fallbacks = ["lmstudio/qwen2.5-coder-7b-instruct", "ollama/llama3.2:3b"]
omnillm serve then gives every tool you use one OpenAI-compatible endpoint, where "model": "coder" just works.
→ Backends & config · API server
3. A Python SDK for the fiddly parts
from pydantic import BaseModel
from omnillm import LocalLLMManager, tool
manager = LocalLLMManager.from_config() # reads omnillm.toml
class City(BaseModel):
name: str
country: str
city = manager.chat(model="coder", messages=[{"role": "user", "content": "Lyon is in France."}],
response_model=City).parsed # schema enforced at the sampler
@tool
def get_weather(city: str) -> dict:
"""Get the current weather for a city."""
return {"city": city, "temp_c": 21}
session = manager.create_session(model="coder")
print(session.act("What's the weather in Oslo?", tools=[get_weather]).content) # runs the tool loop
Also streaming (sync and async), chat sessions with context-window pruning, vision inputs, and embeddings.
→ SDK docs
4. Benchmarks and evals on your machine
omnillm bench --targets coder,ollama/llama3.2:3b # time to first token, tokens/sec
omnillm eval --model coder --suite my_tests.jsonl # regex, JSON-schema and tool-call checks
omnillm eval --model coder --needle # needle-in-a-haystack retrieval
How is this different from…?
- Ollama / LM Studio / llama.cpp: they run models. omnillm works with them, choosing the right file, putting several servers behind one API with fallbacks, and adding SDK features on top. It doesn't replace them.
- LiteLLM: a gateway for 100+ (mostly cloud) providers. omnillm is local-first: it knows your hardware and GGUF files, can download and run models in-process, and enforces structured output with grammars. If you mostly route between cloud APIs, use LiteLLM.
- "Can I run it?" calculators: they estimate from parameter counts.
fitreads the actual files and headers of the repo you name, accounts for your free VRAM, and downloads the file it recommends.
Install
pip install "omni-local-llm[ollama,server]" # or: uv pip install ...
| Extra | Adds |
|---|---|
ollama |
Ollama backend |
llama-cpp |
In-process llama.cpp backend and fit --pull (Hugging Face downloads) |
openai |
OpenAI-compatible servers (just httpx) |
server |
omnillm serve (FastAPI) |
all |
Everything |
The core package depends only on httpx, and fit works without any extras. Requires Python 3.12+.
Documentation
| Hardware fit | Sources, KV cache, placement, --pull, --save-alias, SDK |
| Backends & config | OpenAI-compatible servers, omnillm.toml, aliases, fallbacks |
| Python SDK | Chat, sessions, streaming, tools, structured outputs, embeddings, vision |
| CLI | chat, run, models, bench, eval, serve, fit |
| API server | OpenAI SDK and curl usage, errors, host check |
| Benchmarks & evals | BenchmarkHarness, EvalHarness, NeedleHarness |
| Architecture | Module map, running tests |
Roadmap
-
omnillm pick: rank the models that fit your machine on your own prompts (quality vs. speed vs. memory) - Server API keys, and turning off model downloads for HTTP requests
- AMD ROCm / Intel GPU detection in
fit - Docker image for the API server
- A web version of
fit
Ideas and bug reports are very welcome: open an issue.
Contributing
See the Contributing Guide for setup, adding backend adapters, and submitting pull requests.
License
MIT. See LICENSE.
Metadata
Release files for omni-local-llm 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| omni_local_llm-0.5.0.tar.gz | 464.8 kB | With provenance | Details for omni_local_llm-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| omni_local_llm-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for omni_local_llm-0.5.0-py3-none-any.whl |
Total release size: 547.3 kB
Release files / omni_local_llm-0.5.0.tar.gz
| Download URL | omni_local_llm-0.5.0.tar.gz |
|---|---|
| Size | 464.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7026016e741fd7314edc8ca2d03becb4ca4d374033f37dae1fea14b039b7a85c
|
|
BLAKE2b-256 checksum How to use checksums |
d29105b955a5654d79a19eb1e412f045e94e330279c68eba082b46f813d3f300
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 22, 2026.
Transparency logRelease files / omni_local_llm-0.5.0-py3-none-any.whl
| Download URL | omni_local_llm-0.5.0-py3-none-any.whl |
|---|---|
| Size | 82.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba533f3a8f7be66a459b3d55239390908b56bb016bbe59882bce73c506027f06
|
|
BLAKE2b-256 checksum How to use checksums |
ccbaa0ed377c5c1a149270d00b144ecd8482daae040c595579821c7ef9581f7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 22, 2026.
Transparency logSecurity for omni-local-llm 0.5.0
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
Both files in this release have been uploaded with provenance metadata.
Attestation for omni_local_llm-0.5.0.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 Nov 22, 2026.
Transparency logA 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.