(self, tmp_path)
| 2041 | assert mx.array_equal(scales, ref).item() |
| 2042 | |
| 2043 | def test_fp4_load_packed_roundtrip(self, tmp_path): |
| 2044 | path = str(tmp_path / "fp4.safetensors") |
| 2045 | tensors = {} |
| 2046 | qw, scales = _write_fp4_pair(tensors, "experts.0.w1", 8, 64) |
| 2047 | _write_safetensors(path, tensors) |
| 2048 | idx = _LazyTensorIndex([path]) |
| 2049 | packed, sc = idx._load_packed("experts.0.w1.weight") |
| 2050 | assert mx.array_equal(packed, qw).item() |
| 2051 | assert mx.array_equal(sc, scales).item() |
| 2052 | |
| 2053 | def test_reshape_astype_replay(self, tmp_path): |
| 2054 | path = str(tmp_path / "w.safetensors") |
nothing calls this directly
no test coverage detected