gpu4agents 0.9.0__tar.gz → 0.9.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/.claude-plugin/plugin.json +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/.cursor-plugin/plugin.json +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/.env.example +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/.github/ISSUE_TEMPLATE/bug_report.yml +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/CHANGELOG.md +8 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/INSTALL.md +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/JOBS.md +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/PKG-INFO +6 -6
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/PROVIDERS.md +3 -3
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/README.md +5 -5
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/SERVING.md +2 -2
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/docs/ACCEPTANCE.md +2 -2
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/docs/ADDING_A_PROVIDER.md +2 -2
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/docs/AGENTS.md +3 -3
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/docs/CHOOSING_A_MODEL.md +8 -8
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/docs/CONFIG.md +11 -9
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/docs/INTEGRATION.md +6 -6
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/docs/LIFECYCLE.md +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/docs/USAGE.md +9 -9
- gpu4agents-0.9.0/examples/jambu.yaml → gpu4agents-0.9.1/examples/gpu.yaml +2 -2
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/mastra-agent/README.md +4 -4
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/typescript-client/README.md +2 -2
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/typescript-client/src/gpu.ts +2 -2
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/typescript-client/src/index.ts +1 -1
- gpu4agents-0.9.0/jambu.example.yaml → gpu4agents-0.9.1/gpu.example.yaml +3 -3
- gpu4agents-0.9.0/jambu.models.yaml → gpu4agents-0.9.1/gpu.models.yaml +4 -4
- gpu4agents-0.9.0/jambu.yaml → gpu4agents-0.9.1/gpu.yaml +2 -2
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/__init__.py +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/agent/mcp.py +13 -13
- {gpu4agents-0.9.0/skills/gpu4agents → gpu4agents-0.9.1/gpu4agents/agent/skill}/SKILL.md +8 -8
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/account.py +6 -6
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/inspect.py +9 -9
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/main.py +2 -2
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/providers.py +4 -4
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/setup.py +18 -5
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/validate.py +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/config.py +21 -19
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/credentials.py +2 -2
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/engine.py +2 -2
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/errors.py +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/model_inspect.py +3 -3
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/state.py +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/providers/registry.py +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/providers/scaffold.py +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/providers/vast/config.py +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/serve/hf/server.py +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/install.sh +2 -2
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/pyproject.toml +1 -1
- {gpu4agents-0.9.0/gpu4agents/agent/skill → gpu4agents-0.9.1/skills/gpu4agents}/SKILL.md +8 -8
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/conftest.py +2 -2
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_agent.py +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_cli.py +31 -12
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_config.py +46 -28
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_jobs.py +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_model_inspect.py +1 -1
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_serve.py +5 -5
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_sweep.py +6 -6
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/.claude-plugin/marketplace.json +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/.github/dependabot.yml +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/.github/pull_request_template.md +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/.github/workflows/ci.yml +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/.github/workflows/release.yml +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/.gitignore +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/CODE_OF_CONDUCT.md +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/CONTRIBUTING.md +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/LICENSE +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/SECURITY.md +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/docs/assets/banner.png +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/docs/assets/jambu-logo.jpg +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/experiment.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/mastra-agent/package-lock.json +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/mastra-agent/package.json +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/mastra-agent/src/agent.ts +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/mastra-agent/src/index.ts +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/mastra-agent/src/tools/weather-tool.ts +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/mastra-agent/tsconfig.json +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/typescript-client/package-lock.json +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/typescript-client/package.json +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/examples/typescript-client/tsconfig.json +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/__main__.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/agent/__init__.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/agent/install.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/agent/jobs.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/__init__.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/_common.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/agent.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/job.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/lifecycle.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/run.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/status.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/cli/timer.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/__init__.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/beacon.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/durations.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/events.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/execution.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/health.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/hosts.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/job.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/models.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/paths.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/policy.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/sweep.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/core/tool_parsers.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/providers/__init__.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/providers/base.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/providers/vast/__init__.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/providers/vast/client.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/providers/vast/mapper.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/providers/vast/provider.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/runtime/__init__.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/runtime/base.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/runtime/service.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/runtime/vllm.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/serve/__init__.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/serve/hf/__init__.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/serve/hf/install.sh +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/serve/template/__init__.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/serve/template/gpujob.yaml +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/serve/template/server.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/watchdog/__init__.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/watchdog/agent_body.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/watchdog/builder.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/gpu4agents/watchdog/jobs_ext.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/jambu_gpu/__init__.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/jambu_gpu/__main__.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/skills/gpu4agents/agents/openai.yaml +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/fakes.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_engine.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_engine_sessions.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_integration.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_paths.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_policy.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_runtime_vllm.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_state.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_vast_mapper.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_vast_provider.py +0 -0
- {gpu4agents-0.9.0 → gpu4agents-0.9.1}/tests/test_watchdog.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gpu4agents",
|
|
3
3
|
"description": "Your agent rents the GPU it needs, serves a model on it and runs the experiment. You pay only while it works.",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "João Gabriel Lima",
|
|
7
7
|
"url": "https://www.linkedin.com/in/joaogabriellima"
|
|
@@ -16,7 +16,7 @@ body:
|
|
|
16
16
|
id: repro
|
|
17
17
|
attributes:
|
|
18
18
|
label: How to reproduce
|
|
19
|
-
description: The command or MCP tool call, and the relevant part of `
|
|
19
|
+
description: The command or MCP tool call, and the relevant part of `gpu.yaml`.
|
|
20
20
|
render: shell
|
|
21
21
|
- type: textarea
|
|
22
22
|
id: output
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses [Semantic Versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [0.9.1] - 2026-11-04
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- The config file is `gpu.yaml`, and the model catalog is `gpu.models.yaml`. `gpu init` writes `gpu.yaml`, and the docs, the skill and the website use the new names.
|
|
9
|
+
|
|
10
|
+
### Upgrading
|
|
11
|
+
- A project with a `jambu.yaml` or `jambu.models.yaml` keeps working: both names are still read, after the new ones. Renaming the file is enough to move over. In a directory that has a `jambu.yaml`, `gpu init` stops and asks you to rename it, or writes a `gpu.yaml` beside it with `--force`.
|
|
12
|
+
|
|
5
13
|
## [0.9.0] - 2026-11-04
|
|
6
14
|
|
|
7
15
|
### Added
|
|
@@ -20,7 +20,7 @@ curl -fsSL https://raw.githubusercontent.com/jambuai/gpu4agents/main/install.sh
|
|
|
20
20
|
|
|
21
21
|
The script needs only `curl` (Linux or macOS; on Windows, run it inside WSL). It installs [uv](https://docs.astral.sh/uv/) if missing, uses it to install the `gpu4agents` package with a Python it downloads by itself, and then installs the skill and registers the `gpu` MCP server for your runtime. It does not ask for or read any key.
|
|
22
22
|
|
|
23
|
-
Check: `~/.local/bin/gpu --version` prints 0.9.
|
|
23
|
+
Check: `~/.local/bin/gpu --version` prints 0.9.1 or later. Use `~/.local/bin/gpu` for the rest of this session if plain `gpu` is not found.
|
|
24
24
|
|
|
25
25
|
## 2. Connect a GPU provider account
|
|
26
26
|
|
|
@@ -4,7 +4,7 @@ You are a coding agent and the work needs a GPU: training or fine-tuning, an ima
|
|
|
4
4
|
|
|
5
5
|
## 1. The machine
|
|
6
6
|
|
|
7
|
-
The job runs on the project's machine, described by `
|
|
7
|
+
The job runs on the project's machine, described by `gpu.yaml`. For a machine that only runs jobs:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
gpu init --jobs --min-vram-gb 24 # runtime.engine: none, image pytorch/pytorch:2.8.0-cuda12.8-cudnn9-runtime
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: gpu4agents
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.1
|
|
4
4
|
Summary: GPU for Agents: your coding agent rents the GPU it needs, on its own. You pay only while it works.
|
|
5
5
|
Project-URL: Homepage, https://gpu4agents.jambu.ai
|
|
6
6
|
Project-URL: Documentation, https://github.com/jambuai/gpu4agents/tree/main/docs
|
|
@@ -127,7 +127,7 @@ gpu login --provider runpod # a provider you added an adapter for
|
|
|
127
127
|
gpu login --check # which account gpu finds, and its balance
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
`gpu login` checks the key with the provider, then saves it in `~/.gpu/credentials` (mode 600). Keys in the environment or a project `.env` work too. They never go in `
|
|
130
|
+
`gpu login` checks the key with the provider, then saves it in `~/.gpu/credentials` (mode 600). Keys in the environment or a project `.env` work too. They never go in `gpu.yaml`.
|
|
131
131
|
|
|
132
132
|
Restart the agent and ask for an experiment. See [Letting a coding agent rent GPUs](docs/AGENTS.md).
|
|
133
133
|
|
|
@@ -170,7 +170,7 @@ Requests count as activity, so the machine stays up while clients call it and st
|
|
|
170
170
|
Add <provider> to GPU for Agents. Fetch https://gpu4agents.jambu.ai/providers.md with curl and follow its steps.
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
The agent runs `gpu providers new <name>`, fills in the adapter from the provider's API docs, checks it with `gpu validate` and `gpu offers`, and asks you before a test rental. The adapter is one file in your project, selected in `
|
|
173
|
+
The agent runs `gpu providers new <name>`, fills in the adapter from the provider's API docs, checks it with `gpu validate` and `gpu offers`, and asks you before a test rental. The adapter is one file in your project, selected in `gpu.yaml`:
|
|
174
174
|
|
|
175
175
|
```yaml
|
|
176
176
|
gpu_runtime:
|
|
@@ -197,7 +197,7 @@ From an application in any language, `gpu --json setup` prints the endpoint as J
|
|
|
197
197
|
## Declare the limits
|
|
198
198
|
|
|
199
199
|
```yaml
|
|
200
|
-
#
|
|
200
|
+
# gpu.yaml (only the gpu_runtime key is read, so other Jambu tools can share the file)
|
|
201
201
|
gpu_runtime:
|
|
202
202
|
provider: {name: vast}
|
|
203
203
|
model_profile: qwythos-9b
|
|
@@ -211,7 +211,7 @@ gpu_runtime:
|
|
|
211
211
|
pull_stall_timeout: 10m # a host whose image pull stalls is replaced
|
|
212
212
|
```
|
|
213
213
|
|
|
214
|
-
A full example is [`
|
|
214
|
+
A full example is [`gpu.example.yaml`](gpu.example.yaml). `gpu ls` shows every machine billing in the account, and `gpu sweep --install-timer` guards every project on the machine and cleans up orphans. See [Keeping the account clean](docs/USAGE.md#keeping-the-account-clean).
|
|
215
215
|
|
|
216
216
|
## Docs
|
|
217
217
|
|
|
@@ -226,7 +226,7 @@ A full example is [`jambu.example.yaml`](jambu.example.yaml). `gpu ls` shows eve
|
|
|
226
226
|
|
|
227
227
|
## Coming from `jambu-gpu`
|
|
228
228
|
|
|
229
|
-
The package was called `jambu-gpu` until 0.4.1. The code, the `gpu` command, `jambu.yaml` and the machines are the same:
|
|
229
|
+
The package was called `jambu-gpu` until 0.4.1. The code, the `gpu` command, the config file (`jambu.yaml` then, `gpu.yaml` now; both load) and the machines are the same:
|
|
230
230
|
|
|
231
231
|
```bash
|
|
232
232
|
pipx uninstall jambu-gpu && pipx install gpu4agents
|
|
@@ -12,10 +12,10 @@ Follow these steps in the user's project directory. Do not rent anything until s
|
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
gpu providers new <name> --display-name "<Provider name>"
|
|
15
|
-
gpu init --provider <name> --model <org/model> # skip if
|
|
15
|
+
gpu init --provider <name> --model <org/model> # skip if gpu.yaml exists
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
The first command writes `gpu_providers/<name>.py`. The second writes a `
|
|
18
|
+
The first command writes `gpu_providers/<name>.py`. The second writes a `gpu.yaml` that selects it:
|
|
19
19
|
|
|
20
20
|
```yaml
|
|
21
21
|
gpu_runtime:
|
|
@@ -24,7 +24,7 @@ gpu_runtime:
|
|
|
24
24
|
plugin: ./gpu_providers/<name>.py:<Name>Provider
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
In an existing `
|
|
27
|
+
In an existing `gpu.yaml`, add those two lines under `gpu_runtime.provider` yourself.
|
|
28
28
|
|
|
29
29
|
## 3. Read the provider's API docs, then fill in the file
|
|
30
30
|
|
|
@@ -86,7 +86,7 @@ gpu login --provider runpod # a provider you added an adapter for
|
|
|
86
86
|
gpu login --check # which account gpu finds, and its balance
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
`gpu login` checks the key with the provider, then saves it in `~/.gpu/credentials` (mode 600). Keys in the environment or a project `.env` work too. They never go in `
|
|
89
|
+
`gpu login` checks the key with the provider, then saves it in `~/.gpu/credentials` (mode 600). Keys in the environment or a project `.env` work too. They never go in `gpu.yaml`.
|
|
90
90
|
|
|
91
91
|
Restart the agent and ask for an experiment. See [Letting a coding agent rent GPUs](docs/AGENTS.md).
|
|
92
92
|
|
|
@@ -129,7 +129,7 @@ Requests count as activity, so the machine stays up while clients call it and st
|
|
|
129
129
|
Add <provider> to GPU for Agents. Fetch https://gpu4agents.jambu.ai/providers.md with curl and follow its steps.
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
The agent runs `gpu providers new <name>`, fills in the adapter from the provider's API docs, checks it with `gpu validate` and `gpu offers`, and asks you before a test rental. The adapter is one file in your project, selected in `
|
|
132
|
+
The agent runs `gpu providers new <name>`, fills in the adapter from the provider's API docs, checks it with `gpu validate` and `gpu offers`, and asks you before a test rental. The adapter is one file in your project, selected in `gpu.yaml`:
|
|
133
133
|
|
|
134
134
|
```yaml
|
|
135
135
|
gpu_runtime:
|
|
@@ -156,7 +156,7 @@ From an application in any language, `gpu --json setup` prints the endpoint as J
|
|
|
156
156
|
## Declare the limits
|
|
157
157
|
|
|
158
158
|
```yaml
|
|
159
|
-
#
|
|
159
|
+
# gpu.yaml (only the gpu_runtime key is read, so other Jambu tools can share the file)
|
|
160
160
|
gpu_runtime:
|
|
161
161
|
provider: {name: vast}
|
|
162
162
|
model_profile: qwythos-9b
|
|
@@ -170,7 +170,7 @@ gpu_runtime:
|
|
|
170
170
|
pull_stall_timeout: 10m # a host whose image pull stalls is replaced
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
A full example is [`
|
|
173
|
+
A full example is [`gpu.example.yaml`](gpu.example.yaml). `gpu ls` shows every machine billing in the account, and `gpu sweep --install-timer` guards every project on the machine and cleans up orphans. See [Keeping the account clean](docs/USAGE.md#keeping-the-account-clean).
|
|
174
174
|
|
|
175
175
|
## Docs
|
|
176
176
|
|
|
@@ -185,7 +185,7 @@ A full example is [`jambu.example.yaml`](jambu.example.yaml). `gpu ls` shows eve
|
|
|
185
185
|
|
|
186
186
|
## Coming from `jambu-gpu`
|
|
187
187
|
|
|
188
|
-
The package was called `jambu-gpu` until 0.4.1. The code, the `gpu` command, `jambu.yaml` and the machines are the same:
|
|
188
|
+
The package was called `jambu-gpu` until 0.4.1. The code, the `gpu` command, the config file (`jambu.yaml` then, `gpu.yaml` now; both load) and the machines are the same:
|
|
189
189
|
|
|
190
190
|
```bash
|
|
191
191
|
pipx uninstall jambu-gpu && pipx install gpu4agents
|
|
@@ -5,7 +5,7 @@ You are a coding agent and the work needs a model that is not a chat model, or a
|
|
|
5
5
|
## 1. Choosing the model and its server
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
gpu init --model stabilityai/sd-turbo # reads the model card, writes
|
|
8
|
+
gpu init --model stabilityai/sd-turbo # reads the model card, writes gpu.yaml
|
|
9
9
|
gpu offers # prices; ask the user before renting
|
|
10
10
|
gpu setup # rents, deploys, waits until the model answers
|
|
11
11
|
eval "$(gpu env)" # OPENAI_BASE_URL, OPENAI_API_KEY, JAMBU_MODEL_ID
|
|
@@ -84,7 +84,7 @@ Image extras go in the body (`extra_body` in the SDK): `num_inference_steps`, `g
|
|
|
84
84
|
When no built-in server loads the model (a library of its own, a pipeline of several models, video, a custom API), write the server. gpu runs it on the GPU and treats it exactly like the built-in one.
|
|
85
85
|
|
|
86
86
|
```bash
|
|
87
|
-
gpu init --engine custom --min-vram-gb 24 # writes
|
|
87
|
+
gpu init --engine custom --min-vram-gb 24 # writes gpu.yaml and server/ (server.py, gpujob.yaml)
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
`server/gpujob.yaml` says how to start it:
|
|
@@ -6,7 +6,7 @@ Eighteen guarantees, mapped to the code and the test that holds each one.
|
|
|
6
6
|
| --- | --- | --- | --- |
|
|
7
7
|
| 1 | Repeated `setup` does not duplicate infrastructure | `core/engine.py::Engine.setup` reconciles first, compares `config.fingerprint()`, and holds an exclusive `.gpu/runtime.lock` | `test_engine.py::test_setup_twice_does_not_create_two_instances`, `::test_setup_refuses_to_reuse_an_incompatible_instance` |
|
|
8
8
|
| 2 | Provider APIs do not leak into core orchestration | `providers/base.py` contract; all Vast wire format confined to `providers/vast/{client,mapper}.py` | `test_engine.py::test_the_core_never_branches_on_a_provider_name` (greps `core/`) |
|
|
9
|
-
| 3 | Missing credentials fail before provisioning | `VastProvider.validate` returns before any API call; `CredentialResolver` never reads
|
|
9
|
+
| 3 | Missing credentials fail before provisioning | `VastProvider.validate` returns before any API call; `CredentialResolver` never reads gpu.yaml | `test_vast_provider.py::test_validate_fails_before_provisioning_without_a_key` (asserts zero HTTP calls) |
|
|
10
10
|
| 4 | Failed provisioning cleans up | `Engine.setup` persists state *before* the long wait, then destroys on failure when `cleanup_on_setup_failure` | `test_engine.py::test_failed_setup_cleans_up_partially_created_resources` |
|
|
11
11
|
| 5 | Active workloads are never stopped by the idle guard | `core/policy.py::evaluate` returns `workload_active` before any idle check | `test_policy.py::test_active_workload_is_never_stopped_by_the_idle_guard`, `test_watchdog.py::test_a_heartbeating_workload_is_never_stopped` |
|
|
12
12
|
| 6 | An idle unlocked instance stops within `idle_timeout + watchdog_interval` | remote watchdog loop, `watchdog/agent_body.py::guard_loop` | `test_watchdog.py::test_idle_instance_is_stopped_with_a_recorded_reason` (real subprocess) |
|
|
@@ -77,7 +77,7 @@ The first attempt found problems the unit tests had missed. Each is fixed and te
|
|
|
77
77
|
|
|
78
78
|
## The MVP command surface
|
|
79
79
|
|
|
80
|
-
`
|
|
80
|
+
`gpu.yaml` schema, CLI, provider contract, provider registry, Vast.ai adapter,
|
|
81
81
|
vLLM runtime, `setup`, `run`, `status`, `stop`, `destroy`, `lock`/`unlock`, idle
|
|
82
82
|
timeout, max lifetime, remote watchdog and structured logs are all present. On top
|
|
83
83
|
of that, `ls` and `sweep` handle orphan control across the account.
|
|
@@ -8,13 +8,13 @@ An adapter reaches `gpu` in one of three ways:
|
|
|
8
8
|
|
|
9
9
|
| Where it lives | How `gpu` finds it | Use it for |
|
|
10
10
|
| --- | --- | --- |
|
|
11
|
-
| A file in the project | `provider.plugin: ./gpu_providers/acme.py:AcmeProvider` in
|
|
11
|
+
| A file in the project | `provider.plugin: ./gpu_providers/acme.py:AcmeProvider` in gpu.yaml | one project, or an agent writing an adapter on the spot |
|
|
12
12
|
| An installed package | an entry point in the `gpu4agents.providers` group | sharing an adapter across projects or publishing it |
|
|
13
13
|
| This repository | `providers/<name>/` plus a line in `providers/registry.py` | a provider that ships with gpu4agents |
|
|
14
14
|
|
|
15
15
|
`gpu providers new acme` writes the skeleton for the first route, with every
|
|
16
16
|
method that needs the provider's API marked. `gpu init --provider acme` writes a
|
|
17
|
-
|
|
17
|
+
gpu.yaml that selects it. Agents can follow [PROVIDERS.md](../PROVIDERS.md),
|
|
18
18
|
which walks through the same steps.
|
|
19
19
|
|
|
20
20
|
An installed package declares its adapter like this:
|
|
@@ -40,7 +40,7 @@ gpu login --check # exit 0, the provider and where the key was found
|
|
|
40
40
|
echo "$KEY" | gpu login --stdin
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
The provider is the one `--provider` names, else the project's `
|
|
43
|
+
The provider is the one `--provider` names, else the project's `gpu.yaml`, else `GPU_PROVIDER`, else Vast.ai. `gpu login --provider NAME` also saves `GPU_PROVIDER=NAME`, so `gpu ls` and `gpu sweep` outside a project use that provider. The key goes to `~/.gpu/credentials` (mode 600, directory 700); other lines in the file are kept. A key in the environment or a project `.env` still works and wins over the file. The skill tells the agent never to ask for the key in chat, read those files, or print it.
|
|
44
44
|
|
|
45
45
|
## Install by hand
|
|
46
46
|
|
|
@@ -69,7 +69,7 @@ Another agent that reads `SKILL.md` files: `gpu agent skill > path/to/skills/gpu
|
|
|
69
69
|
|
|
70
70
|
| Tool | Does | Costs money |
|
|
71
71
|
| --- | --- | --- |
|
|
72
|
-
| `gpu_init` | write `
|
|
72
|
+
| `gpu_init` | write `gpu.yaml` for a model, with an optional price cap and VRAM | no |
|
|
73
73
|
| `gpu_validate` | check the config and credentials | no |
|
|
74
74
|
| `gpu_offers` | cheapest matching machines and their price | no |
|
|
75
75
|
| `gpu_setup` | rent / restart and wait for the model; returns `base_url`, `api_key`, `model` | yes |
|
|
@@ -90,5 +90,5 @@ Each tool runs the `gpu` CLI with `--json` in the project directory, so errors c
|
|
|
90
90
|
|
|
91
91
|
- The skill tells the agent to show the price and ask before renting, wait out a slow setup instead of starting over, never touch the provider key, and offer stop or destroy (and check `gpu_ls`) when done.
|
|
92
92
|
- The server's tool annotations mark `gpu_destroy` destructive and the read-only tools read-only, so a client can let `gpu_status` run freely and ask for every `gpu_setup` and `gpu_destroy`. In Claude Code that is the `permissions` list in `.claude/settings.json`, e.g. `"allow": ["mcp__gpu__gpu_status", "mcp__gpu__gpu_offers", "mcp__gpu__gpu_ls"]`.
|
|
93
|
-
- `
|
|
93
|
+
- `gpu.yaml` holds the hard limits the agent cannot exceed without editing the file: `budget.max_hourly_cost_usd`, `budget.max_session_cost_usd`, `lifecycle.max_lifetime`.
|
|
94
94
|
- The watchdog stops the machine after `idle_timeout` whatever the agent does, and `gpu sweep --install-timer` catches anything left behind.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Where
|
|
1
|
+
# Where gpu.yaml's model-specific values come from
|
|
2
2
|
|
|
3
3
|
Every value in `model:`/`compute.gpu:`/`runtime:` that depends on the model
|
|
4
4
|
you deploy (VRAM, dtype, context length, tool-call parser, `trust_remote_code`)
|
|
@@ -38,7 +38,7 @@ gpu_runtime:
|
|
|
38
38
|
tool_calling: auto # resolves to hermes automatically
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
Paste the snippet under `gpu_runtime:` in your `
|
|
41
|
+
Paste the snippet under `gpu_runtime:` in your `gpu.yaml` and adjust
|
|
42
42
|
`lifecycle`/`health`/`budget` to get a starting config. Add `--json` for
|
|
43
43
|
machine-readable output, `--revision` for a non-`main` branch/tag, and
|
|
44
44
|
`--hf-token-env` if the repo is gated and your token lives under a different
|
|
@@ -110,7 +110,7 @@ Consequences:
|
|
|
110
110
|
`gpu4agents/core/tool_parsers.py` (a one-line PR) so `tool_calling: auto`
|
|
111
111
|
picks it up for everyone next time, the same way the Qwen3.5+ finding did.
|
|
112
112
|
|
|
113
|
-
## Don't write a new
|
|
113
|
+
## Don't write a new gpu.yaml per model - use the catalog
|
|
114
114
|
|
|
115
115
|
For each new model it is tempting to copy the whole file, since the provider,
|
|
116
116
|
lifecycle and budget stay the same and only `model:`/`compute.gpu:` differ.
|
|
@@ -119,11 +119,11 @@ After a few models a repo has `jambu.qwythos.yaml`, `jambu.model-b.yaml`,
|
|
|
119
119
|
wants one. Changing a lifecycle default then means editing all of them.
|
|
120
120
|
|
|
121
121
|
Instead, keep what varies by model in the catalog and what varies by project
|
|
122
|
-
in the active `
|
|
122
|
+
in the active `gpu.yaml`, and reference the catalog entry by name.
|
|
123
123
|
|
|
124
124
|
```yaml
|
|
125
|
-
#
|
|
126
|
-
# repo (found by walking up from a project's
|
|
125
|
+
# gpu.models.yaml - one entry per model, shared by every project in the
|
|
126
|
+
# repo (found by walking up from a project's gpu.yaml, same as gpu.yaml
|
|
127
127
|
# itself is found - one catalog can sit at the repo root and serve every
|
|
128
128
|
# sub-project under it).
|
|
129
129
|
qwythos-9b:
|
|
@@ -137,7 +137,7 @@ qwen3.8-27b-uncensored:
|
|
|
137
137
|
```
|
|
138
138
|
|
|
139
139
|
```yaml
|
|
140
|
-
#
|
|
140
|
+
# gpu.yaml - just this project's policy + which model
|
|
141
141
|
gpu_runtime:
|
|
142
142
|
version: 1
|
|
143
143
|
model_profile: qwythos-9b # the only thing that changes to switch models
|
|
@@ -163,7 +163,7 @@ repo's catalog. Trying a new model is usually a catalog case.
|
|
|
163
163
|
|
|
164
164
|
## Dynamic / un-modeled vLLM flags
|
|
165
165
|
|
|
166
|
-
`
|
|
166
|
+
`gpu.yaml`'s schema models the fields that affect lifecycle, cost, and
|
|
167
167
|
provider portability. It does not try to cover every vLLM flag, since vLLM adds
|
|
168
168
|
flags faster than a fixed contract could track. For everything else, `runtime:`
|
|
169
169
|
has two escape hatches, applied in this order. The later one wins on conflict,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# gpu.yaml reference
|
|
2
2
|
|
|
3
|
-
`
|
|
3
|
+
`gpu.yaml` is the source of truth for the desired state. It describes what should
|
|
4
4
|
run and how long it may live. It must never contain credentials, and it never contains
|
|
5
5
|
provider API details.
|
|
6
6
|
|
|
7
|
-
`
|
|
7
|
+
`gpu.yaml` is a manifest shared across Jambu.ai Lab sub-projects. `gpu` reads only
|
|
8
8
|
its own `gpu_runtime:` top-level key and ignores every other key in the document, so
|
|
9
9
|
other Jambu tools can keep their own config in the same file:
|
|
10
10
|
|
|
11
11
|
```yaml
|
|
12
|
-
#
|
|
12
|
+
# gpu.yaml
|
|
13
13
|
gpu_runtime:
|
|
14
14
|
version: 1
|
|
15
15
|
model: {id: ...}
|
|
@@ -22,11 +22,13 @@ some_other_jambu_tool:
|
|
|
22
22
|
If the file does not need to be shared, `gpu init --flat` writes a `config.yml` where
|
|
23
23
|
the whole document is the gpu-runtime config, with no `gpu_runtime:` wrapper. This
|
|
24
24
|
format is still supported. A bare document with no `gpu_runtime:` key is also accepted
|
|
25
|
-
under the `
|
|
25
|
+
under the `gpu.yaml` filename, for a solo project that prefers that name.
|
|
26
26
|
|
|
27
27
|
Resolution order (first match wins, searched from the working directory upward):
|
|
28
|
-
`--config PATH`, else `
|
|
29
|
-
|
|
28
|
+
`--config PATH`, else `gpu.yaml`, `gpu.yml`, `jambu.yaml`, `jambu.yml`, `config.yml`,
|
|
29
|
+
`config.yaml` in that order. `jambu.yaml` is the name used before 0.9.1; projects that
|
|
30
|
+
still have one keep working, and renaming it to `gpu.yaml` changes nothing else. The same
|
|
31
|
+
goes for `jambu.models.yaml`, now `gpu.models.yaml`. When a directory has both shapes, the shared, namespaced one is preferred over
|
|
30
32
|
the legacy flat one.
|
|
31
33
|
|
|
32
34
|
`${VAR}` references in string values are expanded from the environment.
|
|
@@ -38,8 +40,8 @@ check keys that other tools own elsewhere in the document.
|
|
|
38
40
|
### `model_profile`: share model config across files
|
|
39
41
|
|
|
40
42
|
Set `model_profile: <name>` instead of declaring `model:`/`compute:`/`runtime:`
|
|
41
|
-
directly, and gpu merges in that named entry from `
|
|
42
|
-
searched the same way as `
|
|
43
|
+
directly, and gpu merges in that named entry from `gpu.models.yaml`. The catalog is
|
|
44
|
+
searched the same way as `gpu.yaml` (this directory, then parents), so one catalog
|
|
43
45
|
serves every sub-project in a repo. Fields you declare locally still win over the
|
|
44
46
|
profile's. See
|
|
45
47
|
[`docs/CHOOSING_A_MODEL.md`](CHOOSING_A_MODEL.md#dont-write-a-new-jambuyaml-per-model---use-the-catalog)
|
|
@@ -23,11 +23,11 @@ gpu sweep --install-timer # optional safety net, see USAGE.md
|
|
|
23
23
|
Requirements:
|
|
24
24
|
|
|
25
25
|
- `gpu4agents` (or `jambu-gpu` 0.3.0 or later), on Python 3.10+. The app can be in any language.
|
|
26
|
-
- The directory holding `
|
|
26
|
+
- The directory holding `gpu.yaml` must be persistent. `gpu` keeps what it rented in `.gpu/state.json` next to it. In a container, mount it as a volume: a container that loses `.gpu/` forgets its instance, rents a second one, and leaves the first to the watchdog and the sweep.
|
|
27
27
|
- Before 0.3.0 these directories were `.jambu/` and `~/.jambu`. The first command after an upgrade renames them, so an instance already rented is kept and is not rented again.
|
|
28
28
|
- `.gpu/state.json` holds the endpoint key and the watchdog token. It is written `0600`. Add `.gpu/` and `.env` to `.gitignore` and keep them out of images.
|
|
29
29
|
|
|
30
|
-
Tune the lifecycle in `
|
|
30
|
+
Tune the lifecycle in `gpu.yaml` for the app. For a service with bursty traffic, a longer idle timeout avoids paying a restart on every burst:
|
|
31
31
|
|
|
32
32
|
```yaml
|
|
33
33
|
gpu_runtime:
|
|
@@ -45,7 +45,7 @@ All fields are in [CONFIG.md](CONFIG.md).
|
|
|
45
45
|
|
|
46
46
|
### Commands an app calls
|
|
47
47
|
|
|
48
|
-
Always pass `--json` (before the command name). Run them from the project directory, or pass `--config /path/to/
|
|
48
|
+
Always pass `--json` (before the command name). Run them from the project directory, or pass `--config /path/to/gpu.yaml`.
|
|
49
49
|
|
|
50
50
|
| Command | Use it to | Blocks | Starts billing |
|
|
51
51
|
| --- | --- | --- | --- |
|
|
@@ -101,7 +101,7 @@ gpu env --format dotenv > .env.gpu
|
|
|
101
101
|
| --- | --- | --- |
|
|
102
102
|
| 0 | success | |
|
|
103
103
|
| 1 | unexpected error | log stderr, retry later |
|
|
104
|
-
| 2 | config error (`
|
|
104
|
+
| 2 | config error (`gpu.yaml` invalid, or changed since setup) | fix the config; `setup --recreate` replaces a machine built from the old one |
|
|
105
105
|
| 3 | no instance / no endpoint (from `env`, `endpoint`) | call `setup` |
|
|
106
106
|
| 4 | provider API error | retry with backoff |
|
|
107
107
|
| 5 | provider authentication failed | fix `VAST_API_KEY` |
|
|
@@ -161,7 +161,7 @@ The TypeScript helper below does this.
|
|
|
161
161
|
import OpenAI from "openai";
|
|
162
162
|
import { Gpu } from "./gpu.ts";
|
|
163
163
|
|
|
164
|
-
const gpu = new Gpu({ cwd: "/srv/my-app" }); // where
|
|
164
|
+
const gpu = new Gpu({ cwd: "/srv/my-app" }); // where gpu.yaml lives
|
|
165
165
|
|
|
166
166
|
const reply = await gpu.call((c) =>
|
|
167
167
|
new OpenAI({ baseURL: c.baseURL, apiKey: c.apiKey, maxRetries: 0, timeout: 120_000 })
|
|
@@ -220,7 +220,7 @@ Run `gpu --json setup` as a subprocess, parse the JSON, and point the language's
|
|
|
220
220
|
- The endpoint requires a key. Unless `runtime.api_key` is set, `setup` generates one per machine (43 random URL-safe characters) and starts vLLM with it. Requests without it get `401`. `/health` and `/metrics` stay open: they reveal no data and the watchdog reads `/metrics`. Instances provisioned before this existed run without a key until they are recreated.
|
|
221
221
|
- The endpoint is plain HTTP on a public IP and port. The key and the prompts travel unencrypted. For sensitive data, put the app and the GPU on a private network or a tunnel, or front the endpoint with a TLS proxy.
|
|
222
222
|
- The watchdog holds the provider key on the instance so it can stop its own machine. A restricted key is the safer choice; see [LIFECYCLE.md](LIFECYCLE.md).
|
|
223
|
-
- `
|
|
223
|
+
- `gpu.yaml` never holds credentials. `.env` and `.gpu/` do not belong in version control.
|
|
224
224
|
|
|
225
225
|
## 6. Troubleshooting
|
|
226
226
|
|
|
@@ -6,9 +6,9 @@ Operator reference. The project front page is the [README](../README.md). Field-
|
|
|
6
6
|
|
|
7
7
|
| Command | What it does |
|
|
8
8
|
| --- | --- |
|
|
9
|
-
| `gpu init` | Write a starter `
|
|
9
|
+
| `gpu init` | Write a starter `gpu.yaml` and `.env.example` (`--flat` for a legacy `config.yml`) |
|
|
10
10
|
| `gpu inspect-model <repo>` | Suggest `min_vram_gb`, `dtype`, and `tool_calling` for a HuggingFace model, with sources cited. `--add-profile <name>` writes it into the model catalog |
|
|
11
|
-
| `gpu profiles` | List the model profiles in `
|
|
11
|
+
| `gpu profiles` | List the model profiles in `gpu.models.yaml` |
|
|
12
12
|
| `gpu providers` | Provider capability matrix and credential status |
|
|
13
13
|
| `gpu validate` | Schema, policy, credentials, capabilities, real capacity. Fails before provisioning |
|
|
14
14
|
| `gpu offers` | Matching GPU offers and their hourly price |
|
|
@@ -35,13 +35,13 @@ Every command accepts `--json` and `--config PATH`. To call `gpu` from an applic
|
|
|
35
35
|
|
|
36
36
|
## The manifest
|
|
37
37
|
|
|
38
|
-
`gpu` reads only the `gpu_runtime:` key. Everything else in `
|
|
38
|
+
`gpu` reads only the `gpu_runtime:` key. Everything else in `gpu.yaml` belongs to another tool. Credentials never go in the file.
|
|
39
39
|
|
|
40
|
-
A project that does not share the file can run `gpu init --flat`. That writes a `config.yml` with the same fields at the top level, without the `gpu_runtime:` wrapper. When both files exist, `
|
|
40
|
+
A project that does not share the file can run `gpu init --flat`. That writes a `config.yml` with the same fields at the top level, without the `gpu_runtime:` wrapper. When both files exist, `gpu.yaml` wins.
|
|
41
41
|
|
|
42
|
-
More than one model: do not copy the whole file per model. Set `model_profile: <name>` and keep the definitions in [`
|
|
42
|
+
More than one model: do not copy the whole file per model. Set `model_profile: <name>` and keep the definitions in [`gpu.models.yaml`](../gpu.models.yaml). `gpu inspect-model <repo> --add-profile <name>` writes a profile. `gpu profiles` lists them. See [CHOOSING_A_MODEL.md](CHOOSING_A_MODEL.md).
|
|
43
43
|
|
|
44
|
-
The full field list is [CONFIG.md](CONFIG.md). A filled example is [`
|
|
44
|
+
The full field list is [CONFIG.md](CONFIG.md). A filled example is [`gpu.example.yaml`](../gpu.example.yaml).
|
|
45
45
|
|
|
46
46
|
## Running a workload
|
|
47
47
|
|
|
@@ -108,7 +108,7 @@ gpu ls
|
|
|
108
108
|
```
|
|
109
109
|
Vast.ai instances
|
|
110
110
|
ID LABEL STATE GPU $/H AGE PROJECT
|
|
111
|
-
31337001 jambu-Qwythos-9B-v2-3fa2c1 READY 1x RTX 4090 $0.350 7h30m /home/me/agent/
|
|
111
|
+
31337001 jambu-Qwythos-9B-v2-3fa2c1 READY 1x RTX 4090 $0.350 7h30m /home/me/agent/gpu.yaml
|
|
112
112
|
31337002 jambu-Llama-3.1-8B-9b01de STOPPED 1x RTX 4090 $0.350 1d6h orphan
|
|
113
113
|
```
|
|
114
114
|
|
|
@@ -116,7 +116,7 @@ Vast.ai instances
|
|
|
116
116
|
|
|
117
117
|
`gpu setup` (and `gpu run`, which can provision) registers the project's absolute config path in `~/.gpu/projects.json` (`$GPU_HOME` overrides `~/.gpu`; a `~/.jambu` from before 0.3.0 is renamed to `~/.gpu` on first use, and `$JAMBU_HOME` is still read). `gpu sweep` then works in two steps:
|
|
118
118
|
|
|
119
|
-
1. Tracked instances. For every registered project whose config still loads, it runs that project's own `gpu guard`: its own `
|
|
119
|
+
1. Tracked instances. For every registered project whose config still loads, it runs that project's own `gpu guard`: its own `gpu.yaml` and `.gpu/state.json`, so its own `max_lifetime`, lock, session start, `stopped_ttl` and budget. The project's events land in its own log. A registered project whose config file is gone is dropped from the registry. The project in the current directory, or the one given with `--config`, is guarded too for that run.
|
|
120
120
|
2. Orphans. An instance no project tracks has no known policy, and nobody knows whether it is in use. The rules for it are simple, and they never destroy a running machine:
|
|
121
121
|
|
|
122
122
|
| Orphan | Rule | Action |
|
|
@@ -131,7 +131,7 @@ It is a dry run until you pass `--apply`:
|
|
|
131
131
|
```
|
|
132
132
|
$ gpu sweep
|
|
133
133
|
> guarding 1 project(s) (dry run)
|
|
134
|
-
= /home/me/agent/
|
|
134
|
+
= /home/me/agent/gpu.yaml: 31337001 ok (within_policy)
|
|
135
135
|
> sweeping Vast.ai for orphans: running > 1d is stopped, stopped > 1d is destroyed (dry run)
|
|
136
136
|
- would destroy orphan 31337002 (jambu-Llama-3.1-8B-9b01de): stopped_ttl, stopped for 1d2h
|
|
137
137
|
! 1 action(s) pending; re-run with --apply
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# gpu.yaml - shared manifest across Jambu.ai Lab sub-projects. This tool
|
|
2
2
|
# only reads the gpu_runtime: key below.
|
|
3
3
|
#
|
|
4
|
-
# model/compute/runtime come from ../
|
|
4
|
+
# model/compute/runtime come from ../gpu.models.yaml (the shared catalog,
|
|
5
5
|
# found by walking up from this directory) - this file only holds this
|
|
6
6
|
# project's policy: lifecycle, health, budget. See
|
|
7
7
|
# docs/CHOOSING_A_MODEL.md for why the split, and `gpu profiles` to
|
|
@@ -18,7 +18,7 @@ pointed at a self-hosted endpoint instead of the real OpenAI API.
|
|
|
18
18
|
|
|
19
19
|
That's the entire integration surface. No gpu SDK, no wrapper client.
|
|
20
20
|
|
|
21
|
-
## Requirements on the
|
|
21
|
+
## Requirements on the gpu.yaml side
|
|
22
22
|
|
|
23
23
|
Mastra calls `weatherTool` through vLLM's regular OpenAI tool-calling — which only
|
|
24
24
|
fires if vLLM was started with a matching `--tool-call-parser`. gpu picks one
|
|
@@ -26,7 +26,7 @@ automatically for recognized model families (`runtime.tool_calling: auto`, the
|
|
|
26
26
|
default); for anything it doesn't recognize, set it explicitly:
|
|
27
27
|
|
|
28
28
|
```yaml
|
|
29
|
-
#
|
|
29
|
+
# gpu.yaml
|
|
30
30
|
gpu_runtime:
|
|
31
31
|
model:
|
|
32
32
|
id: Qwen/Qwen2.5-7B-Instruct # gpu resolves "hermes" for this one
|
|
@@ -45,7 +45,7 @@ actually be able to call `weatherTool`.
|
|
|
45
45
|
```bash
|
|
46
46
|
cd examples/mastra-agent
|
|
47
47
|
npm install
|
|
48
|
-
cd ../.. # back to wherever
|
|
48
|
+
cd ../.. # back to wherever gpu.yaml lives
|
|
49
49
|
|
|
50
50
|
gpu setup
|
|
51
51
|
gpu run npm --prefix examples/mastra-agent start
|
|
@@ -65,6 +65,6 @@ It's currently 18°C and partly cloudy in Lisbon.
|
|
|
65
65
|
`src/agent.ts` uses `api: "chat"` (vLLM's `/v1/chat/completions`) because it works
|
|
66
66
|
on every vLLM version. vLLM also serves the OpenAI **Responses API** at
|
|
67
67
|
`/v1/responses`, including MCP tool routing done server-side — set
|
|
68
|
-
`api: "responses"` in the model config and `runtime.tool_server` in `
|
|
68
|
+
`api: "responses"` in the model config and `runtime.tool_server` in `gpu.yaml`
|
|
69
69
|
(see [`docs/CONFIG.md`](../../docs/CONFIG.md#agentic-flows-nothing-to-build)) to
|
|
70
70
|
use that instead.
|
|
@@ -6,7 +6,7 @@ Any Node/TypeScript application using a GPU that `gpu` rents and guards, through
|
|
|
6
6
|
|
|
7
7
|
## Run it
|
|
8
8
|
|
|
9
|
-
From the directory that holds `
|
|
9
|
+
From the directory that holds `gpu.yaml` and `VAST_API_KEY` (in `.env` or the environment), with `gpu4agents` (or `jambu-gpu` 0.3.0 or later) on `PATH`:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
npm --prefix examples/typescript-client install
|
|
@@ -41,4 +41,4 @@ export async function complete(prompt: string): Promise<string> {
|
|
|
41
41
|
| `gpuStatus(opts)` | `gpu --json status` |
|
|
42
42
|
| `GpuError`, `EXIT` | Failures carry the CLI's `exitCode` ([codes](../../docs/INTEGRATION.md#exit-codes)) |
|
|
43
43
|
|
|
44
|
-
`opts` is `{ cwd?, config?, bin?, timeoutMs? }`: where `
|
|
44
|
+
`opts` is `{ cwd?, config?, bin?, timeoutMs? }`: where `gpu.yaml` is, or its path, the `gpu` executable, and a limit on how long `setup` may take (none by default: `gpu` bounds itself, see [the lifecycle table](../../docs/INTEGRATION.md#lifecycle-the-app-has-to-expect)).
|
|
@@ -21,9 +21,9 @@ export interface GpuConnection {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface GpuOptions {
|
|
24
|
-
/** Directory holding
|
|
24
|
+
/** Directory holding gpu.yaml (and .env with VAST_API_KEY). */
|
|
25
25
|
cwd?: string;
|
|
26
|
-
/** Explicit path to
|
|
26
|
+
/** Explicit path to gpu.yaml. */
|
|
27
27
|
config?: string;
|
|
28
28
|
/** The gpu executable. Default: "gpu". */
|
|
29
29
|
bin?: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# gpu.yaml - shared across Jambu.ai Lab sub-projects. This tool only reads
|
|
2
2
|
# the gpu_runtime: key below; add other tools' own top-level keys alongside
|
|
3
3
|
# it without conflict. Credentials never live here.
|
|
4
4
|
#
|
|
5
5
|
# This file shows every field in one place, for reference. Running more than
|
|
6
6
|
# one model? Don't copy this file per model - use `model_profile: <name>`
|
|
7
|
-
# with a shared
|
|
8
|
-
# docs/CHOOSING_A_MODEL.md and
|
|
7
|
+
# with a shared gpu.models.yaml catalog instead. See
|
|
8
|
+
# docs/CHOOSING_A_MODEL.md and gpu.models.yaml in this repo for an example.
|
|
9
9
|
gpu_runtime:
|
|
10
10
|
version: 1
|
|
11
11
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# The model catalog: one entry per model, referenced from any project's
|
|
2
|
-
#
|
|
3
|
-
#
|
|
2
|
+
# gpu.yaml via `model_profile: <name>`. Searched the same way as
|
|
3
|
+
# gpu.yaml (this directory, then parents) - one catalog serves every
|
|
4
4
|
# sub-project in this repo (root, examples/, ...) without duplicating the
|
|
5
5
|
# model/compute/runtime block into each one.
|
|
6
6
|
#
|
|
7
|
-
# What lives here vs. in a project's own
|
|
7
|
+
# What lives here vs. in a project's own gpu.yaml:
|
|
8
8
|
# catalog (this file) -> model identity: which weights, how much VRAM,
|
|
9
9
|
# dtype, tool-call parser - "what varies by model"
|
|
10
|
-
#
|
|
10
|
+
# gpu.yaml -> policy: lifecycle, health, budget, watchdog -
|
|
11
11
|
# "what varies by project", even for the same model
|
|
12
12
|
#
|
|
13
13
|
# Add an entry with `gpu inspect-model <repo> --add-profile <name>`
|