bentoml
Use BentoML to author model-serving Services, build and containerize Bentos, run HTTP/gRPC servers and clients, manage models, operate the CLI and BentoCloud, and configure observability or production runtime behavior. Use when tasks mention BentoML, bentoml service.py, bentofile.yaml, Bento build/serve/deploy, BentoCloud, or BentoML model stores.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- bentoml
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use BentoML to author model-serving Services, build and containerize Bentos, run HTTP/gRPC servers and clients, manage models, operate the CLI and BentoCloud, and configure observability or production runtime behavior. Use when tasks mention BentoML, bentoml service.py, bentofile.yaml, Bento build/serve/deploy, BentoCloud, or BentoML model stores.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/repo-provenance.md1.9 KB
- 参考文档references/repo-routing-metadata.json413 B
- 参考文档references/troubleshooting.md4.0 KB
03 SKILL.md 正文
BentoML
Use this repo skill for BentoML, a Python framework for building, serving, packaging, and deploying AI/model inference APIs. This root skill is a router: read the focused sub-skill that matches the user’s task, then use its bundled references and scripts.
First Checks
- Install:
pip install -U bentoml; optional extras includebentoml[grpc],bentoml[io],bentoml[tracing-otlp],bentoml[monitor-otlp], and framework-specific packages needed by the user’s model. - Import check:
python -c "import bentoml; print(bentoml.__version__)". - CLI check:
bentoml --helpandbentoml env. - Provenance check: read
references/repo-provenance.mdbefore deciding whether this skill is stale for a current checkout. - Troubleshooting: read
references/troubleshooting.mdfor cross-cutting install/import, CLI, environment, optional dependency, and cloud safety issues.
Route The Task
| User task | Use this sub-skill | Typical triggers |
|---|---|---|
Write or debug service.py, APIs, tasks, batching, lifecycle hooks, ASGI/Gradio/WebSocket/streaming, IO specs, runtime image hints |
sub-skills/service-authoring/SKILL.md |
@bentoml.service, @bentoml.api, @bentoml.task, bentoml.importing, service import target, API schema |
Build a Bento, author bentofile.yaml, include/exclude files, configure build dependencies/images, local Bento store, Docker/containerize |
sub-skills/packaging-and-containerization/SKILL.md |
bentoml build, bentofile.yaml, bentoml.build, containerize, .bentoignore, build context |
| Run a local server or call endpoints using Python clients, curl/OpenAPI, HTTP/gRPC, streaming, WebSocket, server flags | sub-skills/serving-and-clients/SKILL.md |
bentoml serve, bentoml.serve, SyncHTTPClient, AsyncHTTPClient, port, host, reload, gRPC |
| Save/load/list/import/export models and choose framework helpers or optional dependencies | sub-skills/model-management/SKILL.md |
bentoml.models, model tags, Model Store, sklearn/pytorch/transformers/mlflow/xgboost helpers, missing model |
| Use CLI command families or BentoCloud login/deploy/deployment/secret/api-token/codespace/push/pull workflows | sub-skills/cli-and-cloud/SKILL.md |
bentoml deploy, bentoml deployment, bentoml cloud, secrets, tokens, context, cluster, BentoCloud |
| Configure logging, metrics, tracing, monitoring, resources, scaling, gateways, testing, config files, production diagnostics | sub-skills/observability-and-operations/SKILL.md |
metrics missing, tracing, config YAML, GPU resources, workers, autoscaling, gateways, production readiness |
Common End-To-End Flow
- Author a Service with
sub-skills/service-authoring/SKILL.md; validate the import target before serving. - Serve locally and call endpoints with
sub-skills/serving-and-clients/SKILL.md; keep server/client debugging separate from service authoring. - Package with
sub-skills/packaging-and-containerization/SKILL.md; validatebentofile.yamlorbentoml.build(...)options before expensive builds. - Use
sub-skills/model-management/SKILL.mdwhen the workflow needs saved model tags, framework helpers, or model inclusion in a Bento. - Deploy or manage cloud resources with
sub-skills/cli-and-cloud/SKILL.md; treat credentialed and destructive operations as explicit user-run or user-approved actions. - Add telemetry, resources, scaling, config, and production validation with
sub-skills/observability-and-operations/SKILL.md.
Safe Bundled Helpers
sub-skills/service-authoring/scripts/create_minimal_service.pygenerates a starter service file.sub-skills/service-authoring/scripts/validate_service_target.pyimports and inspects a service target without serving it.sub-skills/packaging-and-containerization/scripts/validate_bentofile.pystatically checks abentofile.yaml.sub-skills/serving-and-clients/scripts/serve_command_builder.pyconstructs dry-runbentoml servecommands.sub-skills/model-management/scripts/check_framework_extra.pychecks optional framework imports.sub-skills/cli-and-cloud/scripts/inspect_bentoml_cli.pyrenders safe CLI help without contacting BentoCloud.sub-skills/observability-and-operations/scripts/check_observability_config.pychecks local config shapes without external collectors.
Side-Effect Boundaries
- Safe by default: import checks, CLI help, static YAML/config validation, command construction, and read-only local store inspection.
- Potentially mutating:
bentoml build, model save/delete/import/export, local store changes, config writes, and server startup. - External or credentialed:
bentoml deploy,cloud,deployment,secret,api-token,push,pull, Docker/container builds, OTLP/exporter endpoints, and cloud scaling changes. - Expensive or environment-specific: framework model downloads, GPU workloads, large image builds, long-running servers, and integration tests requiring Docker/cloud credentials.
Version Notes
This skill was generated from BentoML source commit 73c4dbead99be6515fa25fcd91e348ac30f5c22e on branch main and installed package version 0.0.0.post1+g73c4dbead. If the current checkout, package version, CLI flags, or public SDK signatures differ, run a DisCo refresh before relying on detailed guidance.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).