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

Function get_named_linears

quantization/pre_quant.py:16–17  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

14
15
16def get_named_linears(module):
17 return {name: m for name, m in module.named_modules() if isinstance(m, nn.Linear)}
18
19def set_op_by_name(layer, name, new_module):
20 levels = name.split('.')

Callers 3

run_awqFunction · 0.70
run_clipFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected