NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #2102 most downloaded on PyPI
A gradient processing and optimization library in JAX.
Latest stable
0.2.8
Last release 8 months ago
20 Mar 2026
Ships fairly regularly
a new release about every 3 months
Most releases are documented
notes for 23 of 26 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
26 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
Following the JAX 0.9.2 release, the jax_pmap_shmap_merge config flag was removed so that the jax.pmap implementation is always based on jax.jit and j
jax_pmap_shmap_merge config flag was removed so that the jax.pmap implementation is always based on jax.jit and jax.shard_map, and opting into the old jax.pmap behavior is no longer an option. Optax had opted into the old behavior to give users time to migrate, and as of Optax 0.2.8 this is no longer supported. This changed shouldn't impact most users, but if you experience errors or performance regressions as a result of it, you can update your code following JAX's migration guide (or use JAX 0.9.2 or earlier and set jax.config.update("jax_pmap_shmap_merge", False)).Adversarial training example by @rajasekharporeddy in #1609inject_hyperparams uses the dtype inferred from parameters... by @copybara-service[bot] in #1615Full Changelog: v0.2.7...v0.2.8
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Deprecate second order utilities. by @copybara-service [bot] in #1466
monitor and measure_with_ema to Optax transformations. by @copybara-service[bot] in #1430warn_deprecated_function instead of the Chex version. by @copybara-service[bot] in #1469assert_trees_all_{close, equal} functions and use them in tests instead of the Chex versions. by @copybara-service[bot] in #1481chex.Numeric with jax.typing.ArrayLike. Replace chex.Scalar with float/int as appropriate. by @copybara-service[bot] in #1479jax_pmap_shmap_merge=False flag in contrib/_complex_valued. #jax-fixit by @copybara-service[bot] in #1515ArrayTree and use it instead of chex.ArrayTree. by @copybara-service[bot] in #1484multiply_by_parameter_scale type in adafactor optimizer. by @copybara-service[bot] in #1504Lookahead Optimizer on MNIST example by @rajasekharporeddy in #1568ArrayTree and use it instead of chex.ArrayTree. by @copybara-service[bot] in #1588Full Changelog: v0.2.6...v0.2.7
monitor and measure_with_ema to Optax transformations. by @copybara-service[bot] in https://github.com/google-deepmind/optax/pull/1430warn_deprecated_function instead of the Chex version. by @copybara-service[bot] in https://github.com/google-deepmind/optax/pull/1469assert_trees_all_{close, equal} functions and use them in tests instead of the Chex versions. by @copybara-service[bot] in https://github.com/google-deepmind/optax/pull/1481chex.Numeric with jax.typing.ArrayLike. Replace chex.Scalar with float/int as appropriate. by @copybara-service[bot] in https://github.com/google-deepmind/optax/pull/1479jax_pmap_shmap_merge=False flag in contrib/_complex_valued. #jax-fixit by @copybara-service[bot] in https://github.com/google-deepmind/optax/pull/1515ArrayTree and use it instead of chex.ArrayTree. by @copybara-service[bot] in https://github.com/google-deepmind/optax/pull/1484multiply_by_parameter_scale type in adafactor optimizer. by @copybara-service[bot] in https://github.com/google-deepmind/optax/pull/1504Lookahead Optimizer on MNIST example by @rajasekharporeddy in https://github.com/google-deepmind/optax/pull/1568ArrayTree and use it instead of chex.ArrayTree. by @copybara-service[bot] in https://github.com/google-deepmind/optax/pull/1588Full Changelog: https://github.com/google-deepmind/optax/compare/v0.2.6...v0.2.7
absl.TestCase or parameterized.TestCase
instead of chex.TestCase as part of our effort to remove the chex
dependency. This means that Chex test variants (with/without jit, with/without
device_put, with pmap) are no longer tested. We decided it was sufficient to
use jit throughout the tests. There is already test coverage on both CPU and
accelerators, and pmap is deprecated.poly_loss_cross_entropy,
ctc_loss_with_forward_probs, ctc_loss, sigmoid_focal_loss) and regression
losses (huber_loss, cosine_similarity, cosine_distance) no longer support
positional args for hyperparameter-like inputs.chex types with internally-defined types and removed chex
dependency.Fix for #1328 by @copybara-service [bot] in #1329
Freezing in transformations api page in the documentation by @rajasekharporeddy in #1331optax.transforms in freezing documentation by @rajasekharporeddy in #1334Full Changelog: v0.2.5...v0.2.6
Freezing in transformations api page in the documentation by @rajasekharporeddy in https://github.com/google-deepmind/optax/pull/1331optax.transforms in freezing documentation by @rajasekharporeddy in https://github.com/google-deepmind/optax/pull/1334Full Changelog: https://github.com/google-deepmind/optax/compare/v0.2.5...v0.2.6
Remove longtime deprecated functions. by @copybara-service in #1149
optax.partition. by @copybara-service in #1150contrib by @leloykun in #1126scalar_type_of - random.key breaks it by @rdyro in #1169contrib by @mathDR in #1104freeze, selective_optimizer, and Prefix-Mask Support by @pranavagrawaI in #1284freeze and selective_transform by @pranavagrawaI in #1300Note truncated.
optax.partition. by @copybara-service in https://github.com/google-deepmind/optax/pull/1150contrib by @leloykun in https://github.com/google-deepmind/optax/pull/1126scalar_type_of - random.key breaks it by @rdyro in https://github.com/google-deepmind/optax/pull/1169contrib by @mathDR in https://github.com/google-deepmind/optax/pull/1104freeze, selective_optimizer, and Prefix-Mask Support by @pranavagrawaI in https://github.com/google-deepmind/optax/pull/1284freeze and selective_transform by @pranavagrawaI in https://github.com/google-deepmind/optax/pull/1300Full Changelog: https://github.com/google-deepmind/optax/compare/v0.2.4...v0.2.5
Replace deprecated typing.Hashable with collections.abc.Hashable. by @carlosgmartin in #1068
multi_normal from utilities.rst by @Abhinavcode13 in #1009optax/monte_carlo. by @copybara-service in #1076Full Changelog: v0.2.3...v0.2.4
multi_normal from utilities.rst by @Abhinavcode13 in https://github.com/google-deepmind/optax/pull/1009optax/monte_carlo. by @copybara-service in https://github.com/google-deepmind/optax/pull/1076Full Changelog: https://github.com/google-deepmind/optax/compare/v0.2.3...v0.2.4
Fix jax.tree_map deprecation warnings. by @copybara-service in #917
jax.tree_* functions with jax.tree.* by @copybara-service in #963normalize_by_update_norm by @SauravMaheshkar in #958Full Changelog: v0.2.2...v0.2.3
jax.tree_* functions with jax.tree.* by @copybara-service in https://github.com/google-deepmind/optax/pull/963normalize_by_update_norm by @SauravMaheshkar in https://github.com/google-deepmind/optax/pull/958Full Changelog: https://github.com/google-deepmind/optax/compare/v0.2.2...v0.2.3
Added mathematical description to Noisy SGD by @hmludwig in #857
reduce_on_plateau.ipynb:20002: WARNING: No source code lexer found for notebook cell by @copybara-service in #875Full Changelog: v0.2.1...v0.2.2
reduce_on_plateau.ipynb:20002: WARNING: No source code lexer found for notebook cell by @copybara-service in https://github.com/google-deepmind/optax/pull/875Full Changelog: https://github.com/google-deepmind/optax/compare/v0.2.1...v0.2.2
Begin of 0.2.1 development by @copybara-service in https://github.com/google-deepmind/optax/pull/845
Full Changelog: https://github.com/google-deepmind/optax/compare/v0.2.0...v0.2.1
Begin of 0.2.0 development by @copybara-service in https://github.com/google-deepmind/optax/pull/766
adversarial_training.ipynb by @copybara-service in https://github.com/google-deepmind/optax/pull/776params by @yixiaoer in https://github.com/google-deepmind/optax/pull/785cosine_decay_schedule. by @copybara-service in https://github.com/google-deepmind/optax/pull/797Full Changelog: https://github.com/google-deepmind/optax/compare/v0.1.9...v0.2.0
Deprecate optax.inject_stateful_hyperparameters and replace it with optax.inject_hyperparameters by @copybara-service in https://github.com/google-dee…
atol option to contrib.reduce_on_plateau() by @stefanocortinovis in https://github.com/google-deepmind/optax/pull/698versionadded and seealso metadata to (n)adam(w) solvers by @copybara-service in https://github.com/google-deepmind/optax/pull/729setup.py from publishing CI by @SauravMaheshkar in https://github.com/google-deepmind/optax/pull/737Full Changelog: https://github.com/google-deepmind/optax/compare/v0.1.8...v0.1.9
Remove legacy symbols. by @copybara-service in https://github.com/google-deepmind/optax/pull/397
TypeError in contrib.reduce_on_plateau() when x64 is enabled by @stefanocortinovis in https://github.com/google-deepmind/optax/pull/697Full Changelog: https://github.com/google-deepmind/optax/compare/v0.1.7...v0.1.8
Remove deprecated field from pyproject.toml, which should hopefully resolve an issue with deploy
Full Changelog: https://github.com/deepmind/optax/compare/v0.1.6...v0.1.7
Fix arXiv link to Optax Optimistic Gradient Descent optimizer by @8bitmp3 in https://github.com/deepmind/optax/pull/458
inject_hyperparams() for python < 3.10. by @copybara-service in https://github.com/deepmind/optax/pull/486kl_divergence loss function by @LukasMut in https://github.com/deepmind/optax/pull/473setup-python version and enable cache by @SauravMaheshkar in https://github.com/deepmind/optax/pull/485piecewise_interpolate_schedule, cosine_onecycle_schedule, linear_onecycle_schedule by @brentyi in https://github.com/deepmind/optax/pull/504Full Changelog: https://github.com/deepmind/optax/compare/v0.1.4...v0.1.5
Expose adamax and adamaxw by @nasyxx in https://github.com/deepmind/optax/pull/433
noisy_sgd ) by @atgctg in https://github.com/deepmind/optax/pull/369integer_pow recompilation in _bias_correction by @epignatelli in https://github.com/deepmind/optax/pull/329/proc/cpuinfo. in https://github.com/deepmind/optax/pull/454Full Changelog: https://github.com/deepmind/optax/compare/v0.1.3...v0.1.4
Do not use None in optax.masked. in https://github.com/deepmind/optax/pull/338
Full Changelog: https://github.com/deepmind/optax/compare/v0.1.2...v0.1.3
Replace jax.tree_multimap, which is now deprecated, with jax.tree_map. by @copybara-service in https://github.com/deepmind/optax/pull/330
set_to_zero. by @copybara-service in https://github.com/deepmind/optax/pull/299optax.adamw(weight_decay) parameter. by @copybara-service in https://github.com/deepmind/optax/pull/322ctc_loss to return forward probs. by @yotarok in https://github.com/deepmind/optax/pull/321jax.tree_multimap, which is now deprecated, with jax.tree_map. by @copybara-service in https://github.com/deepmind/optax/pull/330Full Changelog: https://github.com/deepmind/optax/compare/v0.1.1...v0.1.2
Tweak the meta-learning example from the docs by @copybara-service in https://github.com/deepmind/optax/pull/233
jax.experimental to jax.example_libraries by @copybara-service in https://github.com/deepmind/optax/pull/200optax.adamw(mask) parameter. by @copybara-service in https://github.com/deepmind/optax/pull/284Full Changelog: https://github.com/deepmind/optax/compare/v0.1.0...v0.1.1
Support for Python 3.6 has been dropped following the JAX deprecation policy. Please upgrade to a supported Python version.
Support for Python 3.6 has been dropped following the JAX deprecation policy. Please upgrade to a supported Python version.
Full Changelog: https://github.com/deepmind/optax/compare/v0.0.91...v0.1.0
It is the latest version compatible with Python 3.6. See #222 for more details.
It is the latest version compatible with Python 3.6. See #222 for more details.
optax.OptState with NamedTuple, when it is used as a base class. https://github.com/deepmind/optax/pull/218optax.OptState to chex.ArrayTree. https://github.com/deepmind/optax/pull/219flax_example.py. by @8bitmp3 in https://github.com/deepmind/optax/pull/138scale_gradient. https://github.com/deepmind/optax/pull/198set_to_zero transformation. https://github.com/deepmind/optax/pull/202Full Changelog: https://github.com/deepmind/optax/compare/v0.0.9...v0.0.91
masked wrapper for empty params nest
Added:
Fixed:
Fixed inconsistency in ema's outputs
clipping_by_block_rmssgdr_schedulelinear_scheduleFix section headers in docs \#79 (KristianHolsheimer)
Closed issues:
Merged pull requests:
* This Changelog was automatically generated by github_changelog_generator
*Note: this is a first GitHub release of Optax. It includes all changes since the repo was created.*
Note: this is a first GitHub release of Optax. It includes all changes since the repo was created.
Implemented enhancements:
Closed issues:
Merged pull requests:
additive_weight_decay to add_decayed_weights. #33 (copybara-service[bot])scale_by_fromage. #32 (copybara-service[bot])* This Changelog was automatically generated by github_changelog_generator
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.