Skip to content

Commit

Permalink
Make some AQT dataclasses to use keyword-only fields (1/N)
Browse files Browse the repository at this point in the history
This cl introduces an temporary decorator that will be temporarily used during this migration. The eventual goal is to enforce kw_only=True in all dataclasses unless it's not feasible, aiming to make AQT less error-prune and improve readability.

PiperOrigin-RevId: 631132072
  • Loading branch information
maxtext authors committed May 6, 2024
1 parent bdb1b3e commit a519018
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MaxText/layers/quantizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def _get_quant_config(config):
else:
drhs_bits = 8
drhs_accumulator_dtype = jnp.int32
drhs_local_aqt = aqt_config.LocalAqt(config.quantization_local_shard_count)
drhs_local_aqt = aqt_config.LocalAqt(
contraction_axis_shard_count=config.quantization_local_shard_count
)
return aqt_config.config_v3(
fwd_bits=8,
dlhs_bits=8,
Expand Down

0 comments on commit a519018

Please sign in to comment.