[NVIDIA][AgentX] Kimi-K3 B300 TP8 sweep with lazy DRAM KV offload / [NVIDIA][AgentX] Kimi-K3 B300 TP8 惰性 DRAM KV 卸载扫描 by Oseltamivir · Pull Request #4362 · SemiAnalysisAI/InferenceX · GitHub
Skip to content

[NVIDIA][AgentX] Kimi-K3 B300 TP8 sweep with lazy DRAM KV offload / [NVIDIA][AgentX] Kimi-K3 B300 TP8 惰性 DRAM KV 卸载扫描 - #4362

Open
Oseltamivir wants to merge 2 commits into
mainfrom
kimik3-b300-tp8-1p5tb-lazy
Open

Oseltamivir wants to merge 2 commits into
mainfrom
kimik3-b300-tp8-1p5tb-lazy

Conversation

@Oseltamivir

Copy link
Copy Markdown
Collaborator

Lazy-offload variant of #4349 (1.5 TB, eager). In #4348/#4349 the DRAM tier served almost nothing even though 1.5 TB holds each run's entire reusable KV ~3.7× over: GPU + CPU hits stayed 15–39 points below the theoretical ~96% at conc 48–64. The leading, unverified explanation is that eager mode rarely lands Kimi-K3's KDA state for a block boundary in DRAM (mamba "align" mode frees the previous state block each step, and the eager store skips freed blocks), so CPU hits that need that state never match. Lazy mode copies cached blocks from the GPU evictable queue just before eviction, which includes freed-but-still-hashed state blocks.

#4348, #4349, #4361 and this PR all edit the same config entry; only one can merge as is.

中文

#4349(1.5 TB,eager)的惰性卸载版本。在 #4348/#4349 中,尽管 1.5 TB 足以容纳每次运行全部可复用 KV 约 3.7 倍,DRAM 层几乎没有提供命中:conc 48–64 时 GPU + CPU 命中率仍比理论值约 96% 低 15–39 个百分点。目前主要但未经验证的解释是:eager 模式很少把 Kimi-K3 在块边界处的 KDA 状态写入 DRAM(mamba "align" 模式每一步都会释放上一个状态块,而 eager 存储会跳过已释放的块),因此需要该状态的 CPU 命中无法匹配。惰性模式在驱逐前从 GPU 可驱逐队列复制已缓存块,其中包括已释放但仍带哈希的状态块。

#4348、#4349、#4361 与本 PR 修改同一配置条目,按现状只能合并其中一个。

AI model disclosure
  • claude-opus-5-5 (Claude Opus 5.5): config and recipe changes, changelog entry, PR description.

🤖 Generated with Claude Code

Same as the 1.5 TB eager run except lazy_offload: true, which copies cached
blocks from the GPU evictable queue before eviction instead of every computed
block.

与 1.5 TB eager 运行相同,但设置 lazy_offload: true:在驱逐前从 GPU 可驱逐队列
复制已缓存块,而不是复制每个计算完成的块。
将 perf-changelog 条目链接到 #4362。
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution!

  • Review: If this PR changes files owned by someone other than a repository admin or @SemiAnalysisAI/core, ask one eligible CODEOWNER to complete the latest PR_REVIEW_CHECKLIST.md before contacting a core maintainer on Slack. Follow the template exactly, including As a PR reviewer and CODEOWNER, I have reviewed this and have, so sign-off verification triggers.
  • PR verification: Sweeps run only when the PR appends an inferencex-e2e/perf-changelog.yaml entry and carries exactly one primary label: full-sweep-fail-fast (strongly recommended; canary plus per-matrix fail-fast), full-sweep-enabled (canary; matrix jobs continue after a failure), or non-canary-full-sweep-enabled (no canary or fail-fast). The modifiers all-evals, evals-only, and agentx-fast require a primary label. On fork PRs, a maintainer applies the label. See sweep labels and reuse.
  • After merging: PR authors must ensure all GitHub Actions jobs pass. Transient failures often pass on rerun; see how to rerun failed jobs.
中文

感谢你的贡献!

  • **审阅:**如果 PR 修改的文件归属于仓库管理员及 @SemiAnalysisAI/core 之外的 CODEOWNER,请先联系一位有资格的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,再通过 Slack 联系核心维护者。必须严格遵循模板,并保留 As a PR reviewer and CODEOWNER, I have reviewed this and have,才能触发签核验证。
  • **PR 验证:**只有当 PR 在 inferencex-e2e/perf-changelog.yaml 末尾追加了条目,并且恰好带有一个主标签时,才会运行扫描:full-sweep-fail-fast(强烈推荐;canary 加逐矩阵 fail-fast)、full-sweep-enabled(有 canary;矩阵任务在失败后继续运行)或 non-canary-full-sweep-enabled(无 canary,也无 fail-fast)。修饰标签 all-evals、evals-only 和 agentx-fast 必须与主标签一起使用。fork PR 的标签由维护者添加。参见扫描标签与复用。
  • **合并后:**PR 作者必须确保所有 GitHub Actions 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明。

@Oseltamivir Oseltamivir added full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) and removed full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) labels Oct 21, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Besides the inline finding, I checked three other things and they hold up. The recipe's override_cN variants (1, 4, 16, 24, 32, 40, 48, 56, 64) match the new conc-list. The per-rank cpu_bytes_to_use_per_rank equals 1499 GB divided by 8. Nothing else in the repo still references kimik3-b300-mooncake.sh, and the { name: vllm-simple } with no version follows existing entries.

Extended reasoning...

This change swaps the Kimi-K3 B300 single-node AgentX recipe from Mooncake to SimpleCPUOffloadConnector in lazy mode. It also deletes the old setup script and its INSTALLERS entry. It is config only and touches no security-sensitive code. The note records the recipe-to-master consistency checks that were made beyond the inline changelog finding.

Comment thread inferencex-e2e/perf-changelog.yaml Outdated
- "Lower dram-utilization from 0.75 to 0.5 (total-cpu-dram-gb 2249 -> 1499, cpu_bytes_to_use_per_rank 187375000000)."
- "Drop prefix-match-unit 128: SimpleCPUOffloadConnector asserts CPU cache hits are scheduler-block aligned, and 128-token KDA partial hits killed the engine."
- "Sweep concurrency 1, 4, 16, 24, 32, 40, 48, 56 and 64: drop conc 2, 8 and 70 and add conc 64 (max-num-seqs 128)."
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/TBD

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 nit (optional): If this merges as is, the permanent changelog record links to pull/TBD, not this PR. That link is dead. The file is append-only, so it cannot be corrected after merge. Fix: before merge, set pr-link to this PR's real number.

Why this was flagged

The new block at inferencex-e2e/perf-changelog.yaml:10505 sets pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/TBD. AGENTS.md:140 calls the file append-only and byte-sensitive and says to keep every existing byte, so a merged placeholder cannot be fixed by a later PR. The schema at infx/matrix/validation.py:1069 types pr_link only as str, so nothing rejects the placeholder. Anyone tracing the kimik3-fp4-b300-vllm-agentic-dspark result change back to its PR from this entry reaches a dead link. Earlier pull/XXX entries (lines 5598, 9727, 10290) show this has slipped through before, which is precedent, not a safeguard.

Verification: nit. Triggered when this PR merges with the block as written. The new entry at inferencex-e2e/perf-changelog.yaml:10505 has pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/TBD, which is a dead link, and the pydantic schema (infx/matrix/validation.py:1069, pr_link: str) does not reject it. A plain GitHub merge lands the dead link on main.

@github-actions

Copy link
Copy Markdown
Contributor

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended)

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant