serving-and-adapters
Plan LoRA merge commands and Gradio inference for Qwen-VL merged or adapter-backed models.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- serving-and-adapters
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Plan LoRA merge commands and Gradio inference for Qwen-VL merged or adapter-backed models.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/adapter-workflows.md1.3 KB
- 参考文档references/inference.md1.0 KB
- 参考文档references/troubleshooting.md1022 B
- 脚本scripts/adapter_command.py3.8 KB
03 SKILL.md 正文
Serving and Adapters
Use this sub-skill for LoRA merge planning, model loading, and Gradio multimodal inference.
Covers
merge_lora_weights.pycommand planning.- LoRA adapter loading and merge behavior.
- Gradio multimodal inference.
- Device, quantization, and generation controls.
- Safe output-path planning for merged checkpoints.
Excludes
- Training loops.
- Dataset schema design.
- Preference or classification training.
Read first
../../references/workflow-map.mdfor route confirmation.../../references/cli-reference.mdfor the serving and merge flag surface.../../references/model-compatibility.mdfor model and backend caveats.../../references/troubleshooting.mdfor serving and merge failures.references/adapter-workflows.mdfor merge/load details.references/inference.mdfor the Gradio launch pattern.scripts/adapter_command.pyfor a safe command builder.
Typical user requests
- "How do I merge a LoRA adapter?"
- "How do I launch the Gradio demo?"
- "Should I load 4-bit or 8-bit for inference?"
- "How do I load a merged checkpoint versus an adapter checkpoint?"
Workflow
- Determine whether the user wants merge or inference.
- Check whether the model is merged, adapter-backed, or a plain base checkpoint.
- Decide whether quantization or a specific device should be used for serving.
- Emit the command with the bundled command builder.
- For merge tasks, verify the output path is explicit before execution.
Decision rules
- Use merged weights for LoRA inference when the user wants the simplest serving path.
- Keep
model-baseexplicit when loading adapter-backed checkpoints. - Treat merge as an output-producing step that should not run accidentally.
- Gradio launch is a network-facing service; keep it as a deliberate action.
Safe command builder
Start with the bundled helper:
python scripts/adapter_command.py merge --help
python scripts/adapter_command.py gradio --help
If you need more detail
Read references/adapter-workflows.md for merge/load notes and references/inference.md for the serving path.
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).