axolotl by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill axolotl基于官方文档生成的 Axolotl 开发综合助手。
此技能应在以下场景触发:
模式 1: 要验证训练任务是否存在可接受的数据传输速度,运行 NCCL 测试可以帮助定位瓶颈,例如:
./build/all_reduce_perf -b 8 -e 128M -f 2 -g 3
模式 2: 在 Axolotl yaml 中配置模型以使用 FSDP。例如:
fsdp_version: 2
fsdp_config:
offload_params: true
state_dict_type: FULL_STATE_DICT
auto_wrap_policy: TRANSFORMER_BASED_WRAP
transformer_layer_cls_to_wrap: LlamaDecoderLayer
reshard_after_forward: true
模式 3: context_parallel_size 应是 GPU 总数的除数。例如:
context_parallel_size
模式 4: 例如:- 使用 8 个 GPU 且无序列并行:每步处理 8 个不同的批次 - 使用 8 个 GPU 且 context_parallel_size=4:每步仅处理 2 个不同的批次(每个批次在 4 个 GPU 上拆分) - 如果每个 GPU 的 micro_batch_size 为 2,全局批次大小将从 16 减少到 4
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
context_parallel_size=4
模式 5: 在配置中设置 save_compressed: true 可以启用以压缩格式保存模型,这将:- 减少约 40% 的磁盘空间使用 - 保持与 vLLM 的兼容性以加速推理 - 保持与 llmcompressor 的兼容性以进行进一步优化(例如:量化)
save_compressed: true
模式 6: 注意:无需将集成放置在 integrations 文件夹中。它可以位于任何位置,只要安装在 Python 环境中的包内即可。请参阅此仓库作为示例:https://github.com/axolotl-ai-cloud/diff-transformer
integrations
模式 7: 处理单样本和批处理数据。- 单样本:sample['input_ids'] 是 list[int] - 批处理数据:sample['input_ids'] 是 list[list[int]]
utils.trainer.drop_long_seq(sample, sequence_len=2048, min_sequence_len=2)
示例 1 (python):
cli.cloud.modal_.ModalCloud(config, app=None)
示例 2 (python):
cli.cloud.modal_.run_cmd(cmd, run_folder, volumes=None)
示例 3 (python):
core.trainers.base.AxolotlTrainer(
*_args,
bench_data_collator=None,
eval_data_collator=None,
dataset_tags=None,
**kwargs,
)
示例 4 (python):
core.trainers.base.AxolotlTrainer.log(logs, start_time=None)
示例 5 (python):
prompt_strategies.input_output.RawInputOutputPrompter()
此技能包含 references/ 目录下的综合文档:
需要详细信息时,使用 view 命令读取特定的参考文件。
从 getting_started 或 tutorials 参考文件开始,了解基础概念。
使用相应类别的参考文件(api、guides 等)获取详细信息。
上面的快速参考部分包含了从官方文档中提取的常用模式。
从官方来源提取的组织化文档。这些文件包含:
在此处添加用于常见自动化任务的辅助脚本。
在此处添加模板、样板文件或示例项目。
要使用更新的文档刷新此技能:
每周安装次数
160
仓库
GitHub 星标数
23.4K
首次出现时间
2026 年 1 月 21 日
安全审计
已安装于
claude-code134
opencode129
gemini-cli122
cursor121
codex110
antigravity107
Comprehensive assistance with axolotl development, generated from official documentation.
This skill should be triggered when:
Pattern 1: To validate that acceptable data transfer speeds exist for your training job, running NCCL Tests can help pinpoint bottlenecks, for example:
./build/all_reduce_perf -b 8 -e 128M -f 2 -g 3
Pattern 2: Configure your model to use FSDP in the Axolotl yaml. For example:
fsdp_version: 2
fsdp_config:
offload_params: true
state_dict_type: FULL_STATE_DICT
auto_wrap_policy: TRANSFORMER_BASED_WRAP
transformer_layer_cls_to_wrap: LlamaDecoderLayer
reshard_after_forward: true
Pattern 3: The context_parallel_size should be a divisor of the total number of GPUs. For example:
context_parallel_size
Pattern 4: For example: - With 8 GPUs and no sequence parallelism: 8 different batches processed per step - With 8 GPUs and context_parallel_size=4: Only 2 different batches processed per step (each split across 4 GPUs) - If your per-GPU micro_batch_size is 2, the global batch size decreases from 16 to 4
context_parallel_size=4
Pattern 5: Setting save_compressed: true in your configuration enables saving models in a compressed format, which: - Reduces disk space usage by approximately 40% - Maintains compatibility with vLLM for accelerated inference - Maintains compatibility with llmcompressor for further optimization (example: quantization)
save_compressed: true
Pattern 6: Note It is not necessary to place your integration in the integrations folder. It can be in any location, so long as it’s installed in a package in your python env. See this repo for an example: https://github.com/axolotl-ai-cloud/diff-transformer
integrations
Pattern 7: Handle both single-example and batched data. - single example: sample[‘input_ids’] is a list[int] - batched data: sample[‘input_ids’] is a list[list[int]]
utils.trainer.drop_long_seq(sample, sequence_len=2048, min_sequence_len=2)
Example 1 (python):
cli.cloud.modal_.ModalCloud(config, app=None)
Example 2 (python):
cli.cloud.modal_.run_cmd(cmd, run_folder, volumes=None)
Example 3 (python):
core.trainers.base.AxolotlTrainer(
*_args,
bench_data_collator=None,
eval_data_collator=None,
dataset_tags=None,
**kwargs,
)
Example 4 (python):
core.trainers.base.AxolotlTrainer.log(logs, start_time=None)
Example 5 (python):
prompt_strategies.input_output.RawInputOutputPrompter()
This skill includes comprehensive documentation in references/:
Use view to read specific reference files when detailed information is needed.
Start with the getting_started or tutorials reference files for foundational concepts.
Use the appropriate category reference file (api, guides, etc.) for detailed information.
The quick reference section above contains common patterns extracted from the official docs.
Organized documentation extracted from official sources. These files contain:
Add helper scripts here for common automation tasks.
Add templates, boilerplate, or example projects here.
To refresh this skill with updated documentation:
Weekly Installs
160
Repository
GitHub Stars
23.4K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code134
opencode129
gemini-cli122
cursor121
codex110
antigravity107
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
152,900 周安装