gitwtfhub

wtf is nni?

microsoft/nni — explained in plain English

Analysis updated 2026-06-24

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

TL;DR

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

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

Why would anyone build with this?

REASON 1

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

REASON 2

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

REASON 3

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

REASON 4

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

What's in the stack?

PythonPyTorchTensorFlowScikit-learnXGBoostLightGBM

How it stacks up

microsoft/nnilibretranslate/libretranslatejindongwang/transferlearning
Stars14,35114,35414,334
LanguagePythonPythonPython
Setup difficultymoderatemoderatemoderate
Complexity4/53/53/5
Audienceresearcherdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

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.

Wtf does this do

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.

Yoink these 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.

Frequently asked questions

wtf is nni?

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.

What language is nni written in?

Mainly Python. The stack also includes Python, PyTorch, TensorFlow.

What license does nni use?

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

How hard is nni to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is nni for?

Mainly researcher.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.