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

Function get_named_bnb_linears

test/humaneval/rtn.py:15–16  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

13 return {name: m for name, m in module.named_modules() if isinstance(m, nn.Linear)}
14
15def get_named_bnb_linears(module):
16 return {name: m for name, m in module.named_modules() if isinstance(m, bnb.nn.Linear4bit)}
17
18# core quantization method (simulated quantization)
19def pseudo_quantize_tensor(w, n_bit=8,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected