Integrate mlx 0.29.1
NOTE
This change contains some breaking API changes in the area of quantization. Specifically:
- the
quantized/dequantizedmethods now take amodeparameter (not breaking) - the
biasesresult fromquantizedis now optional, e.g.(wq: MLXArray, scales: MLXArray, biases: MLXArray?)
We are keeping the same semver here to match with python mlx. Although the change is breaking, it will likely be limited to implementations of quantized layers, e.g. QuantizedLinear, or other code that uses quantization directly. mlx-swift-examples will have a synchronized release to reflect this change.
If you need to make a similar change, consider the changes from QuantizedLinear:
The properties changed from this:
public let scales: MLXArray
public let biases: MLXArrayto:
public let mode: QuantizationMode
public let scales: MLXArray
public let biases: MLXArray?A mode with parameter with a default value was added where needed: mode: QuantizationMode = .affine and the mode parameter was used in calls to the quantization APIs:
var x = quantizedMatmul(
x,
weight,
scales: scales,
biases: biases,
transpose: true,
groupSize: groupSize,
bits: bits,
mode: mode
)and the Quantizable protocol was updated to have a mode parameter (protocol methods can't have default values):
/// Return the module as a quantized representation
func toQuantized(groupSize: Int, bits: Int, mode: QuantizationMode) -> ModuleWhat's Changed
- Fix spelling mistakes in docs by @abeleinin in #257
- Add contiguous by @kemchenj in #260
- Minor fixes docs by @CharlieTLe in #261
- fix typo MXArray -> MLXArray by @davidkoski in #264
- fixing more typos in docs and comments by @davidkoski in #265
- Make
Module.update()throw instead of crash for incompatible parameters by @louen in #266 - Make
MLXErrorprovide a description by @louen in #268 - Update links to MLX packages in documentation by @mattt in #277
- swift-format 602 by @davidkoski in #278
- ensure that the ErrorHandler is installed by @davidkoski in #282
- document memory buffers by @davidkoski in #280
- adopt mlx 0.29.1 and related mlx-c by @davidkoski in #273
New Contributors
- @abeleinin made their first contribution in #257
- @CharlieTLe made their first contribution in #261
- @mattt made their first contribution in #277
Full Changelog: 0.25.6...0.29.1