Cache-DiT is a PyTorch inference engine for DiT models, with caching, parallel processing, quantization, and CPU offloading. It is for running diffusion-model pipelines with support for systems and hardware such as Diffusers, SGLang Diffusion, vLLM-Omni, ComfyUI, NVIDIA GPUs, Ascend NPUs, and AMD GPUs.
Borrowing it
Nothing to install: this file belongs to vipshop/cache-dit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/vipshop/cache-dit/main/.agents/skills/cache-dit-build-release/SKILL.mdgit clone --depth 1 https://github.com/vipshop/cache-ditWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/vipshop/cache-dit/cache-dit-build-release)<a href="https://agentmods.dev/skills/vipshop/cache-dit/cache-dit-build-release"><img src="https://agentmods.dev/badge/skills/vipshop/cache-dit/cache-dit-build-release/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/vipshop/cache-dit/cache-dit-build-release"><img src="https://agentmods.dev/badge/skills/vipshop/cache-dit/cache-dit-build-release.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00191 | $0.04153 |
| Opus 5.5 | $0.00076 | $0.01661 |
| Sonnet 5.5 | $0.00038 | $0.00831 |
| Haiku 4.5 | $0.00019 | $0.00415 |
Grade A, and why
cache-dit-build-release scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- PyPI 版本不可覆盖:确认 `cache-dit` 上没有 V(`curl -s https://pypi.org/pypi/cache-dit/json`)。 How it starts
The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.
cache-dit 发布(build & release)
一次发布 = 同一个版本号下产出两件东西:PyPI 的纯 Python 包与自建索引上的 SVDQuant CUDA 扩展包。
两者同名同包(cache_dit/),靠 wheel 的 local 版本区分:CUDA 包是 1.5.3+cu13,纯包是 1.5.3。
除版本号 V(如 1.5.4)外无需其它输入;通道 CHANNEL 默认 cu13,除新增 CUDA toolkit 外不要改。
下文所有路径相对 cache-dit 仓库根目录(本机 /workspace/dev/vipshop/cache-dit)。
默认编译全架构(硬性要求,最高优先级) 发布用的 CUDA wheel 必须用
setup.py的默认 arch 集构建,也就是不设CACHE_DIT_RELEASE_ARCH(留空)。 (mini 档的单 arch 仅用于流水线验证、永不发布,不在此列。)setup.py的DEFAULT_CUDA_ARCH_TARGETS本身就是全架构集(CUDA 13 下89,90a,100,120a, 再按 nvcc 版本门限裁剪),即发布集。不要手写 arch 列表、不要收窄:收窄会发出只覆盖部分 GPU 的 wheel,用户装上直接no kernel image is available for execution on the device。 SVDQuant 扩展会自动剔除 sm90a(INT4 kernel 排除 Hopper)、comm 扩展保留 sm90a, 这类差异由setup.py负责,发布层不干预。
产物清单(以 ${V} 为例)
| 产物 | 名称 | 去向 |
|---|---|---|
| CUDA wheel ×4 | cache_dit-${V}+cu13-cp3{11..14}-cp3{11..14}-manylinux_2_38_x86_64.whl(各 ~32 MB) |
Release v${V}+cu13 资产 + gh-pages 索引 whl/cu13/ |
| 纯 Python wheel ×1 | cache_dit-${V}-py3-none-any.whl(~0.5 MB) |
PyPI(Release v${V} 挂 notes;资产可附可不附,见第 4 步) |
| 索引页 | whl/cu13/cache-dit/index.html(PEP 503,每个锚点带 sha256) |
项目 gh-pages 分支根 → vipshop.github.io/cache-dit/ |
安装口径(发布后用户侧):
pip install -U cache-dit # 默认:PyPI 纯 Python 包
pip install cache-dit --extra-index-url https://vipshop.github.io/cache-dit/whl/cu13/ # CUDA 扩展包,如 1.5.3+cu13
注意与 ffpa-attn 的差异:cache-dit 的自建索引只放 cache-dit 一个项目、不带依赖,因此必须用
--extra-index-url(PyPI 保持依赖来源),且要先装 CUDA 13 构建的 torch,详见
references/install-and-index.md。
执行顺序(勿跳步)
0. 预检
git status --porcelain -- src csrc tools setup.py pyproject.toml setup.cfg MANIFEST.in README.md LICENSE
"${CUDA_HOME:-/usr/local/cuda}/bin/nvcc" --version | tail -2 # 需 CUDA 13.x(cu13 flavor 硬性要求)
for e in py311 py312 py313 py314; do \
conda run -n "$e" python -c \
"import sys, packaging, setuptools_scm, torch, wheel; print(sys.version.split()[0], torch.__version__)"; done
command -v ccache patchelf objdump gh twine
gh auth status
gh release view "v${V}+cu13" --repo vipshop/cache-dit # 期望 not found
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago Changed · +1 lines 67deef5a1812
- 6d ago Changed d0df7fa827ee
- 7d ago Changed · +9 lines · +23 tokens per session 270d5759117d
- 21d ago First seen · 175 lines · 168 tokens per session scan A 4216ed354e79
cache-dit-build-release is a skill published in the GitHub repository vipshop/cache-dit (1,300 stars, last pushed today), licensed Apache-2.0. It adds 191 tokens to every session and 4,153 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-17.
cache-dit-build-release compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cache-dit-build-releasevipshop/cache-dit | Skill | 1.3k | today | Apache-2.0 | A | 191 | Claude Code |
| release-announcementpaperclipai/paperclip | Skill | 111k | yesterday | MIT | A | 42 | Claude Code, Codex |
| releasethedotmack/claude-mem | Skill | 114k | today | Apache-2.0 | A | 13 | Claude Code |
| release-notesphuryn/pm-skills | Skill | 28k | 8d ago | MIT | A | 57 | Claude Code |
| multi-agent-release-managerchromium/chromium | Skill | 25k | yesterday | BSD-3-Clause | A | 27 | Claude Code, Codex |
| pack-submitaeonfun/aeon | Skill | 788 | yesterday | MIT | A | 27 | Claude Code, Codex |
| updater_guidesiddsachar/row-bot | Skill | 1.7k | today | Apache-2.0 | A | 22 | Claude Code, Codex |