# Tokenmill: A Discrete Event Simulator for LLM Inference Clusters Built with Rust

> A discrete event simulator designed specifically for large language model (LLM) inference clusters, supporting multiple schedulers, parallelization strategies, hardware configurations, and performance prediction to help developers perform capacity planning and what-if analysis before actual GPU deployment.

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-06-04T11:42:54.000Z
- 最近活动: 2026-06-04T11:53:51.170Z
- 热度: 163.8
- 关键词: LLM推理, 离散事件模拟, Rust, GPU集群, 性能预测, 容量规划, Tokenmill, 调度器, 量化, 推理优化
- 页面链接: https://www.zingnex.cn/en/forum/thread/tokenmill-rust-llm
- Canonical: https://www.zingnex.cn/forum/thread/tokenmill-rust-llm
- Markdown 来源: floors_fallback

---

## Introduction / Main Post: Tokenmill: A Discrete Event Simulator for LLM Inference Clusters Built with Rust

A discrete event simulator designed specifically for large language model (LLM) inference clusters, supporting multiple schedulers, parallelization strategies, hardware configurations, and performance prediction to help developers perform capacity planning and what-if analysis before actual GPU deployment.

## Original Author and Source

- **Original Author/Maintainer:** lmontigny
- **Source Platform:** GitHub
- **Original Title:** tokenmill
- **Original Link:** https://github.com/lmontigny/tokenmill
- **Release Date:** 2026-06-04

---

## Project Background and Motivation

With the widespread application of large language models (LLMs) across various industries, how to efficiently deploy and scale inference infrastructure has become a core challenge for engineering teams. GPU resources are expensive and in short supply; blind hardware procurement often leads to resource waste or performance bottlenecks. Before actual production deployment, developers urgently need a tool that can simulate real inference loads locally to evaluate the effects of different hardware configurations, scheduling strategies, and optimization techniques.

Tokenmill was created to address this pain point. It is a high-performance discrete event simulator developed with Rust, specifically designed to simulate the behavior of LLM inference clusters. Through precise mathematical modeling and rich configuration options, Tokenmill can predict key metrics such as system latency, throughput, memory usage, and energy consumption before actual deployment.

---

## Core Features and Technical Architecture

Tokenmill's design goal is to provide reliable decision-making basis for capacity planning, hardware selection, and what-if analysis. It has built-in support for almost all key components in modern LLM inference systems:

## Scheduler Support

The simulator implements multiple mainstream scheduling strategies in the industry, including continuous batching (Orca), chunked prefill (Sarathi), and mechanisms supporting preemption and recomputation. These schedulers directly affect request queuing latency and GPU utilization, which are key links in performance tuning.

## Parallelization Strategy Modeling

Tokenmill supports tensor parallelism (TP), pipeline parallelism (PP), expert parallelism (EP), and the decoupled prefill/decode architecture. Users can flexibly combine these parallelization strategies based on model size and hardware configuration to simulate various scenarios from small-scale single-card deployment to large-scale multi-node clusters.

## Hardware Coverage

The project has built-in rich hardware presets covering accelerators such as NVIDIA Rubin (2026), B200, H200, H100, A100, A10G; AMD MI300X/MI325X/MI355X; Google TPU v7-Ironwood/8T/8I; as well as Groq LPU-v1 and Cerebras CS-3/WSE-3. It also supports preset configurations for integrated systems like DGX H100/H200/B200.

## Performance Prediction Dimensions

The simulator can output multi-dimensional performance metrics, including histogram statistics (p50/p95/p99) of TTFT (Time to First Token) and TPOT (Time per Output Token), overall throughput, KV cache utilization, number of preemptions, per-chip TDP power consumption model, total energy consumption, and cost estimation based on GPU hourly prices.

---
