(weight_name: str, scale_name: str)
| 335 | return t.to(dtype), None |
| 336 | |
| 337 | def conv(weight_name: str, scale_name: str) -> Tuple[torch.Tensor, torch.Tensor]: |
| 338 | nonlocal progress |
| 339 | progress += 1 |
| 340 | t = load_and_dequantize(weight_name, scale_name) |
| 341 | print(f"\rConverting tensor {progress}: {t.shape}", end="", flush=True) |
| 342 | return quantize(t) |
| 343 | |
| 344 | def conv_experts(weight_and_scale_names: List[Tuple[str, str]]) -> Tuple[torch.Tensor, torch.Tensor]: |
| 345 | nonlocal progress |
no test coverage detected