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

Method __exit__

lib/model_wrapper.py:85–88  ·  view source on GitHub ↗
(self, exc_type, exc_val, exc_tb)

Source from the content-addressed store, hash-verified

83 module.mask = self.mask
84
85 def __exit__(self, exc_type, exc_val, exc_tb):
86 for name, module in self.model.named_modules():
87 if isinstance(module, ActLinear):
88 module.mask = None
89
90
91def make_Act(model, verbose=False):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected