Repository navigation
Description
Summary
Move DeepSeekTextRunner from the legacy ContinuationCache to the component cache (ComponentTextCache). This is the remaining in-tree work on the legacy path, and it covers the scope of cache redesign card 17.
Current state
TextModelRunner::UsesComponentCache() defaults to false (src/ext/text.hpp). Qwen and Qwen Flash-Next override it; DeepSeek does not, so it is the only in-tree model on the legacy cache. Checkpoints are whole-session SessionSnapshot objects, in RAM and on disk.
Serving currently routes by that capability. D1 records a single switch-over with no routing, and card 17 is still marked proposed, so those documents should be updated to match what shipped.
Scope
- Measure and record DeepSeek continuation capacity rows, including committed backing, before writing the adapter. The RFC research has no campaign for this model.
- Inventory
SessionandSessionSnapshotstate: compressed KV pools, sliding windows, indexers, mutable compressor state and DSpark draft state. - Decide for each component whether it is shareable or private. Compressed pools may not have a plain row-per-token geometry; this is the open chunk geometry question in the RFC.
- Implement the adapter for AR and DSpark modes, using
src/models/qwen38_flash_next/continuation_adapter.cppandsrc/models/qwen/continuation_adapter.cppas references. - Audit mutation paths, including session runtime, ROCm graph replay and rollback, and add guard calls on each.
- Override
UsesComponentCache(),CreateComponentCacheResources(),BindComponentState()andReconcileComponentState(), then remove the legacy snapshot and persistence overrides from the runner.
Done when
- Model-local round trips pass for each component, and the next step after restore matches an uninterrupted run in both modes.
- Private bytes per checkpoint, shareable bytes per token, and capture and restore time are recorded at 32k and 100k tokens in both modes.
- The
cacheandlong-contextfunctional suites pass on a real DeepSeek checkpoint for AR and DSpark. - The standard speed benchmark shows no regression against matched
main, per phase.
Notes
- Disk checkpoints in the old format are rebuilt after the change, not read.
- perf(cache): retain reused frontiers and active branch checkpoints #902 changes legacy retention policy, and DeepSeek is the only in-tree model it affects. This migration would replace that path, so the two should be sequenced deliberately.
- DeepSeek v4.1 Flash Support #901 (DeepSeek v4.1 Flash support) may change the session state this adapter has to cover.
- The LFM3 extension is the other known user of the legacy cache: Migrate the LFM3 runner to the component cache lfm3-gufo-extension#1. Deleting
ContinuationCachedepends on both migrations, and on any other out-of-tree runners that still use the default.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
High-prio
Effort
Medium-effort
Model
DeepSeek v4 flash
Activity