explaingit

microsoft/nni

14,351PythonAudience · researcherComplexity · 4/5LicenseSetup · moderate

TLDR

Microsoft's open-source toolkit that automates finding the best settings, architecture, and compressed version of a machine learning model so you get better results with less manual trial and error.

Mindmap

mindmap
  root((nni))
    What it does
      Hyperparameter tuning
      Architecture search
      Model compression
      Feature engineering
    Tech Stack
      Python
      PyTorch
      TensorFlow
      Scikit-learn
    Use Cases
      AutoML experiments
      Model optimization
      Efficient deployment
    Audience
      ML researchers
      Data scientists
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Automatically find the best training settings for a PyTorch or TensorFlow model without running hundreds of experiments by hand.

USE CASE 2

Compress a trained neural network to make it smaller and faster for deployment on devices with limited memory.

USE CASE 3

Run automated architecture search to discover a better model structure than the one you designed manually.

USE CASE 4

Identify which input features matter most by letting NNI run automated feature engineering on your dataset.

Tech stack

PythonPyTorchTensorFlowScikit-learnXGBoostLightGBM

Getting it running

Difficulty · moderate Time to first run · 1h+

Requires writing an experiment config YAML and choosing a search algorithm, distributed runs need additional cluster or cloud setup.

Free to use and modify for any purpose including commercial projects, with no restrictions.

In plain English

NNI, which stands for Neural Network Intelligence, is an open-source toolkit from Microsoft that automates several of the most time-consuming steps in building machine learning models. Building a good AI model normally requires a lot of manual experimentation: choosing the right settings, deciding on the model's internal structure, and trimming it down to run efficiently. NNI handles much of that experimentation automatically. The toolkit covers four main areas. Hyperparameter tuning is about finding the best configuration settings for a model. Every model has a set of adjustable dials, such as how fast it learns or how many layers it has, and NNI runs many trials with different combinations to find which settings produce the best results. Neural architecture search goes deeper, automatically exploring what the overall structure of a model should look like rather than just its settings. Model compression involves making an already-trained model smaller and faster without losing much accuracy, useful when deploying to devices with limited memory. Feature engineering refers to automatically identifying which pieces of raw input data are most useful for making predictions. NNI supports a wide range of popular machine learning frameworks, including PyTorch, TensorFlow, Scikit-learn, XGBoost, LightGBM, and MXNet. It can run experiments on a single machine or spread them across many machines or cloud environments at once. The toolkit includes more than a dozen different search algorithms for hyperparameter tuning alone, ranging from simple random search to more sophisticated approaches that build a statistical model of which settings work best and focus the search accordingly. Installation is done through pip, which is the standard Python package manager, with a single command. The project is written in Python and released under the MIT license, meaning it is free to use and modify for any purpose.

Copy-paste prompts

Prompt 1
Using Microsoft NNI, set up a hyperparameter tuning experiment for my PyTorch image classifier and return the top 5 hyperparameter configurations by validation accuracy.
Prompt 2
How do I use NNI model compression to prune a trained ResNet model and measure how much accuracy drops compared to the original?
Prompt 3
Write an NNI experiment config file that runs 50 trials of hyperparameter search on an XGBoost model using the TPE algorithm and plots the results.
Prompt 4
Show me how to run an NNI neural architecture search experiment on my local machine to find the best layer sizes for a regression model.
Prompt 5
Configure NNI to distribute a hyperparameter tuning experiment across multiple machines in my lab cluster.
Open on GitHub → Explain another repo

← microsoft on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.