MCPcopy Create free account
hub / github.com/boyiwei/alignment-attribution-code / clear_act_buffer

Function clear_act_buffer

lib/model_wrapper.py:137–140  ·  view source on GitHub ↗
(act_model)

Source from the content-addressed store, hash-verified

135
136
137def clear_act_buffer(act_model):
138 for name, module in act_model.named_modules():
139 if isinstance(module, ActLinear):
140 module.clear_act_buffer()
141
142
143def prune_wanda_v2(

Callers 2

prune_wanda_v2Function · 0.70
model_wrapper.pyFile · 0.70

Calls 1

clear_act_bufferMethod · 0.45

Tested by

no test coverage detected