serving
Guide Otter controller, worker, Gradio, local CLI, endpoint, import, port, and load-bit serving workflows.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- serving
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Guide Otter controller, worker, Gradio, local CLI, endpoint, import, port, and load-bit serving workflows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md3.8 KB
- 参考文档references/serving-topology.md5.8 KB
- 参考文档references/troubleshooting.md5.5 KB
- 脚本scripts/build_serving_commands.py5.6 KB
- 脚本scripts/check_serving_imports.py4.6 KB
03 SKILL.md 正文
Otter serving sub-skill
Use this sub-skill when the task is to expose Otter or Flamingo generation through a local controller/worker service, Gradio image/video UI, direct text-generation CLI, or HTTP streaming endpoint.
Route here for
- Controller, model-worker, Gradio image UI, Gradio video UI, worker registration, heartbeats, and queue dispatch.
- Model-worker options such as
--checkpoint_path,--model_name,--num_gpus,--load_bit, controller/worker URLs, and concurrency. - Streaming request payloads containing
prompt, optional base64 image/video frames, andgeneration_kwargs. - Debugging known serving import problems, dependency/version issues, missing constants, bad ports, registration failures, and GPU/load-bit problems.
- Local text-only CLI generation with
--model-name,--device,--num-gpus, and conversation templates.
Route away
- Ad hoc package/API inference or YAML batch prompt files: model-inference.
- Training, finetuning, Accelerate/DeepSpeed, and checkpoint save cadence: training.
- Benchmark configs and evaluator registries: benchmark-evaluation.
- MIMIC-IT data conversion, Syphus, and schema validation: data-preparation.
Operating workflow
- Decide whether the user needs a three-process web demo, a direct local CLI, or endpoint/API debugging.
- Read serving topology for controller, worker, Gradio, and local CLI roles.
- Generate safe command templates with build_serving_commands.py. The helper prints commands only; it never starts servers or loads models.
- Before launching anything, run check_serving_imports.py in the target environment. Use
--repo-rootonly when the user is working in an Otter checkout and wants checkout-specific diagnostics. - For endpoint shapes and worker payloads, read API reference.
- For failures involving
pipeline.constants, Gradio versions, worker registration, GPU memory, image payloads, or stalled streaming, use troubleshooting.
Quick reference map
| Need | Start with |
|---|---|
| Three-process controller + worker + Gradio plan | serving topology |
| Generate commands with custom ports/model path | build_serving_commands.py |
| Check imports without starting services | check_serving_imports.py |
| Understand controller/worker endpoints | API reference |
Diagnose missing pipeline.constants or flamingo import |
troubleshooting |
Choose fp16, bf16, int8, int4, or fp32 |
serving topology |
Safety boundary
Serving launches long-running processes, opens network ports, can download or load large checkpoints, and may allocate multiple GPUs. Do not start controller, worker, Gradio, or Flask services unless the user supplies the model/checkpoint, host/port policy, GPU budget, and explicit permission to launch them.
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).