MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / get_named_linears

Function get_named_linears

quantization/clip_utils.py:156–157  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

154 raise NotImplementedError(type(model))
155
156def get_named_linears(module):
157 return {name: m for name, m in module.named_modules() if isinstance(m, nn.Linear)}
158
159def get_op_by_name(module, op_name):
160 # get the op by its name relative to the module

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected