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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ llama-cpp-versions/
ollama-versions/
onnx-runtime-versions/
torch-versions/
basalt-versions/
.active-version-basalt


#misc
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ On Windows, use `launcher.ps1` with the same flags. For a release build, use `--

Your library root contains `launcher-data/` and `shared-resources/`; models live in `shared-resources/models/`. Set `PUMAS_LAUNCHER_ROOT` to choose a root. Read [the upgrade guide](docs/library-upgrade.md) before opening an older library.

## Serve a Basalt model

For Linux x64 with an NVIDIA Blackwell GPU, see [Managed Basalt setup](docs/runtimes/basalt.md) for installing the runtime, importing Inkling 2 Mini, and setting per-model generation defaults.

## Run just the backend

Use Rust 1.92.0, CMake and your platform's C/C++ build tools. No Node, frontend assets or Electron are needed:
Expand Down
14 changes: 12 additions & 2 deletions docs/contracts/model-operations-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ the same serving identity again before handing work to a provider.
The implemented capabilities are `chat_generation`, `text_generation`,
`text_embedding`, `image_generation`, `image_to_text`, `multimodal_embedding`,
`decision` and `rerank`. Vision-language models (`image-text-to-text`) offer chat,
text generation and image-to-text. Non-text input needs a llama.cpp session
(dedicated or router) with the model's projector loaded. A model with no
text generation and image-to-text where the provider supports each operation.
Non-text input for llama.cpp needs an active session (dedicated or router)
with the model's projector loaded. Basalt provides chat and reports whether
the loaded pack supports image input. A model with no
recorded task is described by its runtime: when llama.cpp publishes the
model's architecture and it declares text output, the model offers chat and
text generation, and image-to-text if it declares image input.
Expand Down Expand Up @@ -287,6 +289,10 @@ checks a single text choice, embedding count/index/dimension coherence, and
rejects incoherent provider results. Provider envelopes and internal errors are
not exposed.

For Basalt, a normal stop or token-limit finish without visible answer text
returns an empty `text` string with the reported finish reason. The typed
response omits reasoning.

Errors follow [Errors](#errors). A request ID is never forwarded as a provider
idempotency key, and generation is never replayed.

Expand Down Expand Up @@ -532,3 +538,7 @@ ready. Every Torch runtime resolves the audio packages with the other general
modalities (current releases, Transformers 5.4 or newer where its Torch allows)
and loads the model from local files only, without repository code. Its
install probe reports Cohere ASR unavailable, with the reason, when it cannot.

## Basalt generation defaults

A loaded Basalt profile advertises chat generation and the modalities its owned session reports. Set per-model defaults through the model inference settings JSON-RPC methods. For a single operation, `options.kind` is `text_generation`. Alongside `temperature`, `top_p`, and `max_tokens`, the optional `sampling` object accepts `reasoning_effort`, `top_k`, `min_p`, `repetition_penalty`, `presence_penalty`, `frequency_penalty`, and `seed`. Pumas rejects sampling objects for providers that have not enabled these settings. Explicit values override saved settings. See [Managed Basalt](../runtimes/basalt.md).
10 changes: 10 additions & 0 deletions docs/plans/basalt-runtime/execution-ledger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Basalt runtime execution ledger

- 2026-11-23. Created `feat/basalt-runtime` from `origin/main` at `b5f31c5ce`. GitHub v0.5.6 assets and publisher digests are reachable. Basalt source documents the v2 pack and owned readiness fields. The RTX 5090 Laptop reports CUDA compute capability 12.0 and driver 595.84. Started acquiring the DQ8 pack for real verification.
- 2026-11-23. Pumas installed v0.5.6 in an isolated library and verified the server's Python environment. The engine's GPU planner selected the RTX 5090 Laptop. With CUDA devices hidden, the engine refused the launch plan. Pumas began the pinned-revision Hugging Face download of the DQ8 pack in that library.
- 2026-11-23. The Electron app imported an authored v2 pack through its backend. The Ctrl+click dialog saved Thinking Level and Maximum Output Tokens through the desktop bridge. The model's metadata contained the selected values.
- 2026-11-23. The RPC suite passed 489 tests. The library suite passed 2,202 tests and the app manager passed 363 tests. The frontend suite passed 1,044 tests with one skip. Frontend type checking, frontend and Electron builds, desktop contract generation, Clippy, and the release gate tests passed.
- 2026-11-23. Pumas listed the DQ8 and MX8 downloads independently. A managed profile pinned v0.5.6. With CUDA devices hidden, the Pumas serving endpoint returned `device_unavailable` and published no loaded model. Builds without Basalt and without inference plugins passed compilation.
- 2026-11-23. Pumas published the DQ8 pack from revision `3d27b47c40f290ecfbf3ae70265bddb65c2635c1` and reported a valid Basalt artifact. Its 19,734,300,551 bytes matched publisher SHA-256 `f7b4e5f8e17681c4735a7dfc51ffd8e805c44184fad4e1778b13187d79dc3787`.
- 2026-11-23. Basalt v0.5.6 loaded the real pack on an RTX 5090 Laptop GPU with an 8,192-token context. A saved one-token limit capped chat generation at one token. An explicit override returned a complete 53-token generation from the same prompt. The typed operation returned a correlated `length` result under the saved limit and a `stop` result under the override. It also identified a red test image and published completed answer-text SSE events.
- 2026-11-23. Reconstruction Workbench's existing client discovered the served Basalt profile, retained the Pumas owner, and returned `READY` through its usual typed request. Pumas unloaded the profile, removed its serving entry, and ended the engine process. The model loaded again under the desktop backend.
5 changes: 5 additions & 0 deletions docs/plans/basalt-runtime/issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Basalt runtime issues

- **Live GPU availability**. The compatible GPU was occupied during implementation. The separate workload had stopped by the time verification began. Live verification used the available GPU and confirmed that unloading Basalt released its memory.
- **Model acquisition**. Pumas downloaded the 19.7 GB DQ8 pack and published it after validation. The file matched the publisher digest.
- **Reasoning-only output**. Basalt can use the entire output limit before emitting answer text, and it sends reasoning events separately in streams. The finite typed operation preserves the truncation result, and the stream publishes answer text and completion without forwarding reasoning chunks. Both paths passed with the real pack.
41 changes: 41 additions & 0 deletions docs/plans/basalt-runtime/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Managed Basalt runtime and inference defaults

- **Status** Accepted
- **Acceptance** Satisfied
- **Delivery** Pull request to `main`

## Objective

Install Basalt through Pumas's GitHub runtime installer, serve an Inkling 2 Mini pack through a managed runtime profile, and set compatible generation defaults through the Ctrl+click model dialog and the Pumas endpoint. Deliver the verified branch as a pull request to main.

## Decisions

- The existing acquisition and importer owners verify and publish pack bytes. The library identifies the Basalt v2 container from bounded content evidence. The upstream engine owns architecture and tensor compatibility.
- The shared GitHub installer owns release selection, trusted extraction, provenance and publication. Pumas owns the spawned runtime and its process lifecycle. Basalt declares its own build feature and starts only on a supported Linux x64 host with usable CUDA 13 and an NVIDIA GPU of compute capability 12.0.
- The runtime profile selects a dedicated managed Basalt process. Pumas publishes readiness only after the owned process reports that the selected model is loaded. A service's TCP address or model list alone is insufficient.
- The existing model metadata settings schema owns per-model values. The Ctrl+click editor and JSON-RPC reuse it. Basalt requests use explicit request options first, stored model overrides second, and the pack defaults for omitted values. Both the Pumas chat gateway and typed chat operation honor this ordering.
- The isolated `feat/basalt-runtime` worktree is based on current upstream main and owned by the Codex task through PR handoff.

## Composed design review

Applicable. Pack recognition has a filesystem and immutable-artifact lifecycle. Release acquisition has a vendor and version lifecycle. Launch and readiness are Pumas process-owner concerns. Sampling defaults are model metadata and request concerns. The shared identity is the selected artifact and managed profile; their release, launch, and request lifetimes remain independent. Callers supply a model/profile pair or request overrides and receive current availability or typed failures. They do not need the archive layout, GPU query details or provider JSON.

A new Basalt release changes installation qualification and its fixture; an engine readiness response change affects the Basalt readiness adapter; an inference option change reaches the model schema, provider conversion and generated UI contract only where the option is supported. Installed-version receipts, a selected file and bounded model options are the stable seams. Model metadata remains usable without the build or hardware capability. Removing the Basalt adapters drops that provider's install/launch/serve behavior without removing common acquisition, model editing, or other providers. Provider-specific launch and request mapping contain the required complexity. There is no separate downloader, process supervisor, settings database or settings dialog.

## Milestones and acceptance

| Slice | Lifecycle | Write set and evidence |
| --- | --- | --- |
| Pack admission | Accepted | Structurally valid and malformed container tests, local import, and the pinned Hugging Face pack verified against its publisher digest. |
| Runtime install and profile | Accepted | GitHub acquisition of v0.5.6, unsupported-device refusal, and managed load and unload on the RTX 5090 Laptop. |
| Inference defaults | Accepted | Electron and JSON-RPC persistence, explicit request precedence in both inference endpoints, typed vision and streaming, and a Workbench Pumas client response. |

| Claim | Kind | Environment | Mode | Status |
| --- | --- | --- | --- | --- |
| Pack acquired or imported and identified as a native Basalt artifact | Integration | Required real | Automated | Passed |
| Pumas installs Basalt, launches the selected profile, serves Inkling and releases the owned process on unload | System | Required real Blackwell | Automated | Passed |
| Ctrl+click editor persists supported values | User workflow | Electron and RPC | Automated | Passed |
| Real inference honors saved defaults and explicit overrides | System | Required real Blackwell | Automated | Passed |
| Feature/platform and unsupported-device outcomes agree with discovery and launch admission | Contract | Representative | Automated | Passed |

[Acceptance evidence](execution-ledger.md) · [Issues](issues.md)
4 changes: 2 additions & 2 deletions docs/release-attribution/0.8.2-s3/inventory.json
Original file line number Diff line number Diff line change
Expand Up @@ -9432,8 +9432,8 @@
"rust/Cargo.toml": "71e9e537a4f80757e8a772f1dc0e066ce588ff7781a4151ccd8f77c166b1faac",
"rust/crates/pumas-app-manager/Cargo.toml": "5289d58c2a9d1aa8df3ddef372d640af8263ee45bc524edccc9685ca58f4cc2b",
"rust/crates/pumas-app-manager/src/version_manager/managed_python.rs": "6653fe6402c497573201c5a76567a839fe4229bc749c8c0489b61ba62411c8f9",
"rust/crates/pumas-core/Cargo.toml": "7c572e50bc6052a3d2987998b66c558f8570e1aed12dfea30e9f3a81a5091e95",
"rust/crates/pumas-rpc/Cargo.toml": "6b14fbac9a22049146b59aec4a415c333283a3ddb9616e5adc8ec3bdd4d5ec92",
"rust/crates/pumas-core/Cargo.toml": "544472f0201f901ea021e8c09599f8338e61a9e8206fd7b4503857f96a12df28",
"rust/crates/pumas-rpc/Cargo.toml": "b95e19e7c47bfd49d695caf3476d28bfc67a5cc73a9ec4e5311e04c7d8f46f04",
"scripts/release/artifact-plan.json": "1304dcd4856b64b4c37ddf052a05e33157ca6a28f00d549f977c00dceb4ff2e3",
"scripts/release/licenses/managed-python-sources.json": "eabda4e2a25a92cfa8610865e79d11a50836930f53098efe89dd90778c4212ca",
"scripts/release/licenses/managed-python-supplemental/zlib-ng-2.2.4-LICENSE.md": "6c9f0d975b41afaa34d22f55bb8986ce69e5cb7ad327cb2b28820cd425edf5ee",
Expand Down
4 changes: 2 additions & 2 deletions docs/release-attribution/0.8.2/inventory.json
Original file line number Diff line number Diff line change
Expand Up @@ -9430,8 +9430,8 @@
"rust/Cargo.toml": "71e9e537a4f80757e8a772f1dc0e066ce588ff7781a4151ccd8f77c166b1faac",
"rust/crates/pumas-app-manager/Cargo.toml": "5289d58c2a9d1aa8df3ddef372d640af8263ee45bc524edccc9685ca58f4cc2b",
"rust/crates/pumas-app-manager/src/version_manager/managed_python.rs": "6653fe6402c497573201c5a76567a839fe4229bc749c8c0489b61ba62411c8f9",
"rust/crates/pumas-core/Cargo.toml": "7c572e50bc6052a3d2987998b66c558f8570e1aed12dfea30e9f3a81a5091e95",
"rust/crates/pumas-rpc/Cargo.toml": "6b14fbac9a22049146b59aec4a415c333283a3ddb9616e5adc8ec3bdd4d5ec92",
"rust/crates/pumas-core/Cargo.toml": "544472f0201f901ea021e8c09599f8338e61a9e8206fd7b4503857f96a12df28",
"rust/crates/pumas-rpc/Cargo.toml": "b95e19e7c47bfd49d695caf3476d28bfc67a5cc73a9ec4e5311e04c7d8f46f04",
"scripts/release/artifact-plan.json": "1304dcd4856b64b4c37ddf052a05e33157ca6a28f00d549f977c00dceb4ff2e3",
"scripts/release/licenses/managed-python-sources.json": "eabda4e2a25a92cfa8610865e79d11a50836930f53098efe89dd90778c4212ca",
"scripts/release/licenses/managed-python-supplemental/zlib-ng-2.2.4-LICENSE.md": "6c9f0d975b41afaa34d22f55bb8986ce69e5cb7ad327cb2b28820cd425edf5ee",
Expand Down
34 changes: 34 additions & 0 deletions docs/runtimes/basalt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Managed Basalt

Pumas can download a publisher-verified [Basalt 0.5 release](https://github.com/jesdga95/basalt/releases/tag/v0.5.6), install its Python environment alongside the engine, and serve a single `.basalt` v2 pack per managed runtime profile. The Basalt build feature is enabled by default in `pumas-rpc`. Use `--no-default-features --features inference-plugins` for the other inference plugins without Basalt.

## Host requirements

- Linux x64 with Python 3.10 or newer and its venv module. Installation downloads the upstream release archive from GitHub and the release's pinned Python wheels.
- An NVIDIA Blackwell GPU of compute capability 12.0, a compatible NVIDIA driver and CUDA 13 user-space libraries. See the [Basalt platform requirements](https://github.com/jesdga95/basalt/blob/v0.5.6/docs/platforms.md).
- Enough memory to load the chosen pack. The managed launcher runs Basalt's GPU planner under the profile's CUDA device visibility before starting the server.

Pumas uses the system CUDA library search path by default. If the libraries are installed in a separate directory, start Pumas with `PUMAS_BASALT_CUDA_LIB_DIR` pointing to the absolute directory containing `libcudart.so.13`, `libcublas.so.13` and `libcublasLt.so.13`.

## Install and serve

1. Open **Basalt** in the sidebar and install the runtime. Activate it, or pin the installed version in the profile.
2. Download or import the `Inkling-2-Mini-NVFP4-DQ8.basalt` pack. Hugging Face also lists an MX8 pack supported by Basalt 0.5.6. Choose a single pack for one model record.
3. In **Runtime Profiles**, add an enabled managed Basalt profile. Select **Auto** or a specific compatible GPU. The managed process listens on loopback.
4. Serve the model with that profile. Pumas records it as loaded once the exact owned Basalt process reports this model ready. Unload stops that profile's serving process.

Basalt provides chat generation through the Pumas gateway. Available image input is declared by the loaded runtime. Use the alias and profile returned by `GET /v1/served-models`.

## Set model defaults

Ctrl+click the model name, open **Inference**, then choose a **Thinking Level** and any sampling overrides. Use **Model default** or clear a numeric field to use the pack's defaults. Save settings to apply them to subsequent requests without reloading the model.

Inkling can emit reasoning tokens even at Thinking Level `none`. Allow enough output tokens for the model's answer. See the [Inkling chat and thinking behavior](https://github.com/jesdga95/basalt/blob/v0.5.6/docs/models/inkling2.md#chat-thinking-and-tools).

API clients can read the descriptors with the `get_inference_settings` JSON-RPC method and submit the edited descriptors with `update_inference_settings`. Both take `model_id`. For an update, pass the edited descriptors as `settings`; the `default` field carries the selected per-model value. An empty settings list clears the overrides. Pumas validates values against the provider schema.

Settings include thinking level, maximum output tokens, temperature, top P, top K, min P, repetition, presence and frequency penalties, and seed. On `POST /v1/chat/completions` send explicit values in the request body. On `POST /v1/model-operations` use text-generation options, with additional values such as `reasoning_effort` under `options.sampling`. Explicit request values take precedence. See the [Pumas model operations contract](../contracts/model-operations-v1.md).

## Diagnose a launch

A missing CUDA library, unsupported GPU, or unavailable device returns a serving error before model readiness is published. If a compatible GPU is already busy, use the runtime log for model-load errors and verify memory availability. The profile status exposes the log path. To release memory, unload the model through Pumas.
41 changes: 41 additions & 0 deletions frontend/public/basalt-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading