Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 32 additions & 8 deletions .cursor/rules/model-registry.mdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Backend-owned engine model catalogue (Ollama committed list + LM Studio and llama.cpp Hugging Face catalogs)
description: Backend-owned engine model catalogue (Ollama committed list + LM Studio, llama.cpp, vLLM and Colibri Hugging Face catalogs)
alwaysApply: true
---
<!--
Expand All @@ -14,7 +14,7 @@ SPDX-License-Identifier: Apache-2.0
It lives in the backend because both front ends need it: the desktop app's
Add Model modal and the terminal interface's model browser. There is **no
shared GGUF registry** — each enabled engine has exactly one curated source,
and only llama.cpp's can be searched.
and only llama.cpp's, vLLM's and Colibri's can be searched.
- **Ollama**: a **locked, committed list**, not a live scrape.
`services/nvpair-engine-manager/catalog/ollama-models.json` (wire shape
`{ scrapedAt, source, count, models: [...] }`) is compiled in with `go:embed`,
Expand Down Expand Up @@ -48,8 +48,31 @@ SPDX-License-Identifier: Apache-2.0
Face source; `engine:catalog` takes an optional `modelSource` (`huggingface`
or `modelscope`), and omitting it uses the answering node's saved selection,
so a client browsing for a peer must pass the peer's.
- The LM Studio list, the llama.cpp list, and each llama.cpp query share one
cache: 6-hour TTL, a coalescing guard so concurrent callers share one request,
- **vLLM**: a **live fetch** of the top 50 safetensors repositories for each
approved publisher (`Qwen`, `nvidia`, `mistralai`, `microsoft`, and
`ibm-granite`) across the text-generation and image-text-to-text pipelines.
It is **searchable** the same way llama.cpp is. Each result is the plain
`owner/repo` id, which `pull_model` (an `hf_pull`) brings into the Hugging
Face hub cache under vLLM's `models_dir`; vLLM then serves whatever the hub
cache holds rather than one process per downloaded model.
- **Colibri**: a **live fetch** of every open Hugging Face repository tagged
`colibri` (`filter=colibri&full=true`, top 200 by downloads). It is
**searchable** within the tag. Only repositories with a root `config.json`
are kept, only when the hub's parse of that `config.json` (`config=true`)
names a `model_type` the Colibri manifest's `model_types` lists, and the
ports' builds (tags `speedycolibri` and `peng`, or a `speedy-colibri` id)
and non-text-generation pipelines are dropped. Each
result is the `owner/repo` id, which `pull_model` (an `hf_snapshot`)
downloads whole into `~/colibri-models/<owner>/<repo>`. Ahead of the tagged
repositories come the models the Colibri manifest's `catalog` lists by
repository (Colibri v2.1.0's own `coli setup` list, with vendors' untagged
checkpoints such as DeepSeek V4 Flash and Kimi K3), each fetched for its live
downloads and date and dropped if it is now gated. The list lives in the
manifest, not in Go, and so do its download rules (pinned `revision`,
`exclude` patterns, `after_download` Python steps).
- The LM Studio list, the llama.cpp list, the vLLM list, the Colibri list, and
each search query share one cache: 6-hour TTL, a coalescing guard so
concurrent callers share one request,
and a failure backoff so a dead upstream is not re-dialled on every call.
- All sources normalize to `CatalogModel`, which the desktop maps to the shared
`EngineHubModel` (`desktop/src/shared/types/engine-api.ts`).
Expand All @@ -71,8 +94,8 @@ SPDX-License-Identifier: Apache-2.0
- The desktop relays through
`desktop/src/electron/service-bridge/model-catalog.ts`, which exposes
`getEngineHubModels(engineType, nodeId?, query?)` and `warmEngineHubs()`
(warms this device's LM Studio, llama.cpp and vLLM catalogs — Ollama needs
none). For a peer's llama.cpp, `getEngineHubModels` reads that peer's saved
(warms this device's LM Studio, llama.cpp, vLLM and Colibri catalogs — Ollama
needs none). For a peer's llama.cpp, `getEngineHubModels` reads that peer's saved
`modelSource` with `engine:get-settings` and passes it to `engine:catalog`;
this device's own node skips the read. A peer that does not report its source
is an error, never a fallback to this device's source. The `engine:search-hub`
Expand All @@ -84,8 +107,9 @@ SPDX-License-Identifier: Apache-2.0
- Both front ends fetch an engine's full catalog once (cached per-engine) and
filter **locally** as the user types. The desktop renderer
(`src/ui/components/ModelHub/`) sorts client-side by Updated / Name / Size;
for llama.cpp, Enter/Search sends an explicit query and merges the response
with matching listed rows. The terminal interface's browser sends `/` as a
for a source whose `engineHub.searchable` capability is set (llama.cpp, vLLM
and Colibri), Enter/Search sends an explicit query and merges the response with
matching listed rows. The terminal interface's browser sends `/` as a
query for a searchable source and shows its results. Pulling goes through the
engine manager (`engine:pull-model` → `pull_model`); the catalogue only
produces the pull-ready id.
2 changes: 1 addition & 1 deletion .cursor/rules/proxy-inference-routing.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ For model-bearing inference, each facade first filters a request-local discovery
snapshot to nodes whose per-engine inventory advertises the requested model.
Empty and non-matching inventories are ineligible; an empty owner set returns a
local `502` without contacting an engine. Ollama normalizes the implicit
`:latest` tag; LM Studio and llama.cpp IDs match exactly.
`:latest` tag; LM Studio, llama.cpp and Colibri IDs match exactly.

Within that eligible owner set, proxy target precedence is:

Expand Down
9 changes: 6 additions & 3 deletions .cursor/rules/system-architecture.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Compact scanner/manual GPU telemetry is internal to scheduling.

### Inference HTTP

Ollama, LM Studio, and llama.cpp proxies expose local client-compatible HTTP
Ollama, LM Studio, llama.cpp, and Colibri proxies expose local client-compatible HTTP
endpoints. Chat behaves as a local third-party client. Prompts, messages,
chunks, and response bodies must never be logged.

Expand Down Expand Up @@ -234,11 +234,14 @@ The model catalogue is owned by `nvpair-engine-manager` and served over
`engine:catalog`, so the desktop app and the terminal interface browse one
implementation. Electron relays it through
`src/electron/service-bridge/model-catalog.ts`. It provides curated Ollama,
LM Studio, and llama.cpp catalogs, filtered for the OS and CPU a model will
LM Studio, llama.cpp, and Colibri catalogs, filtered for the OS and CPU a model will
install on; model operations go through the engine manager. llama.cpp's is
populated from approved Hugging Face publishers and also answers a bounded
search across public publishers. Every llama.cpp result is an exact
`owner/repository:Q4_K_M` pull ID.
`owner/repository:Q4_K_M` pull ID. Colibri's is the models its manifest lists
by repository (Colibri's own `coli setup` list), then every open Hugging Face
repository tagged `colibri`, searchable within the tag, and every result is the
`owner/repository` id its snapshot download fetches whole.

Managed llama.cpp installation uses CUDA archives on Windows and Linux and
standard Metal-capable archives on macOS. Package choice is based on platform
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ one, and both report live GPU and memory use throughout.
| **Architectures** | x64 and arm64 on all three. Windows on ARM is experimental. |
| **Installers** | Windows `.exe`; Linux `.deb`; macOS `.dmg`. On other Linux distributions, [build from source](docs/building.mdx). |
| **Mixing nodes** | Windows, Linux, and macOS nodes can all be paired with each other |
| **Inference engines** | Ollama, LM Studio, llama.cpp, and vLLM (Linux with an NVIDIA GPU, or Apple Silicon macOS) |
| **Inference engines** | Ollama, LM Studio, llama.cpp, vLLM (Linux with an NVIDIA GPU, or Apple Silicon macOS), and Colibri |

**PAIR running on a machine does not mean an engine will.** PAIR itself runs on
any supported Windows, Linux, or macOS machine. Each engine sets its own requirements
Expand Down Expand Up @@ -100,7 +100,7 @@ you want by its full filename instead.
**Settings → Service** and read the status there.

- **Get an engine running.** On the node's card, open **Engine settings** and
select **Install** next to Ollama, LM Studio, llama.cpp, or (on Linux or Apple Silicon macOS) vLLM. PAIR downloads and
select **Install** next to Ollama, LM Studio, llama.cpp, Colibri, or (on Linux or Apple Silicon macOS) vLLM. PAIR downloads and
sets the engine up for you, so nothing needs to be in place beforehand.

![The Install engines dialog with Ollama downloading, reporting progress as it installs.](docs/assets/onboarding/engine-lifecycle/01-engine-installing.png)
Expand All @@ -110,7 +110,11 @@ you want by its full filename instead.
choice. llama.cpp populates this list from popular GGUF repositories on
Hugging Face. Type to filter the list, or press Enter to search the wider
public catalog. Its exact IDs include the repository and quantization, such
as `ggml-org/gemma-3-1b-it-GGUF:Q4_K_M`.
as `ggml-org/gemma-3-1b-it-GGUF:Q4_K_M`. Colibri lists the models of
Colibri's own setup list, DeepSeek V4 Flash and Kimi K3 among them, then the
Hugging Face repositories tagged `colibri`, searchable the same way; its models are whole
repositories of tens to hundreds of gigabytes, and its launcher needs Python
3.10 or newer.
When installing or turning on vLLM without a saved model, choose a downloaded
model in the picker or select **Add model**. Canceling the picker turns vLLM off.

Expand Down Expand Up @@ -153,7 +157,7 @@ The reply is ordinary OpenAI-shaped JSON, abbreviated here:
}
```

If you changed a port, or you are using LM Studio or llama.cpp rather than
If you changed a port, or you are using LM Studio, llama.cpp, vLLM, or Colibri rather than
Ollama, copy the URL from **Endpoints → API endpoints** instead of assuming the
one above. The copied URL includes `/v1`, ready for Hermes and other
OpenAI-compatible clients. Append `/chat/completions` for the request above.
Expand Down Expand Up @@ -201,7 +205,8 @@ Your data means settings, logs, cluster identity and certificates, and any engin
PAIR installed for you. An engine the uninstaller cannot remove — one still
holding a file open, say — is left in place rather than stopping the uninstall;
remove it with its own uninstaller. **Model weights are not touched** — they live in the
engine's own storage (`~/.ollama`, `~/.llamacpp`, `~/.lmstudio/models`, `~/.cache/huggingface`), so
engine's own storage (`~/.ollama`, `~/.llamacpp`, `~/.lmstudio/models`,
`~/.cache/huggingface`, `~/colibri-models`), so
removing PAIR does not delete the models you downloaded. Delete those through the
engine, or by removing its directory. An engine you installed yourself is also
left alone.
Expand Down Expand Up @@ -287,6 +292,7 @@ feedback and contributions will help shape priorities.

- [x] llama.cpp support.
- [x] vLLM support.
- [x] Colibri support (large mixture-of-experts models streamed from disk).
- [ ] EXO support.
- [ ] ComfyUI integration.
- [ ] Unsloth support.
Expand Down
23 changes: 19 additions & 4 deletions desktop/docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ The cancels, the remote pull, and `engine:pull-progress` carry the model in a
top-level `model` field, so every frame lands on the row it belongs to.
`engine:action{pull_model}` carries it in the engine's own `params` instead:
`name` for Ollama, since those params become its `/api/pull` request body, and
`model` for LM Studio, llama.cpp, and vLLM. The engine manager reads either
spelling.
`model` for LM Studio, llama.cpp, vLLM, and Colibri. The engine manager reads
either spelling.

Cancellation is a request, not a result. The engine manager stops the transfer
and lets its cleanup settle before answering, and the row clears when the
Expand Down Expand Up @@ -286,7 +286,8 @@ not select or pin proxy routes.
An NVPAIR-launched engine binds to loopback and is never directly LAN-reachable.
Peers reach it only through the node's proxy over a cluster-mTLS ingress, so
discovery advertises the promoted proxy port for `ol`/`lm` rather than the
engine's private port; llama.cpp uses the additional `lc` key and vLLM the `vl` key. Transport
engine's private port; llama.cpp uses the additional `lc` key, vLLM the `vl`
key, and Colibri the `co` key. Transport
security is backend-owned; Electron only
reflects the advertised proxy port and reads a remote engine's real port from
`engine:remote-get-installed` facts.
Expand Down Expand Up @@ -319,6 +320,19 @@ same method, so both front ends browse one implementation.
llama.cpp the desktop reads that peer's saved source with
`engine:get-settings` before each browse or search and passes it, as the
terminal interface does, so the list matches what the peer will download;
- vLLM models come from the most-downloaded safetensors repositories of each
approved publisher (`Qwen`, `nvidia`, `mistralai`, `microsoft`, and
`ibm-granite`) in the text-generation and image-text-to-text pipelines,
fetched, cached, and searched the same way. Each pull ID is the plain
`owner/repository` id, which the engine manager's `hf_pull` action brings into
the Hugging Face hub cache under `~/.cache/huggingface`;
- Colibri models come from the list in Colibri's engine manifest (Colibri's
own setup list, vendors' original checkpoints such as DeepSeek V4 Flash and
Kimi K3 among them), then every public Hugging Face repository tagged
`colibri` that has a root `config.json`, fetched and cached the same way and
searchable within the tag. Each pull ID is the `owner/repository` id, which
the engine manager's `hf_snapshot` action downloads whole into
`~/colibri-models`;
- the request takes an optional `platform` and `arch`, marks Apple-only (MLX)
rows, keeps them only for Apple Silicon, and echoes the target it filtered
for, so a client driving a peer is not offered models that peer cannot
Expand Down Expand Up @@ -460,7 +474,8 @@ deletes finish. Unpackaged (`electron-vite dev`) builds omit relaunch and the UI
tells the developer to run `npm start` again — quitting Electron tears down the Vite
renderer server, so auto-relaunch would come up with nothing to load.

The engines' model stores (`~/.ollama`, `~/.llamacpp`, `~/.lmstudio/models`, `~/.cache/huggingface`) and
The engines' model stores (`~/.ollama`, `~/.llamacpp`, `~/.lmstudio/models`,
`~/.cache/huggingface`, `~/colibri-models`) and
the application install tree are never removed. The reset does uninstall the
engines PAIR installed, through `engine:uninstall-managed` while the broker is
still running, so an engine a vendor installer placed in the user's home is
Expand Down
24 changes: 16 additions & 8 deletions desktop/docs/frontend-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,21 @@ They do not imply a WebSocket connection. Browser clients are not supported.
- `onSettingsDisconnected(callback)` reports that a node's settings authority
became unreachable, so its cached snapshot is stale.

`EngineType` currently includes `ollama`, `lm-studio`, `llama-cpp`, and `vllm`.
`EngineType` currently includes `ollama`, `lm-studio`, `llama-cpp`, `vllm`, and
`colibri`.
vLLM serves one model per process, so `unloadModel` (Eject) stops the engine,
which frees its GPU memory, and `loadModel` on a stopped engine starts it. Its model
list is the Hugging Face cache, which stays available while the engine is stopped, `deleteModel` removes a cached model (not the one
loaded in vLLM; deleting an ejected or stopped vLLM's model leaves it with no model
selected until `loadModel` picks one), `pullModel` downloads a Hugging Face repo into
that cache (no running engine needed), and `loadModel` on a cached model switches
the served model by restarting vLLM on it.
Colibri likewise serves one model per process, but it has no unload: its model
list is the `~/colibri-models` store that `pullModel` fills with whole
`owner/repository` snapshots, and `loadModel` switches the served model by
restarting the engine on it.
`searchHub(engineType, nodeId, query?)` serves Ollama's locked local catalog,
cached live Hugging Face catalogs for LM Studio and vLLM, and llama.cpp's
cached live Hugging Face catalogs for LM Studio, vLLM and Colibri, and llama.cpp's
catalog from the node's selected download source. For a peer's llama.cpp
it first reads that peer's saved model download source and lists that source,
Hugging Face or ModelScope, even when this device selected the other; a peer
Expand All @@ -137,10 +142,11 @@ rows and the backend's `searchable` flag, which controls whether the model hub
submits an upstream query or filters the populated list locally. An unavailable
catalog reports `searchable: null`, so an explicit query can retry after an
initial browse failure. A non-empty
llama.cpp or vLLM query performs an explicit bounded search: GGUF repositories
in the node's llama.cpp download source, or public Hugging Face safetensors chat
models for vLLM;
other calls return the populated engine catalog. llama.cpp pull
llama.cpp, vLLM or Colibri query performs an explicit bounded search: GGUF repositories
in the node's llama.cpp download source, public Hugging Face safetensors chat
models for vLLM, or repositories within the `colibri` tag;
other calls return the populated engine catalog. Colibri pull
IDs are `owner/repository` ids. llama.cpp pull
IDs are exact `owner/repository:quantization` values; load, unload, and delete
all use that same exact id.

Expand Down Expand Up @@ -259,8 +265,10 @@ Canceling.
- the node-local Inference Demo (`inferenceDemo.getState()` / `start()` / `stop()`
and the `demo:state` push). `start()` rejects if a demo is already running on
this node or if no Ollama, LM Studio, or llama.cpp proxy exposed a
text-generation model; callers show that as an ordinary error banner. Demo
state is not synchronized across nodes.
text-generation model; callers show that as an ordinary error banner. Colibri
is deliberately not driven by the demo, because a server that holds one model
per process cannot absorb its burst of concurrent agents. Demo state is not
synchronized across nodes.

`demo:state` is a main-to-renderer broadcast rather than a service push, so it is
typed in `IpcPushChannelMap` (`shared/types/ipc-channels.ts`) instead of the
Expand Down
7 changes: 4 additions & 3 deletions desktop/docs/services-backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,12 @@ reachability verdict of its own. Failed hardware collection leaves the last
accepted sample aging and never independently marks a node offline.

The model catalogue is backend-owned. `nvpair-engine-manager` serves the curated
Ollama, LM Studio, and llama.cpp lists over `engine:catalog`, filtered for the
Ollama, LM Studio, llama.cpp, and Colibri lists over `engine:catalog`, filtered for the
operating system and CPU a model will install on; Electron relays the call and
maps rows for the renderer, which then sends pull-ready model IDs back through
the engine manager. llama.cpp's source is also searchable: the relay passes the
model hub's query through, and the engine manager searches Hugging Face with it.
the engine manager. llama.cpp's and Colibri's sources are also searchable: the
relay passes the model hub's query through, and the engine manager searches
Hugging Face with it (GGUF repositories, or the `colibri` tag).
The Ollama reply is a single multi-megabyte frame, so every hop on its path
shares `jsonrpc.WorkerFrameBytes`.

Expand Down
Loading