UNIFERENCE: A Discrete Event Simulation Framework for Developing Distributed AI Models
Authors: Doğaç Eldenk, Stephen Xia
Organizations: Department of Computer Science, Northwestern University, Evanston, United States · Department of Computer Engineering, Northwestern University, Evanston, United States
Developing and evaluating distributed inference algorithms remains difficult due to the lack of standardized tools for modeling heterogeneous devices and networks. Existing studies often rely on ad-hoc testbeds or proprietary infrastructure, making results hard to reproduce and limiting exploration of hypothetical hardware or network configurations. We present UNIFERENCE, a discrete-event simulation (DES) framework designed for developing, benchmarking, and deploying distributed AI models within a unified environment. UNIFERENCE models device and network behavior through lightweight logical processes that synchronize only on communication primitives, eliminating rollbacks while preserving the causal order. It integrates seamlessly with PyTorch Distributed, enabling the same codebase to transition from simulation to real deployment. Our evaluation demonstrates that UNIFERENCE profiles runtime with up to 98.6% accuracy compared to real physical deployments across diverse backends and hardware setups. By bridging simulation and deployment, UNIFERENCE provides an accessible, reproducible platform for studying distributed inference algorithms and exploring future system designs, from high-performance clusters to edge-scale devices. The framework is open-sourced at https://github.com/Dogacel/Uniference.
Figures & tables
Framework
Use Case
Network Sim
Integration Complexity
Custom Algorithms
DistSim
Analyze training time and device activities in distributed DNN training
Profiled
N/A
N/A
SimAI
Simulator for AI large-scale training for analyzing performance data
Advanced
High
Not Supported
EdgeAISim
Simulating and modelling AI models in edge computing environments
Simple
Medium
Not Supported
Vidur
LLM inference simulator for deployment conf.
Profiled
Medium
Partial Support
HERMES
Event-driven, multi-stage inference pipeline simulation and optimization
Simple
Low
Partial Support
simPy
Discrete-event simulation
(ns.py)
Medium
Supported
TABLE I: Comparison of existing tools.
Operation
Hops
Total Bandwidth
Description
broadcast
N−1
(N−1)×M
One node sends data to all other nodes in the network
all_gather
N−1
N×(N−1)×M
Each node shares its data with all other nodes
all_reduce
2(N−1)
2(N−1)×M
Performs reduction operation (sum, max, etc.) across all nodes
send
1
M
Point-to-point transfer from one node to a specific destination
recv
1
M
Point-to-point receive from a specific source node
TABLE II: Uniference ’s Supported Distributed Communication Operations
Fig. 1: Discrete Event Simulation Overview
coef
std err
PI
R 2
Const
0.054
0.000
-
0.779
Max tokens
12.19
0.001
24.91
0.325
Yield count
0.191
0.000
0.000
0.999
Device count
0.000
0.000
0.000
0.999
TABLE III: Many token prediction experiment regression results
Hardware
Backend
R 2
MAPE
HPC
NCCL
0.9704
0.1783
HPC
Gloo
0.9999
0.0248
Jetson Orin
Gloo
1.0000
0.0091
TABLE IV: Model performance comparison (R 2 and MAPE).
Hardware
Backend
R 2
MAPE
HPC
NCCL
0.78-0.90
0.2065-0.3626
HPC
Gloo
0.9860
0.0536
TABLE V: Estimation accuracy of real time spent on network
Fig. 2: Uniference Trace Tool showing Voltage [ 16 ] (top) and the improved Kilovolts algorithm (bottom) with the communication overlap on xq .