feat(capture): DeepSeek-V4 mHC activation capture targets#182
Merged
RhizoNymph merged 1 commit intoJun 18, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds DeepSeek-V4 manifold-hyperconnection (mHC) activations as capture targets on
feat/capture-consumers. Same capture-side mHC work as #181 (which targetsfeat/integration), ported here so the standalone capture-consumers branch supports capturing mHC hook points.Hook points
mhc_streams_pre_attn(n, hc_mult, hidden)mhc_streams_pre_mlp(n, hc_mult, hidden)mhc_streams_finalhc_headstreams at the model tail(n, hc_mult, hidden)mhc_attn_post_mix/mhc_ffn_post_mix(n, hc_mult)mhc_attn_res_mix/mhc_ffn_res_mix(n, hc_mult, hc_mult)Plus reuse of the standard
pre_attn/post_attn/mlp_in/mlp_outhooks for V4's single-stream(n, hidden)bf16 sublayer in/out.mhc_streams_finalis a model-level hook (selector normalized to the tail layer).Changes
HookName+ mirrored id table) extended with the 7mhc_*names.HookSchema(width, dtype, logical_shape)+build_hook_schema(hidden, dtype, hc_mult), replacing the singlehidden_size/model_dtypeassumption; carried onCaptureContext.hook_schemaand built inbuild_capture_context.row_shape+ per-rowpositions.row_shape, per-entrydtype(mixed-dtype packed files), per-rowpositions+latest_per_position().nvidia+amd, fused-CUDA + native), gated to constant-fold out when capture is disabled.Backward compatible: additive sidecar fields, unchanged request/CLI surface and
.binpayload, standard-model validation unchanged.Validation
Full capture suite green on this branch (335 passed, 1 skipped) — mHC tests plus the existing prefix-cache/admission tests. The same work was GPU-validated end-to-end on DeepSeek-V4-Flash-NVFP4 / 4× B300 (see #177/#181).