haliax 1.4.dev326__tar.gz → 1.4.dev327__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {haliax-1.4.dev326 → haliax-1.4.dev327}/PKG-INFO +3 -2
- haliax-1.4.dev327/src/haliax/__about__.py +1 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/partitioning.py +6 -6
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/quantization.py +1 -2
- haliax-1.4.dev326/src/haliax/__about__.py +0 -1
- {haliax-1.4.dev326 → haliax-1.4.dev327}/.coveragerc +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/.flake8 +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/.github/workflows/publish_dev.yaml +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/.github/workflows/run_pre_commit.yaml +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/.github/workflows/run_quick_levanter_tests.yaml +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/.github/workflows/run_tests.yaml +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/.gitignore +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/.pre-commit-config.yaml +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/.readthedocs.yaml +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/CONTRIBUTING.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/LICENSE +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/README.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/api.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/broadcasting.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/cheatsheet.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/css/material.css +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/css/mkdocstrings.css +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/faq.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/figures/data_parallel_mesh.png +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/figures/data_parallel_mesh_replicated.png +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/figures/device_mesh_1d.png +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/figures/device_mesh_1d_zero.png +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/figures/device_mesh_2d.png +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/figures/device_mesh_2d_batch_partitioned.png +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/figures/device_mesh_2d_data_replicated.png +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/figures/device_mesh_2d_data_replicated_mlp_partitioned.png +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/figures/device_mesh_2d_intermediate_fully_partitioned.png +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/figures/device_mesh_2d_zero.png +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/fp8.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/hof.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/index.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/indexing.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/matmul.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/nn.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/partitioning.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/rearrange.ipynb +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/rearrange.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/requirements.txt +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/state-dict.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/docs/tutorial.md +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/mkdocs.yml +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/pyproject.toml +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/__init__.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/_src/__init__.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/_src/compile_utils.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/_src/dot.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/_src/einsum.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/_src/fp8.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/_src/parsing.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/_src/rearrange.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/_src/state_dict.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/_src/util.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/axis.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/core.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/debug.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/hof.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/jax_utils.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/nn/__init__.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/nn/activations.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/nn/attention.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/nn/conv.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/nn/dropout.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/nn/embedding.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/nn/linear.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/nn/loss.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/nn/mlp.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/nn/normalization.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/nn/pool.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/nn/scan.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/ops.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/random.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/specialized_fns.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/state_dict.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/tree_util.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/types.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/util.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/src/haliax/wrap.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/core_test.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_attention.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_axis.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_conv.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_debug.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_dot.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_einsum.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_fp8.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_hof.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_nn.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_ops.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_parsing.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_partitioning.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_pool.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_random.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_rearrange.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_scan.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_specialized_fns.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_state_dict.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_tree_util.py +0 -0
- {haliax-1.4.dev326 → haliax-1.4.dev327}/tests/test_utils.py +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: haliax
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.dev327
|
|
4
4
|
Summary: Named Tensors for Legible Deep Learning in JAX
|
|
5
5
|
Project-URL: Homepage, https://github.com/stanford-crfm/haliax
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/stanford-crfm/haliax/issues/
|
|
7
7
|
Project-URL: Documentation, https://haliax.readthedocs.io/en/latest/
|
|
8
8
|
Author-email: David Hall <dlwh@cs.stanford.edu>
|
|
9
|
+
License-File: LICENSE
|
|
9
10
|
Classifier: Development Status :: 4 - Beta
|
|
10
11
|
Classifier: Intended Audience :: Science/Research
|
|
11
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.4.dev327"
|
|
@@ -8,7 +8,7 @@ from typing import Callable, ContextManager, Mapping, Optional, ParamSpec, Seque
|
|
|
8
8
|
|
|
9
9
|
import equinox as eqx
|
|
10
10
|
import jax
|
|
11
|
-
from equinox import module_update_wrapper
|
|
11
|
+
from equinox import is_array, module_update_wrapper
|
|
12
12
|
from jax.lax import with_sharding_constraint
|
|
13
13
|
from jax.sharding import Mesh, NamedSharding, PartitionSpec, SingleDeviceSharding
|
|
14
14
|
from jaxtyping import PyTree
|
|
@@ -20,7 +20,7 @@ from .axis import Axis, AxisSelection, AxisSelector
|
|
|
20
20
|
from .core import NamedArray
|
|
21
21
|
from .jax_utils import Static, is_in_jit, is_jax_array_like, is_on_mac_metal
|
|
22
22
|
from .tree_util import hashable_combine, hashable_partition
|
|
23
|
-
from .util import StringHolderEnum, ensure_tuple
|
|
23
|
+
from .util import StringHolderEnum, ensure_tuple
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
PhysicalAxisSpec = Union[(str), Sequence[str]]
|
|
@@ -274,7 +274,7 @@ class _NamedJitWrapper(eqx.Module):
|
|
|
274
274
|
if out_axis_resources is None:
|
|
275
275
|
out_axis_resources = axis_resources
|
|
276
276
|
|
|
277
|
-
dynamic_argspec, static_argspec = hashable_partition((args, kwargs),
|
|
277
|
+
dynamic_argspec, static_argspec = hashable_partition((args, kwargs), is_array)
|
|
278
278
|
dynamic = (self._dynamic_fun, dynamic_argspec)
|
|
279
279
|
|
|
280
280
|
donate_args = self._donate_args
|
|
@@ -436,7 +436,7 @@ def named_jit(
|
|
|
436
436
|
**pjit_args,
|
|
437
437
|
)
|
|
438
438
|
|
|
439
|
-
dynamic_fun, static_fun = hashable_partition(fn,
|
|
439
|
+
dynamic_fun, static_fun = hashable_partition(fn, is_array)
|
|
440
440
|
|
|
441
441
|
wrapper = _NamedJitWrapper(
|
|
442
442
|
fn,
|
|
@@ -514,7 +514,7 @@ def _named_pjit_cache(fun_names, **jitkwargs) -> WrappedCallable:
|
|
|
514
514
|
fun = hashable_combine(dynamic_fun, static_fun)
|
|
515
515
|
args, kwargs = hashable_combine(dynamic_spec, static_spec)
|
|
516
516
|
out = fun(*args, **kwargs)
|
|
517
|
-
out_dynamic, out_static = hashable_partition(out,
|
|
517
|
+
out_dynamic, out_static = hashable_partition(out, is_array)
|
|
518
518
|
return out_dynamic, Static(out_static)
|
|
519
519
|
|
|
520
520
|
fun_name, fun_qualname = fun_names
|
|
@@ -543,7 +543,7 @@ def _cached_filter_eval_shape(fun, *args, **kwargs):
|
|
|
543
543
|
eval_shape is surprisingly expensive, so we cache it. We use this for named_pjit for evaluating resource partitions
|
|
544
544
|
of the output.
|
|
545
545
|
"""
|
|
546
|
-
dynamic, static = hashable_partition((fun, args, kwargs),
|
|
546
|
+
dynamic, static = hashable_partition((fun, args, kwargs), is_array)
|
|
547
547
|
if static not in _eval_shape_cache:
|
|
548
548
|
_eval_shape_cache[static] = eqx.filter_eval_shape(fun, *args, **kwargs)
|
|
549
549
|
|
|
@@ -10,7 +10,6 @@ from typing import Optional, Protocol, TypeVar
|
|
|
10
10
|
import equinox as eqx
|
|
11
11
|
import jax
|
|
12
12
|
from jax import numpy as jnp
|
|
13
|
-
from jax._src.tree_util import BuiltInKeyEntry
|
|
14
13
|
from jax.tree_util import DictKey, FlattenedIndexKey, GetAttrKey, SequenceKey
|
|
15
14
|
from jax.typing import DTypeLike
|
|
16
15
|
|
|
@@ -253,7 +252,7 @@ def _matches_target_fp8(key_path, config: Fp8Config) -> bool:
|
|
|
253
252
|
return re.match(config.targets, key_path_str) is not None
|
|
254
253
|
|
|
255
254
|
|
|
256
|
-
def _key_path_to_str(key_path: tuple
|
|
255
|
+
def _key_path_to_str(key_path: tuple) -> str:
|
|
257
256
|
out = ""
|
|
258
257
|
for k in key_path:
|
|
259
258
|
match k:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.4.dev326"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|