What's new in ML.NET

Manager — SDE
Search for a command to run...

Manager — SDE
No comments yet. Be the first to comment.
← Previous: What’s New in ML.NET .NET Multi-platform App UI (.NET MAUI) in .NET 9 focuses on improving overall product quality, test coverage, performance, and stability. While previous releases introduced major new capabilities and controls, the emp...
← Previous: What’s New in the SDK and Tooling for .NET 9 .NET Aspire is a set of tools, templates, and packages designed to help developers build observable, production-ready apps that embrace cloud-native and distributed computing best practices. .N...

← Previous: What’s New in .NET Libraries for .NET 9 The .NET 9 SDK introduces several new capabilities and improvements to streamline development workflows, enhance build and test experiences, improve NuGet security and performance, and provide great...

← Previous: What’s New in .NET MAUI for .NET 9 .NET 9 adds a wide range of enhancements and new APIs across the base class libraries. These improvements touch everything from low-level data structures and cryptography to JSON serialization, text pr...

← Previous: What’s New in ML.NET .NET Multi-platform App UI (.NET MAUI) in .NET 9 focuses on improving overall product quality, test coverage, performance, and stability. While previous releases introduced major new capabilities and controls, the emp...

← Previous: What’s new in ASP.NET Core 9.0
ML.NET continues to evolve as a full-featured, open-source machine learning framework for .NET developers, enabling you to create, train, and deploy custom ML models directly in your .NET applications. ML.NET 3.0 and 4.0 bring expanded capabilities for advanced AI scenarios—particularly around deep learning tasks, AutoML improvements, and enhanced tokenization support—making it easier to handle complex text and vision problems.
Deep Learning with TorchSharp
ML.NET 3.0 introduces support for several new deep-learning tasks backed by TorchSharp, a .NET library for PyTorch-based deep learning. These tasks include:
All these trainers are included in the Microsoft.ML.TorchSharp package. For more details, check out the Announcing ML.NET 3.0 post.
AutoML (Automated Machine Learning) simplifies model selection and hyperparameter tuning by automating the training and evaluation pipeline. ML.NET 3.0 updates the AutoML sweeper to handle new tasks, including sentence similarity, question answering, and object detection. With these improvements, you can quickly experiment with various models and configurations using the AutoML API, reducing the time and expertise required to achieve state-of-the-art results.
For more information, see How to use the ML.NET Automated Machine Learning (AutoML) API.
Text tokenization is a crucial step in NLP pipelines, splitting raw text into manageable tokens (words, subwords, or symbols) before feeding it into language models. In ML.NET 4.0, the Microsoft.ML.Tokenizers package introduces significant enhancements:
Refined APIs and Tiktoken Support:
The tokenizer library now supports Tiktoken (the tokenization method used by OpenAI models), enabling more accurate and efficient tokenization for GPT models, such as GPT-4. This lets you integrate local or remote AI services easily, better understand your costs (e.g., Azure OpenAI tokens), and manage prompt context sizes.
Llama Model Tokenizer:
The library now supports tokenizing text for Llama-based models, enabling usage of models like LLaMA and Mistral with minimal extra tooling.
CodeGen Tokenizer:
With support for CodeGen tokenizers (compatible with models such as codegen-350M-mono and phi-2), you can tokenize code-oriented data and build advanced coding assistants or code-search solutions.
Span-based APIs and Flexible Normalization:
New overloads accept Span<char> inputs and allow you to toggle normalization and pretokenization steps. These capabilities give fine-grained control over how text is processed, improving performance and adaptability for various NLP workflows.
Migration from DeepDev or SharpToken:
The ML.NET tokenization ecosystem has consolidated around Microsoft.ML.Tokenizers. If you’ve previously used DeepDev or SharpToken, a migration guide is provided to help you smoothly transition to Microsoft.ML.Tokenizers.
For examples and more details, see Announcing ML.NET 2.0 and the updated tokenization library documentation.
Model Builder, the Visual Studio extension that provides a UI-based machine learning workflow, now consumes ML.NET 3.0. Starting from Model Builder version 17.18.0, you can leverage newly introduced scenarios like question answering (QA) and named entity recognition (NER) directly within Visual Studio. This streamlines building advanced NLP pipelines without leaving your IDE.
In summary, ML.NET’s recent updates extend the framework’s capabilities into advanced AI tasks such as object detection, NER, and QA, while improving automation via AutoML and simplifying text preprocessing with enhanced tokenization. These updates open the door to more sophisticated and production-ready machine learning solutions directly integrated into your .NET applications.
Next → What’s New in .NET MAUI for .NET 9
Subscribe to the blog to stay updated on the latest .NET developments!
Follow on social media: