internlm-xcomposer
Guides InternLM-XComposer multimodal inference, composition, fine-tuning, reward-model, OmniLive, evaluation, and related-project workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- internlm-xcomposer
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Guides InternLM-XComposer multimodal inference, composition, fine-tuning, reward-model, OmniLive, evaluation, and related-project workflows.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/installation.md5.6 KB
- 参考文档references/overview.md3.1 KB
- 参考文档references/repo-provenance.md2.8 KB
- 参考文档references/repo-routing-metadata.json557 B
- 参考文档references/troubleshooting.md4.2 KB
- 脚本scripts/check_environment.py3.8 KB
03 SKILL.md 正文
InternLM-XComposer
Use this repo skill when a user asks about the InternLM-XComposer family of model workflows: legacy 1.0/2.0 chat and evaluation, current 2.5 chat/composition and LMDeploy 4-bit paths, supervised fine-tuning, reward-model training and scoring, OmniLive audio/video/memory services, or related benchmark/project workflows.
This repository is a model/workflow collection rather than a single importable root package. Install only the dependencies needed for the selected route, then follow the nearest sub-skill plus its bundled references/scripts. Several repaired routes also include source-derived runnable bundles under sub-skills/*/entrypoints/; use those for approved execution instead of depending on the original checkout.
Route map
model-inference— Transformers chat/composition, multi-GPU dispatch, 4-bit/LMDeploy, Gradio, and legacy inference compatibility.finetuning— supervised fine-tuning, LoRA, adapter merge, and data-manifest validation.reward-model— reward scoring/comparison/ranking, preference data, and reward training/evaluation.omnilive— audio, video-memory, SRS/FastAPI/Gradio deployment planning, and OmniLive benchmarks.evaluation-and-projects— benchmark planning plus ShareGPT4V and DualFocus package/evaluation routing.
Install guidance
There is no single root editable install. Use the workflow-specific dependencies for the sub-skill you are following:
- Base XComposer 2.5 inference:
torch,transformers,timm,sentencepiece,gradio,markdown2,xlsxwriter,einops. - Multi-GPU dispatch: add
accelerate. - 4-bit / LMDeploy: add
lmdeployand a CUDA-compatible wheel. - Fine-tuning: add
deepspeedandpeft; some setups also needflash-attn. - Reward-model training/evaluation: add
peft,deepspeed,pandas,pyarrow, and the benchmark-specific data tools if you are actually running the benchmark. - OmniLive audio/video: add
swift,decord,fastapi,gradio, and the model/runtime pieces named in the OmniLive references. - Related project packages: install from their own
pyproject.tomldirectories when you choose theevaluation-and-projectsroute.
A safe generic check after installing a chosen workflow is:
python scripts/check_environment.py --modules torch,transformers
If you are using projects/ShareGPT4V or projects/DualFocus, read their sub-skill references for the package-specific install commands before creating or mutating an environment.
What to read first
- Read
references/overview.mdfor the model-family and route summary. - Read
references/installation.mdfor workflow-specific dependency guidance. - Read
references/troubleshooting.mdwhen imports, CUDA,trust_remote_code, or data/layout issues appear. - Read
references/repo-provenance.mdbefore deciding whether this skill matches the current checkout or before refreshing it.
Minimal usage pattern
- Choose the sub-skill that matches the user request.
- Install the dependencies that sub-skill needs.
- Run the bundled helper scripts from that sub-skill when available.
- If the task has explicit execution approval, prefer bundled
entrypoints/wrappers over source checkout scripts for finetuning, reward training, Gradio, OmniLive merge, and OmniLive services. - Use the sub-skill references for command shapes, data formats, and troubleshooting.
Notes
- Future agents should not depend on the original source checkout still existing.
- Runtime links should stay inside this skill tree.
- Heavy model downloads, benchmark runs, and long training jobs remain user-executed actions outside the static skill 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).