Skip to content

Commit a3df09b

Browse files
committed
Raise minimum PyTorch to 2.10
Require the PyTorch release baseline selected for compressed FP8/FNUZ support, remove the obsolete legacy-attribute compatibility shim, and update the recorded dependency lower bound. Co-authored-by: Copilot App <[email protected]> Copilot-Session: acdf6027-4e8f-40aa-8600-abc9ee8591a4 Signed-off-by: Justin Chu <[email protected]>
1 parent 321b9a2 commit a3df09b

4 files changed

Lines changed: 4 additions & 24 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
758758
logging in `_config_resolver.py`, `_diffusers_builder.py`, and
759759
`__main__.py`.
760760
- Added dependency lower bounds: `onnxscript>=0.6.0`, `onnx_ir>=0.1.0`,
761-
`numpy>=1.24.0`, `torch>=2.1.0`.
761+
`numpy>=1.24.0`, `torch>=2.10.0`.
762762
- Lazy-import heavy dependencies (`torch`, `transformers`,
763763
`safetensors.torch`) in CLI for faster `list`/`info` subcommands.
764764
- Mllama cross-attention K/V now cached after first computation in

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies = [
2121
"onnxscript>=0.7.1",
2222
"rfc8785",
2323
"safetensors",
24-
"torch>=2.1.0",
24+
"torch>=2.10.0",
2525
"tqdm",
2626
"transformers", # >5.0 recommended
2727
]

‎src/mobius/integrations/compressed_tensors/_loader.py‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -533,20 +533,15 @@ def _torch_dtype(dtype: str) -> torch.dtype:
533533
"F32": torch.float32,
534534
"F64": torch.float64,
535535
"F8_E4M3": torch.float8_e4m3fn,
536+
"F8_E4M3FNUZ": torch.float8_e4m3fnuz,
536537
"F8_E5M2": torch.float8_e5m2,
538+
"F8_E5M2FNUZ": torch.float8_e5m2fnuz,
537539
"I8": torch.int8,
538540
"I16": torch.int16,
539541
"I32": torch.int32,
540542
"I64": torch.int64,
541543
"U8": torch.uint8,
542544
}
543-
for safetensors_dtype, torch_attribute in (
544-
("F8_E4M3FNUZ", "float8_e4m3fnuz"),
545-
("F8_E5M2FNUZ", "float8_e5m2fnuz"),
546-
):
547-
optional_dtype = getattr(torch, torch_attribute, None)
548-
if optional_dtype is not None:
549-
mapping[safetensors_dtype] = optional_dtype
550545
try:
551546
return mapping[dtype]
552547
except KeyError as error:

‎src/mobius/integrations/compressed_tensors/_loader_test.py‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -281,21 +281,6 @@ def test_unsupported_metadata_fails_closed(self, field, value):
281281

282282

283283
class TestReconstruction:
284-
def test_torch_dtype_resolution_tolerates_missing_optional_fnuz(
285-
self,
286-
monkeypatch,
287-
):
288-
monkeypatch.delattr(torch, "float8_e4m3fnuz")
289-
monkeypatch.delattr(torch, "float8_e5m2fnuz")
290-
291-
assert compressed_tensors_loader._torch_dtype("BF16") == torch.bfloat16
292-
assert compressed_tensors_loader._torch_dtype("F8_E4M3") == torch.float8_e4m3fn
293-
with pytest.raises(
294-
CompressedTensorsError,
295-
match="Unsupported safetensors dtype 'F8_E4M3FNUZ'",
296-
):
297-
compressed_tensors_loader._torch_dtype("F8_E4M3FNUZ")
298-
299284
def test_nvfp4_reads_one_shard_handle_per_logical_tensor(self, tmp_path, monkeypatch):
300285
tensors = {
301286
"nvfp4.weight_packed": torch.zeros(2, 8, dtype=torch.uint8),

0 commit comments

Comments
 (0)