Pre-run cost estimate for a GPU task from static code analysis; the code is never executed.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Run your training script on a remote GPU. Nothing more.
Krauncher is a minimal Python library for researchers who have a working local script and need a GPU β not a platform.
Website & API keys: krauncher.com
Requires Python 3.11+.
The decorated function becomes async: calling it submits the task and
returns a TaskHandle; awaiting the handle (or await handle.wait(...))
returns a TaskResult.
Using an LLM / coding agent? Read AGENTS.md β a single accurate reference of the API, parameters, result fields, errors and constraints. Runnable examples live in tutorial/.
Serverless orchestration platforms are genuinely impressive pieces of infrastructure. They handle container builds, secret management, artifact storage, scheduling, persistent volumes, and team dashboards.
They also charge you for all of it β whether you use it or not.
If you're fine-tuning a small model, running ablations, or iterating on a research experiment with a dataset under 2 GB, you're likely paying for an orchestration layer you don't need.
Krauncher does less, on purpose. It runs your existing Python function on a remote GPU, returns the result, and gets out of the way.
Good fit:
Not the right tool if:
Add a decorator. Await your function. Get a result. Your existing code doesn't change β no base images, no volume mounts, no platform imports.
The decorated function is async β always call it from an
asynccontext andawaitthe handle (which submits and waits). See the Quickstart for the canonical shape.
| Decorator argument | Effect |
|---|---|
vram_gb=24 | Require at least 24 GB VRAM |
gpu_name="H100" | Require a specific model (case-insensitive substring) |
gpu_arch="Ada" | Require a GPU architecture |
(omit vram_gb) | Auto-classify: the analyzer inspects your code and picks the VRAM tier for you |
Leaving vram_gb unset is the recommended default β Krauncher analyzes your
code statically and sizes the GPU automatically.
Krauncher doesn't store anything. Your API key and training code are encrypted on your machine before leaving it, and decrypted only inside the ephemeral worker. The relay that routes your jobs cannot read the payload β it doesn't have the keys.
| What | Visible to Krauncher |
|---|---|
| Your storage credentials | No |
| Your training code | No |
| Your model weights/outputs | No |
| Job timing and GPU type | Yes |
Storage keys are part of that: the S3 / HuggingFace credentials a task needs
(AWS_*, HF_TOKEN) are read from your environment and travel sealed inside
the same payload as the code, straight to the worker. Set
CAS_SEND_CREDENTIALS=false to attach none.
This isn't a feature we added. It's a consequence of not wanting to be in the data custody business. E2E encryption is mandatory β there is no opt-out.
Tasks with the same group_id are routed to the same physical host, so
whatever your first run downloaded to local NVMe is still there for the next.
For larger or registered datasets, use the data bridge (data_urls= /
data=), which downloads into /data inside the sandbox β see
tutorial/06 and
tutorial/15.
await client.run_code(code, inputs={...}, outputs=[...]) runs a code string instead of a decorated function: named
local values go in, named variables come back (JSON-safe, 16 MB budget). This
is the primitive the krauncher-jupyter %%krauncher magic is built on. See
tutorial/50.group = await client.group(task_a, task_b) derives a
shared-requirements envelope (VRAM floor, GPU pins, disk) from the tasks and
keeps them on one warm worker; submit with await group.submit(task, ...).
See tutorial/52.files={"input.csv": b"..."} when calling the
task and set artifacts=True to get back what it wrote beside itself
(result.artifacts, result.download("received")). Both directions ride the
encrypted payload β no storage to configure. See
tutorial/54.await client.estimate_code(code, ...) returns the classification without
submitting, and run_code(code, ..., classification=...) then executes
without a second analysis. CAS_ESTIMATE_ONLY=true does the same for
decorated tasks; POST /api/estimate returns per-GPU predicted time and cost.After a task completes, the broker keeps a structured record β the same one the web UI renders on the task detail page.
get_task returns status, timing breakdown (queue / download / pip / setup /
execution), classification, costs, GPU and worker specs, and the result.
get_task_report adds an extended report field: peak/average GPU
utilization, peak VRAM, the actual GPU's hardware specs, and an estimated
time/cost comparison across all known GPUs at the worker's measured host
capabilities. It is intended as feedback for an LLM author of the user
code β pure data, no interpretation.
Numbered, runnable tutorials in tutorial/:
| # | File | Demonstrates |
|---|---|---|
| 01 | 01_remote_simple.py | Minimal submit + await |
| 02 | 02_remote_with_deps.py | pip= dependencies in the sandbox |
| 03 | 03_error_handling.py | Catching TaskError / remote tracebacks |
| 04 | 04_timeout.py | Execution timeout behaviour |
| 05 | 05_task_groups.py | group_id host affinity |
| 06 | 06_data_bridge.py | data_urls= downloads into /data |
| 09 | 09_streaming_logs.py | Live logs via wait(on_log=...) |
| 10 | 10_progress_bar.py | Progress reporting |
| 11 | 11_e2e_encryption.py | End-to-end encryption |
| 12 | 12_helper_functions.py | Shipping helper functions with the task |
| 13 | 13_bert_finetune.py | Real ML code β analyzer classification |
| 15 | 15_data_sources_s3.py | Registered S3 data sources |
| 17 | 17_multiphase_training.py | Multi-phase training in one group |
| 18 | 18_resnet152_food101.py | ResNet-152 on Food-101 |
| 19 | 19_huggingface_dataset.py | HuggingFace dataset bridge |
| 20 | 20_bert_imdb.py | BERT fine-tuning on IMDB |
| 21 | 21_qwen25_7b_lora_alpaca.py | Qwen2.5-7B LoRA fine-tuning |
| 22 | 22_qwen25_7b_inference_gsm8k.py | Qwen2.5-7B inference |
| 23 | 23_gnn_node_classification_cora.py | GCN node classification |
| 30+ | 30_β¦β36_β¦ | LLM inference and batched inference |
| 50 | 50_run_code_values.py | run_code with named in/out values |
| 52 | 52_group_envelope.py | client.group() multi-phase envelope |
| 53 | 53_hf_native.py | HuggingFace-native auto pre-fetch |
| 54 | 54_artifact_roundtrip.py | Files in / artifacts out |
Requires Python 3.11+.
MIT
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/krauncher-analyzer)<a href="https://allmcps.com/mcp/krauncher-analyzer"><img src="https://allmcps.com/api/badge/krauncher-analyzer?style=directory" alt="Krauncher analyzer on AllMCPs" /></a>