Skip to main content
python -m benchmark.eval measures a served model’s latency, throughput and output quality from the same requests. Each results file records the commit, hardware, versions, load and judge settings, so another run can be compared on the same terms. The client can drive M*, vLLM-Omni and SGLang-Omni. Two more pages cover comparing a change with its base and Full-Duplex-Bench v1.5. The runner lives in benchmark/eval/ and is not installed as a package, even by an editable install, so run it from the root of a checkout (Install from source); from any other directory Python cannot find benchmark. Install its dependencies in the client environment:

Measure a Kokoro deployment

This example uses the bundled benchmark/assets/t2s.txt sentences, so it needs no dataset download. Install Kokoro’s dependencies first (Kokoro); the eval extra does not include them. The default round-trip WER judge loads openai/whisper-large-v3 and runs after the timed requests. From the repository root:
Each load point writes a results JSON file under results/kokoro, and the report writes kokoro.md and kokoro.png. Read request errors, judge identity and quality scores next to latency and throughput: a faster run with failed or truncated outputs is not an equivalent result. --serve MODEL runs mstar serve MODEL with its own port, socket prefix and upload directory, waits for GET /health, logs to <out>/server-<label>.log and stops the whole process group afterwards. --serve-python names the serving environment’s Python when the client runs in another one. --url measures a server that is already running, and --serve-cmd "<command with {port}>" launches anything else, for example another engine for a side-by-side run. --asr-judge none skips the WER judge; that run makes no quality claim.

How a run is measured

A run is one suite at one or more load points. For each point the runner sends --warmup untimed requests at the measured concurrency, then --repeats passes over the items, scoring each pass on its own. A results file holds one point.
  • Closed loop (--mode closed, default): --concurrency requests in flight at all times. --concurrency 1,4,16 sweeps; each level writes its own file.
  • Open loop (--mode open --rate 1,2,4): Poisson arrivals at each rate, seeded (--arrival-seed) so every system sees the same schedule. --concurrency N caps in-flight requests. Latency is measured from the scheduled arrival, so time spent waiting for a slot counts (slot_wait_s). Each request also records how late the client was against the schedule (arrival_lateness_s); a large arrival_lateness_s_p99 means the client, not the server, set the pace, and the point should not be used.
  • Repeats: every metric is one number per repeat (a p50 over that repeat’s requests, a corpus WER); the summary is the mean and sample standard deviation over repeats. Three repeats is the default.

Results and reports

Each results file (schema: "mstar-eval/1") has config (everything that decides the numbers: data slice, load, repeats, request fields, judges), meta (git commit and dirty flag, GPUs, driver, Python, torch and CUDA versions, the MSTAR_* environment, the server’s /v1/models identity and launch settings, the CLI command), repeats (per-repeat metrics and per-request rows) and summary (mean, std, min, max and n per metric). The serializer redacts values under secret-looking keys and non-loopback hosts under host-like keys and scrubs home-directory names, remote URLs and non-loopback IP addresses from strings. It records a fingerprint for --serve-cmd, and flag names and a fingerprint for --serve-arg. Inspect transcripts before sharing results. Names, private text and credentials in free text can survive scrubbing. A failed request keeps only an error category (HTTP 503 or an exception type). The message goes to <out>/errors-<suite>-<label>-<load>.log next to the server log. report turns any set of files into one markdown table per suite, headed by a provenance line, plus optional PNG charts of metrics against concurrency or rate. --metrics picks the columns. rescore recomputes WER or CER from the transcripts a tts or asr results file holds, with another normalizer, and records that it did, so runs scored differently can be compared without a GPU. It refuses a file whose transcripts were redacted when written:

Suites

tts

Streaming /v1/audio/speech. Per request: time to first audio (first PCM byte after the WAV header), end-to-end latency, audio seconds, RTF, and the playback stalls a real-time player fed by the stream would hit (--stall-prebuffer-ms, --stall-min-ms). Per repeat, optionally: round-trip WER (--asr-judge, Whisper large-v3 by default; CER for zh, ja, ko and th), speaker similarity to each item’s reference clip (--clone sends it as ref_audio; --sim-judge) and UTMOS (--mos). --engine vllm-omni and --engine sglang-omni read those servers’ raw PCM streams. --engine nanovllm-voxcpm posts to Nano-vLLM-VoxCPM’s /generate in the mode M*‘s VoxCPM2 runs for the same item; send --extra cfg_value=2.0 to match M*‘s VoxCPM2 default.

asr

/v1/audio/transcriptions. Corpus WER (CER for character languages) against the manifest, latency percentiles, RTFx (audio seconds per wall second), and with --stream the time to the first transcript delta. A failed request scores as an empty transcript, so errors never lower the WER.

duplex

Streamed /generate for frame-synchronous speech-to-speech models (nemotron_duplex). The output is time-aligned with the input, so latencies are measured in interaction time from a replay: response latency after the user stops, whether the agent took the turn, and on barge-in clips the stop latency and whether it yielded, plus wall time per frame and whether each session kept up with real time. data duplex-synth builds turn-taking and barge-in clips from a 16 kHz ASR manifest.

e2e

The request kinds compare needs beyond speech (--kind): greedy chat with text, image, audio or video in and optionally speech out, seeded image and video generation, voice-clone uploads, VLA actions and streamed world-model frames. It reports latency percentiles, time to first output and requests per second, and saves the kept repeat’s outputs for compare to diff. It builds its own prompts, so --data is optional, and --media points at the media/ directory data e2e builds.

fdb

Full-Duplex-Bench v1.5 on the same streamed /generate client: stop and response latency, LLM-judged behavior labels, semantic quality, and agreement between judges. Its data is non-commercial only; see Full-Duplex-Bench v1.5.

Datasets

A dataset is a JSONL manifest, one item per line, with paths relative to the manifest. A .txt file of sentences also works for tts.
ref_audio and ref_text add a voice-clone prompt, and extra carries suite fields (duplex category, speech_end_s, interrupt_s). An id names the item’s saved audio, so it must be a plain name (letters, digits, ., _, -). To evaluate ASR, build LibriSpeech and point the asr suite at a running ASR server (Speech recognition):
Downloads go to the Hugging Face cache, so set HF_HOME to a large disk on GPU hosts and reuse it across runs. Judge inputs and agreement metrics.

Quality judges

Model-based scores depend on the judge, so every results file names it. Compare only runs scored by the same judge and normalizer.
  • WER normalizers (--normalizer): whisper (default; Whisper’s English normalizer for English items and items with no language, its basic normalizer for every other language), whisper_en (English only; a run with items in another language is refused before it starts), seedtts (the Seed-TTS-eval recipe: punctuation removed except the apostrophe), whisper_basic, basic. Both the corpus rate (wer) and the per-utterance mean (wer_utt_mean, what Seed-TTS-eval publishes) are kept.
  • Speaker similarity uses microsoft/wavlm-base-plus-sv x-vectors. Seed-TTS-eval’s published SIM uses a WavLM-large ECAPA checkpoint, so absolute values differ.
  • UTMOS is UTMOS22 strong from tarepan/SpeechMOS on torch.hub.
Judges run between repeats, after the load has finished, so they never compete with measured requests. --judge-device moves them to another GPU or the CPU.

Other benchmark tools

The checkout also has single-purpose clients. Like benchmark.eval, they are not in the wheel. Each prints its flags with --help.

Adding a suite

Subclass benchmark.eval.suites.base.Suite: declare its CLI flags in add_args, send one request in request (return a row dict; keys starting with _ stay in memory, for example decoded audio for scoring), compute one number per metric in score, list it in benchmark/eval/suites/__init__.py, and add its default table columns to benchmark/eval/report.py. test/modular/test_eval_framework.py runs every suite against a stdlib fake server on CPU; add a case there.

Compare a change

Use the base versus head comparison to run the same suite against two revisions.

Evaluate a conversation

Use Full-Duplex-Bench to score interruptions, backchannels and turn-taking.