x-turing
Route xTuring dataset preparation, model loading and inference, fine-tuning and DPO alignment, CLI/API/UI serving, and evaluation workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- x-turing
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Route xTuring dataset preparation, model loading and inference, fine-tuning and DPO alignment, CLI/API/UI serving, and evaluation workflows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/repo-provenance.md1.3 KB
- 参考文档references/repo-routing-metadata.json562 B
- 参考文档references/source-script-inventory.md2.6 KB
- 参考文档references/troubleshooting.md3.3 KB
- 脚本scripts/check_xturing_environment.py5.3 KB
03 SKILL.md 正文
xTuring
Use this skill for the public xTuring package (xturing) when you need to prepare data, choose or load models, fine-tune or align a causal model, serve the model through CLI/API/UI, or run the built-in evaluation scaffold.
Install and smoke-check
Install from the repository root:
pip install -e .
If you need the full training, quantization, or provider stack, make sure the environment can satisfy the package dependencies in pyproject.toml and the backend notes in the troubleshooting guide.
Quick import smoke:
python -I -c "import importlib.metadata as md; import xturing; from xturing.models import BaseModel; from xturing.datasets import TextDataset, InstructionDataset, PreferenceDataset; from xturing.evaluation import LMEvalAdapter; print(md.version('xturing'))"
For a broader readiness check, run scripts/check_xturing_environment.py.
Route to the right sub-skill
| Task family | Start here | Notes |
|---|---|---|
| Dataset construction, validation, Alpaca conversion, or self-instruct generation | sub-skills/data-prep-and-generation/SKILL.md |
Use for TextDataset, InstructionDataset, PreferenceDataset, JSONL, and API-backed data generation. |
| Model choice, load/save, generation, hub paths, or registry lookup | sub-skills/models-and-inference/SKILL.md |
Use for BaseModel.create, BaseModel.load, generate, and model catalog questions. |
| SFT fine-tuning, LoRA, quantized variants, or DPO alignment | sub-skills/training-and-alignment/SKILL.md |
Use for model.finetune(...), model.dpo_finetune(...), and trainer config issues. |
xturing chat, xturing api, xturing ui, or FastAPI/Gradio behavior |
sub-skills/cli-api-ui/SKILL.md |
Use for terminal chat, the API server, and the playground UI. |
| Perplexity scoring or adapter-based evaluation artifacts | sub-skills/evaluation/SKILL.md |
Use for model.evaluate(...), run_eval_adapter(...), and JSON result persistence. |
Shared notes
- The package name is
xturing; the public repo skill id isx-turing. references/repo-provenance.mdrecords the source commit and package snapshot used to generate this skill.references/troubleshooting.mdcollects cross-cutting install, import, optional dependency, and backend issues.references/source-script-inventory.mdlists the source examples and maintenance helpers that were distilled into bundled skill helpers or references.references/repo-routing-metadata.jsonis consumed by the repo-skill router during later import or refresh flows.
When you are unsure
- If the request mentions a dataset schema, start with the data-prep skill.
- If it mentions a model key, checkpoint, or
generate(...), start with the model skill. - If it mentions LoRA, CPU int8, k-bit, or DPO, start with the training skill.
- If it mentions a command-line or HTTP route, start with the CLI/API/UI skill.
- If it mentions perplexity or
EvalRunResult, start with the evaluation skill.
Do not depend on the original repository checkout for any runtime guidance; use the bundled references and scripts inside this skill tree instead.
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).