inference
Use rag_retrieval Reranker inference APIs to score query-document pairs, rerank passages, inspect RankedResults, and debug model_type/device/dtype issues.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- inference
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Use rag_retrieval Reranker inference APIs to score query-document pairs, rerank passages, inspect RankedResults, and debug model_type/device/dtype issues.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md6.4 KB
- 参考文档references/troubleshooting.md6.7 KB
- 参考文档references/workflows.md7.0 KB
- 脚本scripts/reranker_api_smoke.py6.0 KB
03 SKILL.md 正文
rag-retrieval inference
Use this sub-skill when a task asks to use the installed rag_retrieval reranker, score query-document pairs, rerank RAG passages, choose a reranker model_type, interpret RankedResults, or debug inference failures for BGE, BCE, Gemma, MiniCPM, or ColBERT-named rerankers.
Fast routing
- Start with API reference for constructor signatures, model type mappings, return objects, and current limitations.
- Use workflows for copy-ready scoring, reranking, long-document, LLM prompt, cutoff-layer, and no-download validation patterns.
- Use troubleshooting when
model_typeis unsupported, ColBERT fails, downloads start unexpectedly, devices/dtypes misbehave, queries are too long, empty docs return a dict, BCE scores look normalized, LLM prompt/cutoff behavior is unclear, or Pydantic warnings appear.
Scope
This sub-skill covers inference only: rag_retrieval.Reranker, cross-encoder rankers, LLM rankers, automatic model-type inference, query-document scoring, document reranking, long-document strategies, normalization, LLM prompt/cutoff-layer behavior, result helpers, and safe no-download environment checks.
Do not use this sub-skill for embedding training, reranker fine-tuning, or ColBERT training. Route those requests to sibling training sub-skills when present. Also do not promise ColBERT inference support: the current package has a colbert mapping name, but the ColBERT ranker is not registered or implemented for inference in the installed surface.
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).