MCPcopy Create free account
hub / github.com/deepseek-ai/DeepSpec / capture_layer

Function capture_layer

scripts/data/prepare_target_cache.py:96–100  ·  view source on GitHub ↗
(layer_id: int)

Source from the content-addressed store, hash-verified

94 handles = []
95
96 def capture_layer(layer_id: int):
97 def hook(_module, _inputs, output):
98 captured_hidden_states[layer_id] = _get_hook_tensor(output).detach()
99
100 return hook
101
102 try:
103 if -1 in target_layer_ids:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected