Skip to content

feat(deepseek_v41): defer activation-recompute decision to the V4.1 b… - #205

Merged
tastelikefeet merged 1 commit into
modelscope:mainfrom
tastelikefeet:feat/deepseek-v41-engram-recompute
Sep 22, 2026
Merged

tastelikefeet merged 1 commit into
modelscope:mainfrom
tastelikefeet:feat/deepseek-v41-engram-recompute

Conversation

@tastelikefeet

Copy link
Copy Markdown
Collaborator

…ackbone

Engram's _validate_unsupported_features rejects any activation recomputation, a guard that predates the V4.1 hybrid backbone. That backbone now owns the recompute policy in TransformerConfig._validate_dsv41_config and threads input_ids through _checkpointed_forward for the replayed Engram forward.

Add _RecomputeDeferredView, a read-only view that masks only recompute_granularity, and override DeepseekV41EngramConfig._validate_unsupported_features to validate through it. This lets full/selective recompute work for V4.1+Engram while keeping every other Engram unsupported-feature check live and without mutating the shared transformer config.

…ackbone

Engram's _validate_unsupported_features rejects any activation recomputation, a
guard that predates the V4.1 hybrid backbone. That backbone now owns the recompute
policy in TransformerConfig._validate_dsv41_config and threads input_ids through
_checkpointed_forward for the replayed Engram forward.

Add _RecomputeDeferredView, a read-only view that masks only recompute_granularity,
and override DeepseekV41EngramConfig._validate_unsupported_features to validate
through it. This lets full/selective recompute work for V4.1+Engram while keeping
every other Engram unsupported-feature check live and without mutating the shared
transformer config.
@tastelikefeet
tastelikefeet merged commit bc58ea9 into modelscope:main Sep 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants