(layer_id: int)
| 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: |
no outgoing calls
no test coverage detected