Skip to content

Latest commit

 

History

History
78 lines (49 loc) · 4.82 KB

msmodeling_optix_user_guide.md

File metadata and controls

78 lines (49 loc) · 4.82 KB

Measured Serving Optimization User Guide

1 Introduction

Measured serving optimization (msmodeling optix) is a feature for measured optimization of serving parameters. It provides two optimization modes: automatic optimization based on the Particle Swarm Optimization (PSO) algorithm and closed-loop tuning based on an AI agent. It supports automatic search on real serving frameworks to obtain the best throughput parameter combination that meets latency requirements such as TTFT/TPOT. For the differences between the two modes, see Optimization Modes: PSO and Agent.

The tool mainly consists of two core functional modules:

  • Parameter optimization module: automatically generates serving parameter combinations and continuously approaches the optimal solution. In PSO mode, the combinations are generated by the built-in PSO algorithm of the tool. In agent mode, the AI agent generates them round by round.
  • Parameter verification module: automatically starts the serving process and the benchmark tool process, performs parameter testing, and obtains performance results. The currently supported serving frameworks include vLLM and MindIE, and the benchmark tools include AISBench and vllm_benchmark.

The tool has been validated on DeepSeek V3.1, GLM5, and Qwen3.5-27b. In principle, it does not limit the range of supported models.

2 Intended Audience and Reading Path

This document is intended for performance engineers and deployment engineers who need to automatically optimize vLLM and MindIE serving deployment parameters. You are advised to read it in the following order:

  1. Environment Preparation and Installation: Install msmodeling in a uv virtual environment and confirm that vLLM/MindIE is deployed on the system.
  2. Quick Start: Complete a default optimization run.
  3. Optimization Modes: PSO and Agent: Learn about the differences between the two optimization modes and the basis for choosing between them.
  4. Configuration File Description and Command Parameters: Learn about all parameters and configuration items.
  5. Output File Description: Filter the optimal parameters according to service SLOs.
  6. Appendix: O&M and troubleshooting. Consult the ternary derived type usage as needed.

3 Environment Preparation and Installation

3.1 Environment Isolation Principles

Confirm that vLLM/MindIE is deployed on the system. For example, install the measured serving optimization optix tool in a vLLM serving container. You are advised to install it in a virtual environment. Run uv sync in the repository root directory to automatically create .venv and complete the installation.

Installing msmodeling also installs packages such as torch and transformers. If you install msModeling in the system Python, it may conflict with the existing torch and transformers versions on the system, which causes the following problems:

  • vLLM or MindIE fails to start, or inference errors occur.
  • The versions do not match those verified on the Ascend inference stack.

3.2 Installation Steps

git clone https://gitcode.com/Ascend/msmodeling.git   # Skip this step if the repository has already been cloned
cd msmodeling
uv sync

Warning

Do not run pip install vllm, mindie_llm, or other deployment packages in the msmodeling virtual environment, and do not install msmodeling in a system Python without a venv. If you have questions, see Recommended Practice: Environment and Deployment Stack for Serving Optimization Through Real-World Testing

3.3 Verifying the Installation

uv run msmodeling optix --help

If the msmodeling optix help information is printed normally, the tool is installed successfully. For the deployment stack check and formal optimization, see Quick Start.

3.4 Uninstallation

uv pip uninstall msmodeling

4 Reference documents