@@ -6,7 +6,6 @@ description = "Modalities, a PyTorch-native framework for distributed and reprod
66readme = " README.md"
77dependencies = [
88 " numpy" ,
9- " torch<2.11.0" ,
109 " ninja" ,
1110 " packaging" ,
1211 " tqdm" ,
@@ -25,25 +24,86 @@ dependencies = [
2524 " matplotlib" ,
2625 " wandb" ,
2726 " einops>=0.7.0" ,
28- " flash-attn==2.8.3; platform_system != 'Darwin' and platform_machine != 'aarch64'" ,
2927 " debugpy" , # For VSCode debugging support
3028]
3129
3230[project .urls ]
3331Homepage = " https://github.com/Modalities/modalities"
3432Issues = " https://github.com/Modalities/modalities/issues"
3533
36- [project .optional-dependencies ]
37- linting = [" pre-commit" ]
38- tests = [" pytest" , " pytest-cov" , " debugpy" ]
39-
4034[project .scripts ]
4135modalities = " modalities.__main__:main"
4236
4337[build-system ]
4438requires = [" setuptools >= 61.0.0" ]
4539build-backend = " setuptools.build_meta"
4640
41+ [project .optional-dependencies ]
42+ linting = [" pre-commit" ]
43+ tests = [" pytest" , " pytest-cov" , " debugpy" ]
44+
45+ cpu = [" torch>=2.10,<2.11.0" , " torchvision" ]
46+ cu126 = [
47+ " torch>=2.10,<2.11.0" ,
48+ " torchvision" ,
49+ " flash-attn==2.8.3; platform_system != 'Darwin' and platform_machine != 'aarch64'"
50+ ]
51+ cu128 = [
52+ " torch>=2.10,<2.11.0" ,
53+ " torchvision" ,
54+ " flash-attn==2.8.3; platform_system != 'Darwin' and platform_machine != 'aarch64'"
55+ ]
56+ cu130 = [
57+ " torch>=2.10,<2.11.0" ,
58+ " torchvision" ,
59+ " flash-attn==2.8.3; platform_system != 'Darwin' and platform_machine != 'aarch64'"
60+ ]
61+
62+ [tool .uv ]
63+ conflicts = [
64+ [
65+ { extra = " cpu" },
66+ { extra = " cu126" },
67+ { extra = " cu128" },
68+ { extra = " cu130" },
69+ ],
70+ ]
71+
72+ [tool .uv .sources ]
73+ torch = [
74+ { index = " pytorch-cpu" , extra = " cpu" },
75+ { index = " pytorch-cu126" , extra = " cu126" },
76+ { index = " pytorch-cu128" , extra = " cu128" },
77+ { index = " pytorch-cu130" , extra = " cu130" },
78+ ]
79+ torchvision = [
80+ { index = " pytorch-cpu" , extra = " cpu" },
81+ { index = " pytorch-cu126" , extra = " cu126" },
82+ { index = " pytorch-cu128" , extra = " cu128" },
83+ { index = " pytorch-cu130" , extra = " cu130" },
84+ ]
85+
86+ [[tool .uv .index ]]
87+ name = " pytorch-cpu"
88+ url = " https://download.pytorch.org/whl/cpu"
89+ explicit = true
90+
91+ [[tool .uv .index ]]
92+ name = " pytorch-cu126"
93+ url = " https://download.pytorch.org/whl/cu126"
94+ explicit = true
95+
96+ [[tool .uv .index ]]
97+ name = " pytorch-cu128"
98+ url = " https://download.pytorch.org/whl/cu128"
99+ explicit = true
100+
101+ [[tool .uv .index ]]
102+ name = " pytorch-cu130"
103+ url = " https://download.pytorch.org/whl/cu130"
104+ explicit = true
105+
106+
47107[tool .uv .extra-build-dependencies ]
48108flash-attn = [
49109 { requirement = " torch" , match-runtime = true },
0 commit comments