v24.3 (2024-05-02)
π₯ Legendaryβ
-
You can now write custom ops for your models with Mojo!
Learn more about MAX extensibility.
π¦ Changedβ
-
Added support for named dynamic dimensions. This means you can specify when two or more dimensions in your model's input are dynamic but their sizes at run time must match each other. By specifying each of these dimension sizes with a name (instead of using
Noneto indicate a dynamic size), the MAX Engine compiler can perform additional optimizations. See the notes below for the corresponding API changes that support named dimensions. -
Simplified all the APIs to load input specs for models, making them more consistent.
MAX Engine performanceβ
- Compared to v24.2, MAX Engine v24.3 shows an average speedup of 10% on PyTorch models, and an average 20% speedup on dynamically quantized ONNX transformers.
MAX Graph APIβ
The max.graph APIs are still changing
rapidly, but starting to stabilize.
-
AnyMoTyperenamed toType,MOTensorrenamed toTensorType, andMOListrenamed toListType. -
Removed
ElementTypein favor of usingDType. -
Removed
TypeTuplein favor of usingList[Type]. -
Removed the
Moduletype so you can now start building a graph by directly instantiating aGraph. -
Some new ops in
max.ops, including support for custom ops.See how to create a custom op in MAX Graph.
MAX Engine Python APIβ
-
Redesigned
InferenceSession.load()to replace the confusingoptionsargument with acustom_ops_pathargument.As a result,
CommonLoadOptions,TorchLoadOptions, andTensorFlowLoadOptionshave all been removed. -
TorchInputSpecnow supports named dynamic dimensions (previously, dynamic dimension sizes could be specified only asNone). This lets you tell MAX which dynamic dimensions are required to have the same size, which helps MAX better optimize your model.
MAX Engine Mojo APIβ
-
InferenceSession.load_model()was renamed toload(). -
Redesigned
InferenceSession.load()to replace the confusingconfigargument with acustom_ops_pathargument for use when loading a custom op, and aninput_specsargument for use when loading TorchScript models.Doing so removed
LoadOptionsand introduced the newInputSpectype to define the input shape/type of a model (instead ofLoadOptions). -
New
ShapeElementtype to allow for named dynamic dimensions (inInputSpec). -
max.engine.enginemodule was renamed tomax.engine.info.
MAX Engine C APIβ
M_newTorchInputSpec()now supports named dynamic dimensions (via newdimNamesargument).
β Removedβ
-
Removed TensorFlow support in the MAX SDK, so you can no longer load a TensorFlow SavedModel for inference. However, TensorFlow is still available for enterprise customers.
We removed TensorFlow because industry-wide TensorFlow usage has declined significantly, especially for the latest AI innovations. Removing TensorFlow also cuts our package size by over 50% and accelerates the development of other customer-requested features. If you have a production use-case for a TensorFlow model, please contact us.
-
Removed the Python
CommonLoadOptions,TorchLoadOptions, andTensorFlowLoadOptionsclasses. See note above aboutInferenceSession.load()changes. -
Removed the Mojo
LoadOptionstype. See the note above aboutInferenceSession.load()changes.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!