(module)
| 13 | return {name: m for name, m in module.named_modules() if isinstance(m, nn.Linear)} |
| 14 | |
| 15 | def 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) |
| 19 | def pseudo_quantize_tensor(w, n_bit=8, |
no outgoing calls
no test coverage detected