DeepSpeed-MII logo

DeepSpeed-MII

deepspeedai/DeepSpeed-MII

MII makes low-latency and high-throughput inference possible, powered by DeepSpeed.

GraphCanon updated 2w · GitHub synced 2w

2.1k stars191 forksLast push 1y Python Apache-2.0

Decision brief

DeepSpeed-MII accelerates model deployment with pre-compiled Python wheels for low-latency and high-throughput inference.

Good fit when

  • For applications requiring rapid, multi-client-supported deployments on modern GPU setups.
  • When minimizing compile times is critical for quick turnaround in production environments.

Avoid when

  • In scenarios with non-NVIDIA GPUs or CUDA versions below 11.6, due to limited compatibility.
  • For projects needing greater control over custom kernel compilation processes.

Observed Jul 12, 2026 · Source: enrich:decision_facts

Verify the decision

Maintenance and security

Full trust report
Maintenance
Dormant (402d since push)
As of 2w
Provenance
Not a fork · Organization account
As of 2w
Security (OSV)
No lockfile
As of 1mo

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

pip install DeepSpeed-MII
PyPI

Similar tools

Same-category neighbours. No typed graph edges are catalogued for this tool yet.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

DeepSpeed-MII facilitates the creation of non-persistent and persistent deployments for supported models with ease. It focuses on minimizing compile times through pre-compiled Python wheels covering custom kernels.

Capability facts

Languages
python

Source: github.language+pyproject.toml · Aug 7, 2026

Categories

Compatibility

Sourced claims from the README excerpt - not unsourced marketing copy.

Python runtimePython

Source: README excerpt (regex_v1, Aug 7, 2026)

ile times that many projects require in this space we distribute a pre-compiled python wheel covering the majority of our custom kernels through a new library called [
Source link

Tags

README

Getting Started with MII

DeepSpeed-MII allows users to create non-persistent and persistent deployments for supported models in just a few lines of code.

  • Installation
  • Non-Persistent Pipeline
  • Persistent Deployment

Installation

The fasest way to get started is with our PyPI release of DeepSpeed-MII which means you can get started within minutes via:

pip install deepspeed-mii

For ease of use and significant reduction in lengthy compile times that many projects require in this space we distribute a pre-compiled python wheel covering the majority of our custom kernels through a new library called DeepSpeed-Kernels. We have found this library to be very portable across environments with NVIDIA GPUs with compute capabilities 8.0+ (Ampere+), CUDA 11.6+, and Ubuntu 20+. In most cases you shouldn't even need to know this library exists as it is a dependency of DeepSpeed-MII and will be installed with it. However, if for whatever reason you need to compile our kernels manually please see our advanced installation docs.


Persistent Deployment

A persistent deployment is ideal for use with long-running and production applications. The persistent model uses a lightweight GRPC server that can be queried by multiple clients at once. The full example for running a persistent model is only 5 lines. Give it a try!

import mii
client = mii.serve("mistralai/Mistral-7B-v0.1")
response = client.generate(["Deepspeed is", "Seattle is"], max_new_tokens=128)
print(response)

The returned response is a list of Response objects. We can access several details about the generation (e.g., response[0].prompt_length):

  • generated_text: str Text generated by the model.
  • prompt_length: int Number of tokens in the original prompt.
  • generated_length: int Number of tokens generated.
  • finish_reason: str Reason for stopping generation. stop indicates the EOS token was generated and length indicates the generation reached max_new_tokens or max_length.

If we want to generate text from other processes, we can do that too:

client = mii.client("mistralai/Mistral-7B-v0.1")
response = client.generate("Deepspeed is", max_new_tokens=128)

When we no longer need a persistent deployment, we can shutdown the server from any client:

client.terminate_server()

Persistent Deployment Options

While only the model name or path is required to stand up a persistent deployment, we offer customization options to our users.

mii.serve() Options:

  • model_name_or_path: str (Required) Name or local path to a HuggingFace model.
  • max_length: int (Defaults to maximum sequence length in model config) Sets the default maximum token length for the prompt + response.
  • deployment_name: str (Defaults to f"{model_name_or_path}-mii-deployment") A unique identifying string for the persistent model. If provided, client objects should be retrieved with client = mii.client(deployment_name).
  • tensor_parallel: int (Defaults to 1) Number of GPUs to split the model across.
  • replica_num: int (Defaults to 1) The number of model replicas to stand up.
  • enable_restful_api: bool (Defaults to False) When enabled, a RESTful API gateway process is launched that can be queried at http://{host}:{restful_api_port}/mii/{deployment_name}. See the section on RESTful APIs for more details.
  • restful_api_port: int (Defaults to 28080) The port number used to interface with the RESTful API when enable_restful_api is set to True.

mii.client() Options:

  • model_or_deployment_name: str Name of the model or deployment_name passed to mii.serve()

Users can also control the generation characteristic

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.