agentx-harness 1.0.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (841) hide show
  1. agentx_cli.py +58 -0
  2. agentx_harness-1.0.7.dist-info/METADATA +402 -0
  3. agentx_harness-1.0.7.dist-info/RECORD +841 -0
  4. agentx_harness-1.0.7.dist-info/WHEEL +4 -0
  5. agentx_harness-1.0.7.dist-info/entry_points.txt +6 -0
  6. agentx_harness-1.0.7.dist-info/licenses/ATTRIBUTIONS.md +238 -0
  7. agentx_harness-1.0.7.dist-info/licenses/LICENSE +201 -0
  8. aiperf/__init__.py +17 -0
  9. aiperf/__main__.py +7 -0
  10. aiperf/_build_info.py +1 -0
  11. aiperf/accuracy/__init__.py +3 -0
  12. aiperf/accuracy/accumulator.py +131 -0
  13. aiperf/accuracy/accuracy_console_exporter.py +142 -0
  14. aiperf/accuracy/accuracy_data_exporter.py +108 -0
  15. aiperf/accuracy/accuracy_record_processor.py +217 -0
  16. aiperf/accuracy/benchmark_loader.py +45 -0
  17. aiperf/accuracy/benchmarks/__init__.py +3 -0
  18. aiperf/accuracy/benchmarks/_datasets_compat.py +38 -0
  19. aiperf/accuracy/benchmarks/aime.py +236 -0
  20. aiperf/accuracy/benchmarks/aime24.py +109 -0
  21. aiperf/accuracy/benchmarks/aime25.py +85 -0
  22. aiperf/accuracy/benchmarks/bigbench.py +239 -0
  23. aiperf/accuracy/benchmarks/gpqa_diamond.py +219 -0
  24. aiperf/accuracy/benchmarks/gsm8k.py +123 -0
  25. aiperf/accuracy/benchmarks/hellaswag.py +328 -0
  26. aiperf/accuracy/benchmarks/lcb_codegeneration.py +259 -0
  27. aiperf/accuracy/benchmarks/math_500.py +118 -0
  28. aiperf/accuracy/benchmarks/mmlu.py +350 -0
  29. aiperf/accuracy/benchmarks/mmlu_pro.py +159 -0
  30. aiperf/accuracy/graders/__init__.py +3 -0
  31. aiperf/accuracy/graders/_choice_extract.py +55 -0
  32. aiperf/accuracy/graders/_codegen_worker.py +209 -0
  33. aiperf/accuracy/graders/_codegen_worker_client.py +283 -0
  34. aiperf/accuracy/graders/_math_strip.py +385 -0
  35. aiperf/accuracy/graders/base.py +79 -0
  36. aiperf/accuracy/graders/code_execution.py +352 -0
  37. aiperf/accuracy/graders/exact_match.py +77 -0
  38. aiperf/accuracy/graders/gsm8k_grader.py +176 -0
  39. aiperf/accuracy/graders/lighteval_grader.py +295 -0
  40. aiperf/accuracy/graders/math.py +623 -0
  41. aiperf/accuracy/graders/mmlu_pro.py +57 -0
  42. aiperf/accuracy/graders/multiple_choice.py +102 -0
  43. aiperf/accuracy/jsonl_writer.py +73 -0
  44. aiperf/accuracy/models.py +280 -0
  45. aiperf/accuracy/protocols.py +34 -0
  46. aiperf/analysis/__init__.py +3 -0
  47. aiperf/analysis/fzstd.umd.js +31 -0
  48. aiperf/analysis/speed_bench_report.py +435 -0
  49. aiperf/analysis/sweepline.py +599 -0
  50. aiperf/analysis/sweepline_kv_cache.py +353 -0
  51. aiperf/analysis/sweepline_stats.py +218 -0
  52. aiperf/analysis/swim_lane.py +1185 -0
  53. aiperf/analysis/swim_lane_viewer.html +2014 -0
  54. aiperf/analysis/turn_messages.py +379 -0
  55. aiperf/analysis/turn_messages_viewer.html +158 -0
  56. aiperf/api/__init__.py +11 -0
  57. aiperf/api/api_service.py +216 -0
  58. aiperf/api/routers/__init__.py +4 -0
  59. aiperf/api/routers/base_router.py +49 -0
  60. aiperf/api/routers/core.py +76 -0
  61. aiperf/api/routers/metrics.py +164 -0
  62. aiperf/api/routers/progress.py +44 -0
  63. aiperf/api/routers/results.py +164 -0
  64. aiperf/api/routers/workers.py +38 -0
  65. aiperf/cli.py +42 -0
  66. aiperf/cli_commands/__init__.py +7 -0
  67. aiperf/cli_commands/_chat_stats.py +186 -0
  68. aiperf/cli_commands/analyze.py +26 -0
  69. aiperf/cli_commands/analyze_trace.py +29 -0
  70. aiperf/cli_commands/chat.py +425 -0
  71. aiperf/cli_commands/config.py +147 -0
  72. aiperf/cli_commands/plot.py +83 -0
  73. aiperf/cli_commands/plugins.py +60 -0
  74. aiperf/cli_commands/profile.py +77 -0
  75. aiperf/cli_commands/service.py +95 -0
  76. aiperf/cli_commands/speed_bench_report.py +62 -0
  77. aiperf/cli_commands/swim_lane.py +90 -0
  78. aiperf/cli_commands/synthesize.py +51 -0
  79. aiperf/cli_commands/turn_messages.py +82 -0
  80. aiperf/cli_commands/validate.py +36 -0
  81. aiperf/cli_runner/__init__.py +114 -0
  82. aiperf/cli_runner/_aggregate.py +331 -0
  83. aiperf/cli_runner/_banner.py +62 -0
  84. aiperf/cli_runner/_callbacks.py +81 -0
  85. aiperf/cli_runner/_multi_run.py +333 -0
  86. aiperf/cli_runner/_pareto.py +143 -0
  87. aiperf/cli_runner/_post_process.py +109 -0
  88. aiperf/cli_runner/_preflight.py +215 -0
  89. aiperf/cli_runner/_process_setup.py +134 -0
  90. aiperf/cli_runner/_single_run.py +112 -0
  91. aiperf/cli_runner/_strategy.py +169 -0
  92. aiperf/cli_runner/_sweep_aggregate.py +689 -0
  93. aiperf/cli_runner/_sweep_table.py +248 -0
  94. aiperf/cli_utils.py +172 -0
  95. aiperf/common/__init__.py +3 -0
  96. aiperf/common/accumulator_protocols.py +230 -0
  97. aiperf/common/aiperf_logger.py +246 -0
  98. aiperf/common/base_comms.py +209 -0
  99. aiperf/common/base_component_service.py +159 -0
  100. aiperf/common/base_service.py +198 -0
  101. aiperf/common/bootstrap.py +502 -0
  102. aiperf/common/compression.py +161 -0
  103. aiperf/common/constants.py +41 -0
  104. aiperf/common/enums/__init__.py +180 -0
  105. aiperf/common/enums/base_enums.py +100 -0
  106. aiperf/common/enums/baseline_enums.py +43 -0
  107. aiperf/common/enums/enums.py +785 -0
  108. aiperf/common/enums/metric_enums.py +842 -0
  109. aiperf/common/environment.py +1897 -0
  110. aiperf/common/event_loop_monitor.py +93 -0
  111. aiperf/common/exceptions.py +234 -0
  112. aiperf/common/finite.py +175 -0
  113. aiperf/common/growable_array.py +384 -0
  114. aiperf/common/hash_id_random_generator.py +77 -0
  115. aiperf/common/hooks.py +540 -0
  116. aiperf/common/logging.py +390 -0
  117. aiperf/common/loop_scheduler.py +458 -0
  118. aiperf/common/messages/__init__.py +140 -0
  119. aiperf/common/messages/accuracy_messages.py +20 -0
  120. aiperf/common/messages/base_messages.py +87 -0
  121. aiperf/common/messages/baseline_messages.py +39 -0
  122. aiperf/common/messages/command_messages.py +328 -0
  123. aiperf/common/messages/dataset_messages.py +109 -0
  124. aiperf/common/messages/inference_messages.py +128 -0
  125. aiperf/common/messages/network_latency_messages.py +37 -0
  126. aiperf/common/messages/progress_messages.py +93 -0
  127. aiperf/common/messages/server_metrics_messages.py +68 -0
  128. aiperf/common/messages/service_messages.py +73 -0
  129. aiperf/common/messages/telemetry_messages.py +83 -0
  130. aiperf/common/messages/worker_messages.py +41 -0
  131. aiperf/common/metric_utils.py +41 -0
  132. aiperf/common/mixins/__init__.py +70 -0
  133. aiperf/common/mixins/aiperf_lifecycle_mixin.py +343 -0
  134. aiperf/common/mixins/aiperf_logger_mixin.py +116 -0
  135. aiperf/common/mixins/base_metrics_collector_mixin.py +637 -0
  136. aiperf/common/mixins/base_mixin.py +19 -0
  137. aiperf/common/mixins/baseline_collector_mixin.py +32 -0
  138. aiperf/common/mixins/buffered_jsonl_writer_mixin.py +377 -0
  139. aiperf/common/mixins/command_handler_mixin.py +359 -0
  140. aiperf/common/mixins/communication_mixin.py +33 -0
  141. aiperf/common/mixins/health_check_mixin.py +76 -0
  142. aiperf/common/mixins/health_server_mixin.py +182 -0
  143. aiperf/common/mixins/hooks_mixin.py +196 -0
  144. aiperf/common/mixins/message_bus_mixin.py +164 -0
  145. aiperf/common/mixins/process_health_mixin.py +48 -0
  146. aiperf/common/mixins/progress_tracker_mixin.py +221 -0
  147. aiperf/common/mixins/pull_client_mixin.py +62 -0
  148. aiperf/common/mixins/realtime_metrics_mixin.py +30 -0
  149. aiperf/common/mixins/realtime_telemetry_metrics_mixin.py +36 -0
  150. aiperf/common/mixins/reply_client_mixin.py +57 -0
  151. aiperf/common/mixins/task_manager_mixin.py +116 -0
  152. aiperf/common/mixins/worker_tracker_mixin.py +71 -0
  153. aiperf/common/models/__init__.py +285 -0
  154. aiperf/common/models/auto_routed_model.py +131 -0
  155. aiperf/common/models/base_models.py +19 -0
  156. aiperf/common/models/branch.py +120 -0
  157. aiperf/common/models/branch_stats.py +85 -0
  158. aiperf/common/models/credit_models.py +339 -0
  159. aiperf/common/models/dataset_models.py +746 -0
  160. aiperf/common/models/error_models.py +137 -0
  161. aiperf/common/models/export_models.py +378 -0
  162. aiperf/common/models/extracted_payload.py +67 -0
  163. aiperf/common/models/health_models.py +64 -0
  164. aiperf/common/models/model_endpoint_info.py +236 -0
  165. aiperf/common/models/network_latency_models.py +154 -0
  166. aiperf/common/models/prerequisites.py +62 -0
  167. aiperf/common/models/progress_models.py +56 -0
  168. aiperf/common/models/record_models.py +1737 -0
  169. aiperf/common/models/sequence_distribution.py +519 -0
  170. aiperf/common/models/server_metrics_models.py +801 -0
  171. aiperf/common/models/service_models.py +42 -0
  172. aiperf/common/models/spec_decode_models.py +175 -0
  173. aiperf/common/models/telemetry_models.py +711 -0
  174. aiperf/common/models/trace_models.py +636 -0
  175. aiperf/common/models/usage_models.py +401 -0
  176. aiperf/common/models/worker_models.py +39 -0
  177. aiperf/common/optional_dependencies.py +34 -0
  178. aiperf/common/path_safety.py +55 -0
  179. aiperf/common/phase.py +29 -0
  180. aiperf/common/protocols.py +417 -0
  181. aiperf/common/random_generator.py +528 -0
  182. aiperf/common/readiness_probe.py +433 -0
  183. aiperf/common/redact.py +349 -0
  184. aiperf/common/resource_tracker.py +41 -0
  185. aiperf/common/scenario/__init__.py +30 -0
  186. aiperf/common/scenario/base.py +270 -0
  187. aiperf/common/scenario/context_overflow.py +105 -0
  188. aiperf/common/scenario/inferencex_agentx_mvp.py +70 -0
  189. aiperf/common/scenario/registry.py +18 -0
  190. aiperf/common/scenario/validator.py +837 -0
  191. aiperf/common/session_id_generator.py +88 -0
  192. aiperf/common/singleton.py +90 -0
  193. aiperf/common/tokenizer.py +819 -0
  194. aiperf/common/tokenizer_display.py +401 -0
  195. aiperf/common/tokenizer_fake_names.py +73 -0
  196. aiperf/common/tokenizer_validator.py +640 -0
  197. aiperf/common/types.py +71 -0
  198. aiperf/common/utils.py +210 -0
  199. aiperf/common/validators/__init__.py +6 -0
  200. aiperf/common/validators/orchestrator_v1.py +415 -0
  201. aiperf/config/__init__.py +324 -0
  202. aiperf/config/_cli_runner_templates.py +171 -0
  203. aiperf/config/accuracy.py +198 -0
  204. aiperf/config/adaptive_scale_phase.py +461 -0
  205. aiperf/config/artifacts.py +408 -0
  206. aiperf/config/base.py +24 -0
  207. aiperf/config/cancellation.py +42 -0
  208. aiperf/config/cli_parameter.py +62 -0
  209. aiperf/config/cli_runner.py +218 -0
  210. aiperf/config/comm/__init__.py +43 -0
  211. aiperf/config/comm/base.py +150 -0
  212. aiperf/config/comm/build.py +114 -0
  213. aiperf/config/comm/dual_bind.py +383 -0
  214. aiperf/config/comm/inputs.py +270 -0
  215. aiperf/config/comm/ipc.py +367 -0
  216. aiperf/config/comm/tcp.py +207 -0
  217. aiperf/config/config.py +984 -0
  218. aiperf/config/dataset/__init__.py +47 -0
  219. aiperf/config/dataset/config.py +994 -0
  220. aiperf/config/dataset/content.py +545 -0
  221. aiperf/config/dataset/defaults.py +138 -0
  222. aiperf/config/dataset/resolver.py +534 -0
  223. aiperf/config/dataset/trace.py +112 -0
  224. aiperf/config/dataset/video.py +222 -0
  225. aiperf/config/distributions.py +531 -0
  226. aiperf/config/endpoint.py +566 -0
  227. aiperf/config/flags/__init__.py +36 -0
  228. aiperf/config/flags/_converter_dataset.py +1098 -0
  229. aiperf/config/flags/_converter_endpoint.py +114 -0
  230. aiperf/config/flags/_converter_optionals.py +520 -0
  231. aiperf/config/flags/_converter_profiling.py +493 -0
  232. aiperf/config/flags/_converter_runtime.py +181 -0
  233. aiperf/config/flags/_converter_telemetry.py +500 -0
  234. aiperf/config/flags/_converter_warmup.py +172 -0
  235. aiperf/config/flags/_resolver_gpu_telemetry.py +57 -0
  236. aiperf/config/flags/_resolver_helpers.py +40 -0
  237. aiperf/config/flags/_resolver_server_metrics.py +72 -0
  238. aiperf/config/flags/_section_fields.py +272 -0
  239. aiperf/config/flags/cli_config.py +4183 -0
  240. aiperf/config/flags/converter.py +829 -0
  241. aiperf/config/flags/recipes.py +289 -0
  242. aiperf/config/flags/resolver.py +549 -0
  243. aiperf/config/flags/variant_parser.py +180 -0
  244. aiperf/config/gpu_telemetry.py +155 -0
  245. aiperf/config/loader/__init__.py +137 -0
  246. aiperf/config/loader/core.py +789 -0
  247. aiperf/config/loader/dotted_path.py +103 -0
  248. aiperf/config/loader/duration.py +64 -0
  249. aiperf/config/loader/env_vars.py +139 -0
  250. aiperf/config/loader/errors.py +59 -0
  251. aiperf/config/loader/helpers.py +183 -0
  252. aiperf/config/loader/jinja.py +342 -0
  253. aiperf/config/loader/normalizers.py +209 -0
  254. aiperf/config/loader/parsing.py +457 -0
  255. aiperf/config/loader/plan.py +171 -0
  256. aiperf/config/logging.py +46 -0
  257. aiperf/config/metrics.py +22 -0
  258. aiperf/config/mlflow.py +112 -0
  259. aiperf/config/models.py +163 -0
  260. aiperf/config/network_latency.py +85 -0
  261. aiperf/config/otel.py +63 -0
  262. aiperf/config/phases.py +745 -0
  263. aiperf/config/plot.py +250 -0
  264. aiperf/config/ramp.py +60 -0
  265. aiperf/config/rate_series.py +132 -0
  266. aiperf/config/resolution/__init__.py +76 -0
  267. aiperf/config/resolution/plan.py +464 -0
  268. aiperf/config/resolution/predicates.py +250 -0
  269. aiperf/config/resolution/resolvers.py +428 -0
  270. aiperf/config/runtime.py +226 -0
  271. aiperf/config/schema/README.md +111 -0
  272. aiperf/config/schema/aiperf-config.schema.json +23372 -0
  273. aiperf/config/server_metrics.py +179 -0
  274. aiperf/config/slos.py +32 -0
  275. aiperf/config/sweep/__init__.py +61 -0
  276. aiperf/config/sweep/adaptive.py +166 -0
  277. aiperf/config/sweep/config.py +781 -0
  278. aiperf/config/sweep/expand.py +701 -0
  279. aiperf/config/sweep/expand_qmc.py +129 -0
  280. aiperf/config/sweep/multi_run.py +159 -0
  281. aiperf/config/sweep/sampling.py +249 -0
  282. aiperf/config/templates/README.md +181 -0
  283. aiperf/config/templates/__init__.py +31 -0
  284. aiperf/config/templates/audio_multimodal.yaml +74 -0
  285. aiperf/config/templates/data/precise_schedule.jsonl +8 -0
  286. aiperf/config/templates/data/production_trace.jsonl +10 -0
  287. aiperf/config/templates/discovery.py +227 -0
  288. aiperf/config/templates/embeddings.yaml +63 -0
  289. aiperf/config/templates/env_var_production.yaml +96 -0
  290. aiperf/config/templates/fixed_schedule.yaml +74 -0
  291. aiperf/config/templates/goodput_slo.yaml +72 -0
  292. aiperf/config/templates/gpu_telemetry.yaml +75 -0
  293. aiperf/config/templates/http_trace_metrics.yaml +74 -0
  294. aiperf/config/templates/inline_dataset.yaml +77 -0
  295. aiperf/config/templates/jinja2_variables.yaml +89 -0
  296. aiperf/config/templates/kv_cache_test.yaml +82 -0
  297. aiperf/config/templates/latency_test.yaml +58 -0
  298. aiperf/config/templates/long_context.yaml +81 -0
  299. aiperf/config/templates/minimal.yaml +45 -0
  300. aiperf/config/templates/multi_turn_conversation.yaml +66 -0
  301. aiperf/config/templates/multi_url_load_balancing.yaml +74 -0
  302. aiperf/config/templates/multimodal_vision.yaml +65 -0
  303. aiperf/config/templates/public_dataset.yaml +57 -0
  304. aiperf/config/templates/ramping.yaml +72 -0
  305. aiperf/config/templates/request_cancellation.yaml +77 -0
  306. aiperf/config/templates/scenario_workload_profiles.yaml +136 -0
  307. aiperf/config/templates/speed_bench_sweep.yaml +112 -0
  308. aiperf/config/templates/sweep_distributions.yaml +83 -0
  309. aiperf/config/templates/sweep_with_plot.yaml +225 -0
  310. aiperf/config/templates/time_based_soak.yaml +76 -0
  311. aiperf/config/templates/trace_replay.yaml +76 -0
  312. aiperf/config/templates/user_files.yaml +130 -0
  313. aiperf/config/templates/warmup_profiling.yaml +61 -0
  314. aiperf/config/tokenizer.py +122 -0
  315. aiperf/config/types.py +165 -0
  316. aiperf/config/user_files.py +323 -0
  317. aiperf/config/wandb.py +106 -0
  318. aiperf/controller/__init__.py +3 -0
  319. aiperf/controller/base_service_manager.py +115 -0
  320. aiperf/controller/controller_utils.py +158 -0
  321. aiperf/controller/kubernetes_service_manager.py +84 -0
  322. aiperf/controller/multiprocess_service_manager.py +302 -0
  323. aiperf/controller/protocols.py +62 -0
  324. aiperf/controller/proxy_manager.py +73 -0
  325. aiperf/controller/result_join_coordinator.py +67 -0
  326. aiperf/controller/system_controller.py +1310 -0
  327. aiperf/controller/system_mixins.py +83 -0
  328. aiperf/credit/__init__.py +3 -0
  329. aiperf/credit/callback_handler.py +675 -0
  330. aiperf/credit/dispatch.py +44 -0
  331. aiperf/credit/issuer.py +628 -0
  332. aiperf/credit/messages.py +180 -0
  333. aiperf/credit/sticky_router.py +751 -0
  334. aiperf/credit/structs.py +233 -0
  335. aiperf/dataset/__init__.py +3 -0
  336. aiperf/dataset/_mp_context.py +148 -0
  337. aiperf/dataset/_tokenizer_preload.py +133 -0
  338. aiperf/dataset/agentic_code_gen/__init__.py +8 -0
  339. aiperf/dataset/agentic_code_gen/cli.py +153 -0
  340. aiperf/dataset/agentic_code_gen/config.py +150 -0
  341. aiperf/dataset/agentic_code_gen/configs/default.json +19 -0
  342. aiperf/dataset/agentic_code_gen/configs/spec.json +423 -0
  343. aiperf/dataset/agentic_code_gen/datasets/1k_sessions_200k_ctx/README.md +35 -0
  344. aiperf/dataset/agentic_code_gen/datasets/1k_sessions_200k_ctx/manifest.json +72 -0
  345. aiperf/dataset/agentic_code_gen/distributions.py +104 -0
  346. aiperf/dataset/agentic_code_gen/models.py +523 -0
  347. aiperf/dataset/agentic_code_gen/prefix_model.py +199 -0
  348. aiperf/dataset/agentic_code_gen/reporting/__init__.py +4 -0
  349. aiperf/dataset/agentic_code_gen/reporting/cache_explorer.py +137 -0
  350. aiperf/dataset/agentic_code_gen/reporting/comparison.py +157 -0
  351. aiperf/dataset/agentic_code_gen/reporting/metrics.py +472 -0
  352. aiperf/dataset/agentic_code_gen/reporting/plot_report.py +189 -0
  353. aiperf/dataset/agentic_code_gen/reporting/report.py +249 -0
  354. aiperf/dataset/agentic_code_gen/reporting/simulation.py +46 -0
  355. aiperf/dataset/agentic_code_gen/reporting/simulation_engine.py +539 -0
  356. aiperf/dataset/agentic_code_gen/reporting/templates/__init__.py +31 -0
  357. aiperf/dataset/agentic_code_gen/reporting/templates/cache_explorer.html +171 -0
  358. aiperf/dataset/agentic_code_gen/reporting/templates/report.html +81 -0
  359. aiperf/dataset/agentic_code_gen/reporting/templates/simulation.html +1185 -0
  360. aiperf/dataset/agentic_code_gen/reporting/trace.py +152 -0
  361. aiperf/dataset/agentic_code_gen/session_synthesizer.py +533 -0
  362. aiperf/dataset/agentic_code_gen/writer.py +111 -0
  363. aiperf/dataset/composer/__init__.py +15 -0
  364. aiperf/dataset/composer/base.py +581 -0
  365. aiperf/dataset/composer/custom.py +342 -0
  366. aiperf/dataset/composer/public.py +169 -0
  367. aiperf/dataset/composer/synthetic.py +277 -0
  368. aiperf/dataset/composer/synthetic_rankings.py +114 -0
  369. aiperf/dataset/dataset_manager.py +1178 -0
  370. aiperf/dataset/dataset_samplers.py +86 -0
  371. aiperf/dataset/generator/__init__.py +17 -0
  372. aiperf/dataset/generator/assets/shakespeare.txt +142720 -0
  373. aiperf/dataset/generator/assets/source_images/0bfd8fdf-457f-43c8-9253-a2346d37d26a_1024.jpg +0 -0
  374. aiperf/dataset/generator/assets/source_images/119544eb-9bbf-47d1-8d93-a51de6370295_861.jpg +0 -0
  375. aiperf/dataset/generator/assets/source_images/1ba066e0-7291-4ef4-8a6e-e8724af7f046_865.jpg +0 -0
  376. aiperf/dataset/generator/assets/source_images/c946f826-4a9a-4ca2-b891-9f791d38092b_1024.jpg +0 -0
  377. aiperf/dataset/generator/audio.py +193 -0
  378. aiperf/dataset/generator/base.py +55 -0
  379. aiperf/dataset/generator/coding_content.py +4213 -0
  380. aiperf/dataset/generator/corpus.py +38 -0
  381. aiperf/dataset/generator/image.py +180 -0
  382. aiperf/dataset/generator/parallel_decode.py +149 -0
  383. aiperf/dataset/generator/prompt.py +578 -0
  384. aiperf/dataset/generator/video.py +506 -0
  385. aiperf/dataset/loader/__init__.py +40 -0
  386. aiperf/dataset/loader/_baseten_replay_timemodel.py +59 -0
  387. aiperf/dataset/loader/_dag_jsonl_helpers.py +301 -0
  388. aiperf/dataset/loader/_delay_cap.py +133 -0
  389. aiperf/dataset/loader/accuracy_dataset_loader.py +161 -0
  390. aiperf/dataset/loader/bailian_trace.py +159 -0
  391. aiperf/dataset/loader/base_hf_dataset.py +215 -0
  392. aiperf/dataset/loader/base_loader.py +208 -0
  393. aiperf/dataset/loader/base_public_dataset.py +201 -0
  394. aiperf/dataset/loader/base_trace_loader.py +534 -0
  395. aiperf/dataset/loader/baseten_trace.py +730 -0
  396. aiperf/dataset/loader/burst_gpt.py +159 -0
  397. aiperf/dataset/loader/dag_jsonl.py +505 -0
  398. aiperf/dataset/loader/dag_jsonl_models.py +205 -0
  399. aiperf/dataset/loader/exgentic.py +495 -0
  400. aiperf/dataset/loader/exgentic_filters.py +122 -0
  401. aiperf/dataset/loader/exgentic_v2.py +13 -0
  402. aiperf/dataset/loader/hash_ids_synthesis.py +109 -0
  403. aiperf/dataset/loader/hf_asr.py +155 -0
  404. aiperf/dataset/loader/hf_conversation.py +282 -0
  405. aiperf/dataset/loader/hf_instruction_response.py +128 -0
  406. aiperf/dataset/loader/inputs_json.py +125 -0
  407. aiperf/dataset/loader/mixins.py +216 -0
  408. aiperf/dataset/loader/mmvu.py +98 -0
  409. aiperf/dataset/loader/models.py +521 -0
  410. aiperf/dataset/loader/mooncake_trace.py +153 -0
  411. aiperf/dataset/loader/mt_bench.py +89 -0
  412. aiperf/dataset/loader/multi_turn.py +329 -0
  413. aiperf/dataset/loader/parallel_convert.py +428 -0
  414. aiperf/dataset/loader/random_pool.py +440 -0
  415. aiperf/dataset/loader/raw_payload.py +191 -0
  416. aiperf/dataset/loader/sagemaker_data_capture.py +329 -0
  417. aiperf/dataset/loader/selection.py +89 -0
  418. aiperf/dataset/loader/semianalysis_cc_traces_weka.py +225 -0
  419. aiperf/dataset/loader/sharegpt.py +238 -0
  420. aiperf/dataset/loader/single_turn.py +171 -0
  421. aiperf/dataset/loader/spec_bench.py +97 -0
  422. aiperf/dataset/loader/speed_bench.py +252 -0
  423. aiperf/dataset/loader/weka_agent_chains.py +740 -0
  424. aiperf/dataset/loader/weka_metric_prepass.py +48 -0
  425. aiperf/dataset/loader/weka_parallel_convert.py +826 -0
  426. aiperf/dataset/loader/weka_prompt_compose.py +47 -0
  427. aiperf/dataset/loader/weka_synth_buf.py +722 -0
  428. aiperf/dataset/loader/weka_tool_shape.py +79 -0
  429. aiperf/dataset/loader/weka_trace.py +2562 -0
  430. aiperf/dataset/loader/weka_trace_models.py +165 -0
  431. aiperf/dataset/memory_map_utils.py +879 -0
  432. aiperf/dataset/mmap_cache.py +888 -0
  433. aiperf/dataset/mmap_cache_lock.py +230 -0
  434. aiperf/dataset/payload_formatting.py +64 -0
  435. aiperf/dataset/protocols.py +218 -0
  436. aiperf/dataset/provenance.py +48 -0
  437. aiperf/dataset/synthesis/__init__.py +27 -0
  438. aiperf/dataset/synthesis/cli.py +79 -0
  439. aiperf/dataset/synthesis/empirical_sampler.py +88 -0
  440. aiperf/dataset/synthesis/graph_utils.py +145 -0
  441. aiperf/dataset/synthesis/models.py +129 -0
  442. aiperf/dataset/synthesis/prefix_analyzer.py +277 -0
  443. aiperf/dataset/synthesis/radix_tree.py +174 -0
  444. aiperf/dataset/synthesis/rolling_hasher.py +235 -0
  445. aiperf/dataset/synthesis/synthesizer.py +296 -0
  446. aiperf/dataset/utils.py +174 -0
  447. aiperf/endpoints/__init__.py +3 -0
  448. aiperf/endpoints/_openai_responses_replay.py +105 -0
  449. aiperf/endpoints/anthropic_messages.py +834 -0
  450. aiperf/endpoints/base_endpoint.py +609 -0
  451. aiperf/endpoints/base_rankings_endpoint.py +124 -0
  452. aiperf/endpoints/chat_embeddings.py +38 -0
  453. aiperf/endpoints/cohere_rankings.py +30 -0
  454. aiperf/endpoints/hf_tei_rankings.py +24 -0
  455. aiperf/endpoints/huggingface_generate.py +108 -0
  456. aiperf/endpoints/nim_embeddings.py +57 -0
  457. aiperf/endpoints/nim_image_retrieval.py +90 -0
  458. aiperf/endpoints/nim_rankings.py +29 -0
  459. aiperf/endpoints/openai_chat.py +450 -0
  460. aiperf/endpoints/openai_completions.py +142 -0
  461. aiperf/endpoints/openai_embeddings.py +133 -0
  462. aiperf/endpoints/openai_image_edit.py +191 -0
  463. aiperf/endpoints/openai_image_generation.py +123 -0
  464. aiperf/endpoints/openai_responses.py +589 -0
  465. aiperf/endpoints/openai_video_generation.py +120 -0
  466. aiperf/endpoints/payload_extraction.py +325 -0
  467. aiperf/endpoints/protocols.py +37 -0
  468. aiperf/endpoints/raw_endpoint.py +49 -0
  469. aiperf/endpoints/response_mixin.py +113 -0
  470. aiperf/endpoints/solido_rag.py +110 -0
  471. aiperf/endpoints/template_endpoint.py +194 -0
  472. aiperf/exporters/__init__.py +3 -0
  473. aiperf/exporters/aggregate/__init__.py +33 -0
  474. aiperf/exporters/aggregate/aggregate_base_exporter.py +246 -0
  475. aiperf/exporters/aggregate/aggregate_confidence_csv_exporter.py +135 -0
  476. aiperf/exporters/aggregate/aggregate_confidence_json_exporter.py +158 -0
  477. aiperf/exporters/aggregate/aggregate_detailed_json_exporter.py +42 -0
  478. aiperf/exporters/aggregate/aggregate_sweep_csv_exporter.py +192 -0
  479. aiperf/exporters/aggregate/aggregate_sweep_json_exporter.py +97 -0
  480. aiperf/exporters/console_api_error_exporter.py +127 -0
  481. aiperf/exporters/console_error_exporter.py +50 -0
  482. aiperf/exporters/console_gpu_vendor_disclaimer_exporter.py +59 -0
  483. aiperf/exporters/console_metrics_exporter.py +252 -0
  484. aiperf/exporters/console_osl_mismatch_exporter.py +117 -0
  485. aiperf/exporters/console_power_efficiency_exporter.py +39 -0
  486. aiperf/exporters/console_spec_decode_exporter.py +80 -0
  487. aiperf/exporters/console_usage_discrepancy_exporter.py +89 -0
  488. aiperf/exporters/experimental_metrics_console_exporter.py +22 -0
  489. aiperf/exporters/exporter_config.py +33 -0
  490. aiperf/exporters/exporter_manager.py +431 -0
  491. aiperf/exporters/gpu_telemetry_console_exporter.py +231 -0
  492. aiperf/exporters/http_trace_console_exporter.py +25 -0
  493. aiperf/exporters/internal_metrics_console_exporter.py +22 -0
  494. aiperf/exporters/metrics_base_exporter.py +105 -0
  495. aiperf/exporters/metrics_csv_exporter.py +296 -0
  496. aiperf/exporters/metrics_json_exporter.py +248 -0
  497. aiperf/exporters/mlflow_data_exporter.py +505 -0
  498. aiperf/exporters/mlflow_export_subprocess.py +113 -0
  499. aiperf/exporters/mlflow_metadata.py +76 -0
  500. aiperf/exporters/outputs_json_exporter.py +131 -0
  501. aiperf/exporters/protocols.py +38 -0
  502. aiperf/exporters/search_history.py +331 -0
  503. aiperf/exporters/sglang/__init__.py +2 -0
  504. aiperf/exporters/sglang/speculative_decoding_console_exporter.py +285 -0
  505. aiperf/exporters/timeslice_metrics_csv_exporter.py +110 -0
  506. aiperf/exporters/timeslice_metrics_json_exporter.py +96 -0
  507. aiperf/exporters/utils.py +23 -0
  508. aiperf/exporters/wandb_data_exporter.py +195 -0
  509. aiperf/exporters/wandb_export_subprocess.py +106 -0
  510. aiperf/gpu_telemetry/__init__.py +3 -0
  511. aiperf/gpu_telemetry/accumulator.py +552 -0
  512. aiperf/gpu_telemetry/amdsmi_collector.py +540 -0
  513. aiperf/gpu_telemetry/constants.py +150 -0
  514. aiperf/gpu_telemetry/dcgm_collector.py +209 -0
  515. aiperf/gpu_telemetry/jsonl_writer.py +79 -0
  516. aiperf/gpu_telemetry/manager.py +564 -0
  517. aiperf/gpu_telemetry/metrics_config.py +245 -0
  518. aiperf/gpu_telemetry/protocols.py +95 -0
  519. aiperf/gpu_telemetry/pynvml_collector.py +482 -0
  520. aiperf/metrics/__init__.py +32 -0
  521. aiperf/metrics/_column_store_handlers.py +74 -0
  522. aiperf/metrics/accumulator.py +891 -0
  523. aiperf/metrics/accumulator_models.py +74 -0
  524. aiperf/metrics/accumulator_sweeps.py +244 -0
  525. aiperf/metrics/base_aggregate_counter_metric.py +35 -0
  526. aiperf/metrics/base_aggregate_metric.py +65 -0
  527. aiperf/metrics/base_derived_metric.py +56 -0
  528. aiperf/metrics/base_metric.py +168 -0
  529. aiperf/metrics/base_record_metric.py +57 -0
  530. aiperf/metrics/base_usage_record_metric.py +77 -0
  531. aiperf/metrics/cache_reporting_hint.py +64 -0
  532. aiperf/metrics/column_store.py +503 -0
  533. aiperf/metrics/derived_latency.py +259 -0
  534. aiperf/metrics/derived_sum_metric.py +62 -0
  535. aiperf/metrics/display_units.py +89 -0
  536. aiperf/metrics/energy_efficiency_analyzer.py +374 -0
  537. aiperf/metrics/list_metric_aggregation.py +162 -0
  538. aiperf/metrics/metric_dicts.py +249 -0
  539. aiperf/metrics/metric_registry.py +324 -0
  540. aiperf/metrics/network_adjusted_analyzer.py +151 -0
  541. aiperf/metrics/prometheus_formatter.py +305 -0
  542. aiperf/metrics/ragged_series.py +107 -0
  543. aiperf/metrics/replay_sched_lag_analyzer.py +107 -0
  544. aiperf/metrics/theoretical_prefix_cache.py +135 -0
  545. aiperf/metrics/types/__init__.py +3 -0
  546. aiperf/metrics/types/audio_duration_metric.py +63 -0
  547. aiperf/metrics/types/benchmark_duration_metric.py +46 -0
  548. aiperf/metrics/types/completed_request_count_metric.py +43 -0
  549. aiperf/metrics/types/context_overflow_count_metric.py +44 -0
  550. aiperf/metrics/types/credit_drop_latency_metric.py +47 -0
  551. aiperf/metrics/types/decode_duration_metric.py +77 -0
  552. aiperf/metrics/types/e2e_output_throughput_metric.py +52 -0
  553. aiperf/metrics/types/error_request_count.py +25 -0
  554. aiperf/metrics/types/good_request_count_metric.py +97 -0
  555. aiperf/metrics/types/good_request_fraction_metric.py +65 -0
  556. aiperf/metrics/types/goodput_metric.py +36 -0
  557. aiperf/metrics/types/http_trace_metrics.py +649 -0
  558. aiperf/metrics/types/image_metrics.py +93 -0
  559. aiperf/metrics/types/input_sequence_length_metric.py +101 -0
  560. aiperf/metrics/types/input_token_throughput_metric.py +50 -0
  561. aiperf/metrics/types/inter_chunk_latency_metric.py +74 -0
  562. aiperf/metrics/types/inter_token_latency_metric.py +87 -0
  563. aiperf/metrics/types/max_response_metric.py +49 -0
  564. aiperf/metrics/types/min_request_metric.py +42 -0
  565. aiperf/metrics/types/network_adjusted_metrics.py +104 -0
  566. aiperf/metrics/types/osl_mismatch_metrics.py +198 -0
  567. aiperf/metrics/types/output_sequence_length_metric.py +70 -0
  568. aiperf/metrics/types/output_token_count.py +65 -0
  569. aiperf/metrics/types/output_token_throughput_metrics.py +111 -0
  570. aiperf/metrics/types/power_efficiency_metrics.py +360 -0
  571. aiperf/metrics/types/prefill_throughput_per_user.py +53 -0
  572. aiperf/metrics/types/reasoning_token_count.py +71 -0
  573. aiperf/metrics/types/replay_sched_lag_metrics.py +209 -0
  574. aiperf/metrics/types/request_count_metric.py +26 -0
  575. aiperf/metrics/types/request_error_rate_metric.py +44 -0
  576. aiperf/metrics/types/request_latency_metric.py +49 -0
  577. aiperf/metrics/types/request_throughput_metric.py +37 -0
  578. aiperf/metrics/types/rtfx_metric.py +61 -0
  579. aiperf/metrics/types/spec_decode_metrics.py +322 -0
  580. aiperf/metrics/types/stream_latency_metrics.py +88 -0
  581. aiperf/metrics/types/thinking_efficiency_metrics.py +113 -0
  582. aiperf/metrics/types/time_to_first_output_token_metric.py +86 -0
  583. aiperf/metrics/types/total_token_throughput.py +46 -0
  584. aiperf/metrics/types/ttft_metric.py +56 -0
  585. aiperf/metrics/types/ttst_metric.py +52 -0
  586. aiperf/metrics/types/usage_cache_metrics.py +129 -0
  587. aiperf/metrics/types/usage_diff_metrics.py +299 -0
  588. aiperf/metrics/types/usage_extras_metrics.py +91 -0
  589. aiperf/metrics/types/usage_metrics.py +245 -0
  590. aiperf/metrics/types/usage_total_metrics.py +362 -0
  591. aiperf/metrics/types/video_generation_metrics.py +70 -0
  592. aiperf/network_latency/__init__.py +8 -0
  593. aiperf/network_latency/accumulator.py +127 -0
  594. aiperf/network_latency/jsonl_writer.py +63 -0
  595. aiperf/network_latency/manager.py +283 -0
  596. aiperf/network_latency/probe.py +189 -0
  597. aiperf/orchestrator/__init__.py +39 -0
  598. aiperf/orchestrator/aggregation/__init__.py +35 -0
  599. aiperf/orchestrator/aggregation/base.py +57 -0
  600. aiperf/orchestrator/aggregation/confidence.py +357 -0
  601. aiperf/orchestrator/aggregation/detailed.py +93 -0
  602. aiperf/orchestrator/aggregation/sweep.py +445 -0
  603. aiperf/orchestrator/aggregation/sweep_sla_filter.py +155 -0
  604. aiperf/orchestrator/convergence/__init__.py +15 -0
  605. aiperf/orchestrator/convergence/base.py +65 -0
  606. aiperf/orchestrator/convergence/ci_width.py +103 -0
  607. aiperf/orchestrator/convergence/cv.py +91 -0
  608. aiperf/orchestrator/convergence/distribution.py +91 -0
  609. aiperf/orchestrator/executor.py +49 -0
  610. aiperf/orchestrator/export_helpers.py +114 -0
  611. aiperf/orchestrator/jsonl_loader.py +142 -0
  612. aiperf/orchestrator/local_executor.py +270 -0
  613. aiperf/orchestrator/models.py +102 -0
  614. aiperf/orchestrator/orchestrator.py +721 -0
  615. aiperf/orchestrator/search_planner/__init__.py +58 -0
  616. aiperf/orchestrator/search_planner/_botorch_kernel.py +53 -0
  617. aiperf/orchestrator/search_planner/_cliff_detect.py +73 -0
  618. aiperf/orchestrator/search_planner/_margin_normalize.py +62 -0
  619. aiperf/orchestrator/search_planner/_monotonic_boundary.py +92 -0
  620. aiperf/orchestrator/search_planner/_optuna_helpers.py +529 -0
  621. aiperf/orchestrator/search_planner/_pooled_percentile.py +127 -0
  622. aiperf/orchestrator/search_planner/_replicate_budget.py +78 -0
  623. aiperf/orchestrator/search_planner/_shared_warmup.py +120 -0
  624. aiperf/orchestrator/search_planner/_sla_helpers.py +351 -0
  625. aiperf/orchestrator/search_planner/_smooth_isotonic_boundary.py +99 -0
  626. aiperf/orchestrator/search_planner/_smooth_isotonic_fit.py +111 -0
  627. aiperf/orchestrator/search_planner/_smooth_isotonic_phases.py +385 -0
  628. aiperf/orchestrator/search_planner/base.py +172 -0
  629. aiperf/orchestrator/search_planner/bayesian.py +63 -0
  630. aiperf/orchestrator/search_planner/monotonic.py +488 -0
  631. aiperf/orchestrator/search_planner/multi_tier_allocator.py +45 -0
  632. aiperf/orchestrator/search_planner/multi_tier_grid.py +185 -0
  633. aiperf/orchestrator/search_planner/multi_tier_models.py +108 -0
  634. aiperf/orchestrator/search_planner/multi_tier_ordering.py +209 -0
  635. aiperf/orchestrator/search_planner/multi_tier_planner.py +720 -0
  636. aiperf/orchestrator/search_planner/multi_tier_store.py +28 -0
  637. aiperf/orchestrator/search_planner/optuna_planner.py +711 -0
  638. aiperf/orchestrator/search_planner/parsing.py +248 -0
  639. aiperf/orchestrator/search_planner/smooth_isotonic.py +484 -0
  640. aiperf/orchestrator/strategies.py +406 -0
  641. aiperf/orchestrator/subprocess_runner.py +187 -0
  642. aiperf/plot/__init__.py +23 -0
  643. aiperf/plot/auto_plot.py +88 -0
  644. aiperf/plot/cli_runner.py +191 -0
  645. aiperf/plot/config.py +651 -0
  646. aiperf/plot/constants.py +184 -0
  647. aiperf/plot/core/__init__.py +38 -0
  648. aiperf/plot/core/data_loader.py +1873 -0
  649. aiperf/plot/core/data_preparation.py +427 -0
  650. aiperf/plot/core/mode_detector.py +326 -0
  651. aiperf/plot/core/plot_generator.py +2292 -0
  652. aiperf/plot/core/plot_specs.py +208 -0
  653. aiperf/plot/core/plot_type_handlers.py +77 -0
  654. aiperf/plot/core/swept_params.py +143 -0
  655. aiperf/plot/dashboard/__init__.py +17 -0
  656. aiperf/plot/dashboard/builder.py +2745 -0
  657. aiperf/plot/dashboard/cache.py +242 -0
  658. aiperf/plot/dashboard/callback_helpers.py +385 -0
  659. aiperf/plot/dashboard/callbacks.py +5761 -0
  660. aiperf/plot/dashboard/components.py +669 -0
  661. aiperf/plot/dashboard/server.py +184 -0
  662. aiperf/plot/dashboard/styling.py +858 -0
  663. aiperf/plot/dashboard/utils.py +609 -0
  664. aiperf/plot/default_plot_config.yaml +259 -0
  665. aiperf/plot/exceptions.py +102 -0
  666. aiperf/plot/exporters/__init__.py +11 -0
  667. aiperf/plot/exporters/base.py +94 -0
  668. aiperf/plot/exporters/matplotlib_export.py +47 -0
  669. aiperf/plot/exporters/png/__init__.py +13 -0
  670. aiperf/plot/exporters/png/base.py +75 -0
  671. aiperf/plot/exporters/png/multi_run.py +271 -0
  672. aiperf/plot/exporters/png/single_run.py +136 -0
  673. aiperf/plot/geometry/__init__.py +13 -0
  674. aiperf/plot/geometry/ellipse.py +99 -0
  675. aiperf/plot/handlers/__init__.py +35 -0
  676. aiperf/plot/handlers/multi_run_handlers.py +382 -0
  677. aiperf/plot/handlers/single_run_handlers.py +1559 -0
  678. aiperf/plot/logging.py +110 -0
  679. aiperf/plot/metric_names.py +413 -0
  680. aiperf/plot/models/__init__.py +15 -0
  681. aiperf/plot/models/uncertainty.py +113 -0
  682. aiperf/plot/plot_controller.py +246 -0
  683. aiperf/plot/renderers/__init__.py +7 -0
  684. aiperf/plot/renderers/matplotlib_uncertainty.py +259 -0
  685. aiperf/plot/utils.py +477 -0
  686. aiperf/plugin/__init__.py +3 -0
  687. aiperf/plugin/categories.yaml +401 -0
  688. aiperf/plugin/cli.py +150 -0
  689. aiperf/plugin/constants.py +9 -0
  690. aiperf/plugin/enums.py +198 -0
  691. aiperf/plugin/extensible_enums.py +242 -0
  692. aiperf/plugin/plugins.py +1340 -0
  693. aiperf/plugin/plugins.yaml +2740 -0
  694. aiperf/plugin/schema/__init__.py +25 -0
  695. aiperf/plugin/schema/_orchestrator_schemas.py +90 -0
  696. aiperf/plugin/schema/categories.schema.json +61 -0
  697. aiperf/plugin/schema/plugins.schema.json +2159 -0
  698. aiperf/plugin/schema/schemas.py +645 -0
  699. aiperf/plugin/types.py +260 -0
  700. aiperf/post_processors/__init__.py +3 -0
  701. aiperf/post_processors/base_metrics_processor.py +137 -0
  702. aiperf/post_processors/metric_record_processor.py +86 -0
  703. aiperf/post_processors/otel_metrics_results_processor.py +556 -0
  704. aiperf/post_processors/otel_streaming_fanout.py +530 -0
  705. aiperf/post_processors/outputs_json_record_processor.py +150 -0
  706. aiperf/post_processors/protocols.py +31 -0
  707. aiperf/post_processors/raw_record_writer_processor.py +227 -0
  708. aiperf/post_processors/record_export_jsonl_writer.py +109 -0
  709. aiperf/post_processors/record_observer_context.py +49 -0
  710. aiperf/post_processors/strategies/__init__.py +25 -0
  711. aiperf/post_processors/strategies/core.py +106 -0
  712. aiperf/post_processors/strategies/genai_semconv.py +474 -0
  713. aiperf/post_processors/strategies/metric_results.py +63 -0
  714. aiperf/post_processors/strategies/timing_results.py +91 -0
  715. aiperf/records/__init__.py +3 -0
  716. aiperf/records/dataset_gate.py +58 -0
  717. aiperf/records/error_tracker.py +77 -0
  718. aiperf/records/inference_result_parser.py +645 -0
  719. aiperf/records/payload_retention.py +159 -0
  720. aiperf/records/record_processor_service.py +516 -0
  721. aiperf/records/records_manager.py +2382 -0
  722. aiperf/records/records_manager_processing.py +307 -0
  723. aiperf/records/records_tracker.py +457 -0
  724. aiperf/search_recipes/__init__.py +39 -0
  725. aiperf/search_recipes/_base.py +341 -0
  726. aiperf/search_recipes/_itl_surface_fit.py +297 -0
  727. aiperf/search_recipes/_max_concurrency_under_sla.py +347 -0
  728. aiperf/search_recipes/_max_goodput_under_slo.py +189 -0
  729. aiperf/search_recipes/_pareto_axes.py +43 -0
  730. aiperf/search_recipes/_pareto_dominance.py +90 -0
  731. aiperf/search_recipes/_pareto_sweep.py +138 -0
  732. aiperf/search_recipes/_pareto_sweep_export.py +146 -0
  733. aiperf/search_recipes/_pareto_sweep_parser.py +53 -0
  734. aiperf/search_recipes/_post_process.py +103 -0
  735. aiperf/search_recipes/_post_process_shared.py +36 -0
  736. aiperf/search_recipes/_sla_breach_knee.py +249 -0
  737. aiperf/search_recipes/_sweep_extract.py +74 -0
  738. aiperf/search_recipes/_ttft_curve_fit.py +208 -0
  739. aiperf/search_recipes/builtins.py +541 -0
  740. aiperf/search_recipes/post_process.py +208 -0
  741. aiperf/server_metrics/__init__.py +3 -0
  742. aiperf/server_metrics/accumulator.py +1084 -0
  743. aiperf/server_metrics/csv_exporter.py +494 -0
  744. aiperf/server_metrics/data_collector.py +524 -0
  745. aiperf/server_metrics/export_stats.py +852 -0
  746. aiperf/server_metrics/histogram_percentiles.py +1250 -0
  747. aiperf/server_metrics/json_exporter.py +272 -0
  748. aiperf/server_metrics/jsonl_writer.py +94 -0
  749. aiperf/server_metrics/manager.py +575 -0
  750. aiperf/server_metrics/parquet_exporter.py +758 -0
  751. aiperf/server_metrics/protocols.py +29 -0
  752. aiperf/server_metrics/storage.py +982 -0
  753. aiperf/server_metrics/units.py +379 -0
  754. aiperf/spec_decode/__init__.py +10 -0
  755. aiperf/spec_decode/protocols.py +47 -0
  756. aiperf/spec_decode/vllm_adapter.py +105 -0
  757. aiperf/timing/__init__.py +3 -0
  758. aiperf/timing/adaptive_config.py +137 -0
  759. aiperf/timing/adaptive_types.py +11 -0
  760. aiperf/timing/branch_orchestrator.py +1842 -0
  761. aiperf/timing/concurrency.py +622 -0
  762. aiperf/timing/config.py +741 -0
  763. aiperf/timing/conversation_source.py +296 -0
  764. aiperf/timing/intervals.py +233 -0
  765. aiperf/timing/manager.py +296 -0
  766. aiperf/timing/phase/__init__.py +3 -0
  767. aiperf/timing/phase/credit_counter.py +352 -0
  768. aiperf/timing/phase/lifecycle.py +175 -0
  769. aiperf/timing/phase/progress_tracker.py +267 -0
  770. aiperf/timing/phase/publisher.py +141 -0
  771. aiperf/timing/phase/runner.py +1265 -0
  772. aiperf/timing/phase/stop_conditions.py +330 -0
  773. aiperf/timing/phase_orchestrator.py +356 -0
  774. aiperf/timing/ramping.py +487 -0
  775. aiperf/timing/rate_series.py +91 -0
  776. aiperf/timing/replay_dependencies.py +541 -0
  777. aiperf/timing/request_cancellation.py +140 -0
  778. aiperf/timing/session_tree.py +269 -0
  779. aiperf/timing/strategies/__init__.py +3 -0
  780. aiperf/timing/strategies/adaptive_scale.py +486 -0
  781. aiperf/timing/strategies/adaptive_scale_artifacts.py +385 -0
  782. aiperf/timing/strategies/adaptive_scale_backends.py +226 -0
  783. aiperf/timing/strategies/adaptive_scale_controller.py +342 -0
  784. aiperf/timing/strategies/adaptive_scale_runtime.py +191 -0
  785. aiperf/timing/strategies/adaptive_scale_sla.py +383 -0
  786. aiperf/timing/strategies/adaptive_scale_types.py +82 -0
  787. aiperf/timing/strategies/agentic_replay.py +1952 -0
  788. aiperf/timing/strategies/cache_bust.py +139 -0
  789. aiperf/timing/strategies/core.py +132 -0
  790. aiperf/timing/strategies/fixed_schedule.py +178 -0
  791. aiperf/timing/strategies/request_rate.py +336 -0
  792. aiperf/timing/strategies/user_centric_rate.py +426 -0
  793. aiperf/timing/trajectory_source.py +934 -0
  794. aiperf/timing/url_samplers.py +81 -0
  795. aiperf/transports/__init__.py +3 -0
  796. aiperf/transports/aiohttp_client.py +475 -0
  797. aiperf/transports/aiohttp_trace.py +355 -0
  798. aiperf/transports/aiohttp_transport.py +708 -0
  799. aiperf/transports/base_transports.py +235 -0
  800. aiperf/transports/http_defaults.py +169 -0
  801. aiperf/transports/sse_utils.py +200 -0
  802. aiperf/ui/__init__.py +3 -0
  803. aiperf/ui/base_ui.py +55 -0
  804. aiperf/ui/dashboard/__init__.py +3 -0
  805. aiperf/ui/dashboard/aiperf_dashboard_ui.py +84 -0
  806. aiperf/ui/dashboard/aiperf_textual_app.py +343 -0
  807. aiperf/ui/dashboard/aiperf_theme.py +25 -0
  808. aiperf/ui/dashboard/custom_widgets.py +32 -0
  809. aiperf/ui/dashboard/progress_dashboard.py +357 -0
  810. aiperf/ui/dashboard/progress_header.py +110 -0
  811. aiperf/ui/dashboard/realtime_metrics_dashboard.py +244 -0
  812. aiperf/ui/dashboard/realtime_telemetry_dashboard.py +316 -0
  813. aiperf/ui/dashboard/rich_log_viewer.py +250 -0
  814. aiperf/ui/dashboard/worker_dashboard.py +90 -0
  815. aiperf/ui/dashboard/worker_status_table.py +147 -0
  816. aiperf/ui/no_ui.py +14 -0
  817. aiperf/ui/protocols.py +15 -0
  818. aiperf/ui/tqdm_ui.py +220 -0
  819. aiperf/ui/utils.py +89 -0
  820. aiperf/workers/__init__.py +3 -0
  821. aiperf/workers/inference_client.py +298 -0
  822. aiperf/workers/session_manager.py +381 -0
  823. aiperf/workers/worker.py +1678 -0
  824. aiperf/workers/worker_manager.py +205 -0
  825. aiperf/zmq/__init__.py +3 -0
  826. aiperf/zmq/dealer_request_client.py +163 -0
  827. aiperf/zmq/fd_reader.py +177 -0
  828. aiperf/zmq/pub_client.py +117 -0
  829. aiperf/zmq/pull_client.py +214 -0
  830. aiperf/zmq/push_client.py +118 -0
  831. aiperf/zmq/router_reply_client.py +225 -0
  832. aiperf/zmq/streaming_dealer_client.py +196 -0
  833. aiperf/zmq/streaming_pull_client.py +125 -0
  834. aiperf/zmq/streaming_push_client.py +103 -0
  835. aiperf/zmq/streaming_router_client.py +241 -0
  836. aiperf/zmq/sub_client.py +245 -0
  837. aiperf/zmq/zmq_base_client.py +182 -0
  838. aiperf/zmq/zmq_comms.py +141 -0
  839. aiperf/zmq/zmq_defaults.py +60 -0
  840. aiperf/zmq/zmq_proxy_base.py +273 -0
  841. aiperf/zmq/zmq_proxy_sockets.py +226 -0
agentx_cli.py ADDED
@@ -0,0 +1,58 @@
1
+ # SPDX-FileCopyrightText: Copyright (c) 2026 SemiAnalysis. All rights reserved.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+ """AgentX command-line branding and defaults over the upstream AIPerf CLI."""
4
+
5
+ from __future__ import annotations
6
+
7
+ import sys
8
+ from collections.abc import Sequence
9
+ from importlib.metadata import PackageNotFoundError, version
10
+
11
+ from cyclopts import App
12
+
13
+ from aiperf.cli import app as aiperf_app
14
+
15
+
16
+ def _version() -> str:
17
+ """Read the AgentX distribution version independently of upstream AIPerf."""
18
+ try:
19
+ return version("agentx-harness")
20
+ except PackageNotFoundError:
21
+ return "unknown"
22
+
23
+
24
+ app = App(
25
+ name="agentx",
26
+ version=_version,
27
+ help=(
28
+ "AgentX Harness - agentic inference benchmarking, powered by AIPerf.\n\n"
29
+ "The profile command defaults to --scenario agentx when using CLI flags. "
30
+ "An explicit --scenario takes precedence. With --config/-f, the YAML "
31
+ "configuration supplies the scenario."
32
+ ),
33
+ )
34
+ app.update(aiperf_app)
35
+ # Copied root commands are bound to AIPerf; bind these to the branded app.
36
+ app.help_flags = ("--help", "-h")
37
+ app.version_flags = ("--version",)
38
+ del app["--install-completion"]
39
+ app.register_install_completion_command()
40
+
41
+
42
+ def main(argv: Sequence[str] | None = None) -> None:
43
+ """Run the upstream commands with AgentX defaults for flag-based profiles."""
44
+ tokens = list(sys.argv[1:] if argv is None else argv)
45
+ if tokens and tokens[0] == "profile":
46
+ options = tokens[1 : tokens.index("--") if "--" in tokens else len(tokens)]
47
+ has_scenario_or_config = any(
48
+ token in {"--scenario", "--config", "-f"}
49
+ or token.startswith(("--scenario=", "--config=", "-f"))
50
+ for token in options
51
+ )
52
+ if not has_scenario_or_config:
53
+ tokens[1:1] = ["--scenario", "agentx"]
54
+ app(tokens)
55
+
56
+
57
+ if __name__ == "__main__":
58
+ main()
@@ -0,0 +1,402 @@
1
+ Metadata-Version: 2.5
2
+ Name: agentx-harness
3
+ Version: 1.0.7
4
+ Summary: SemiAnalysis AgentX inference benchmark harness, built on AIPerf
5
+ Project-URL: Homepage, https://github.com/SemiAnalysisAI/agentx-harness
6
+ Project-URL: Source, https://github.com/SemiAnalysisAI/agentx-harness
7
+ Project-URL: Issues, https://github.com/SemiAnalysisAI/agentx-harness/issues
8
+ Author-email: "NVIDIA Inc." <sw-dl-dynamo@nvidia.com>
9
+ License: Apache-2.0
10
+ License-File: ATTRIBUTIONS.md
11
+ License-File: LICENSE
12
+ Requires-Python: <3.14,>=3.11
13
+ Requires-Dist: aiofiles~=24.1.0
14
+ Requires-Dist: aiohttp~=3.13.3
15
+ Requires-Dist: crick~=0.0.8
16
+ Requires-Dist: cyclopts<5,>=4
17
+ Requires-Dist: dash-bootstrap-components~=2.0.0
18
+ Requires-Dist: dash~=3.1.0
19
+ Requires-Dist: datasets>=3.0,>=4.7.0; platform_system != 'Windows' or platform_machine != 'ARM64'
20
+ Requires-Dist: fastapi<1,>=0.115
21
+ Requires-Dist: ffmpeg-python~=0.2.0
22
+ Requires-Dist: filelock>=3.13
23
+ Requires-Dist: huggingface-hub<2.0,>=0.34.0
24
+ Requires-Dist: jinja2~=3.1.5
25
+ Requires-Dist: jmespath~=1.0.1
26
+ Requires-Dist: kaleido~=1.2.0
27
+ Requires-Dist: matplotlib>=3.10.0
28
+ Requires-Dist: msgspec<1.0.0,>=0.19.0
29
+ Requires-Dist: numpy<3,>=1.26.4
30
+ Requires-Dist: nvidia-ml-py
31
+ Requires-Dist: optuna>=3.6
32
+ Requires-Dist: orjson~=3.11.7
33
+ Requires-Dist: pandas~=2.3.3
34
+ Requires-Dist: pillow~=12.2.0
35
+ Requires-Dist: plotly~=6.4.0
36
+ Requires-Dist: prometheus-client~=0.23.1
37
+ Requires-Dist: protobuf>=4
38
+ Requires-Dist: psutil~=7.0.0
39
+ Requires-Dist: pyarrow>=18.0.0; platform_system != 'Windows' or platform_machine != 'ARM64'
40
+ Requires-Dist: pydantic-settings<3.0.0,>=2.10.0
41
+ Requires-Dist: pydantic<3.0.0,>=2.10.0
42
+ Requires-Dist: pyzmq~=26.4.0
43
+ Requires-Dist: rich~=14.1.0
44
+ Requires-Dist: ruamel-yaml~=0.18.12
45
+ Requires-Dist: scipy>=1.13.0
46
+ Requires-Dist: seaborn~=0.13.2
47
+ Requires-Dist: sentencepiece>=0.2.0
48
+ Requires-Dist: setproctitle~=1.3.6
49
+ Requires-Dist: soundfile~=0.13.1
50
+ Requires-Dist: starlette-compress>=1.0.1
51
+ Requires-Dist: textual~=5.3.0
52
+ Requires-Dist: tiktoken<1,>=0.7.0
53
+ Requires-Dist: tqdm>=4.67.1
54
+ Requires-Dist: transformers>=4.56.0
55
+ Requires-Dist: uvicorn[standard]<1,>=0.34
56
+ Requires-Dist: uvloop>=0.22.1; platform_system != 'Windows'
57
+ Requires-Dist: zstandard>=0.25.0
58
+ Provides-Extra: accuracy
59
+ Requires-Dist: deepeval<5.0.0,>=2.9.0; extra == 'accuracy'
60
+ Requires-Dist: latex2sympy2-extended>=1.0.6; extra == 'accuracy'
61
+ Requires-Dist: lighteval>=0.13.0; extra == 'accuracy'
62
+ Requires-Dist: sympy>=1.14.0; extra == 'accuracy'
63
+ Provides-Extra: botorch
64
+ Requires-Dist: botorch>=0.10; extra == 'botorch'
65
+ Requires-Dist: gpytorch>=1.11; extra == 'botorch'
66
+ Requires-Dist: optuna-integration>=3.6; extra == 'botorch'
67
+ Requires-Dist: torch>=2.0; extra == 'botorch'
68
+ Provides-Extra: dev
69
+ Requires-Dist: black>=25.1.0; extra == 'dev'
70
+ Requires-Dist: httpx>=0.27.0; extra == 'dev'
71
+ Requires-Dist: hypothesis<6.156,>=6.0.0; (platform_system == 'Windows' and platform_machine == 'ARM64') and extra == 'dev'
72
+ Requires-Dist: hypothesis>=6.0.0; (platform_system != 'Windows' or platform_machine != 'ARM64') and extra == 'dev'
73
+ Requires-Dist: jsonschema>=4.0.0; extra == 'dev'
74
+ Requires-Dist: looptime>=0.5; extra == 'dev'
75
+ Requires-Dist: mlflow<4.0.0,>=3.10.0; extra == 'dev'
76
+ Requires-Dist: opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.24.0; extra == 'dev'
77
+ Requires-Dist: opentelemetry-sdk<2.0.0,>=1.24.0; extra == 'dev'
78
+ Requires-Dist: pre-commit>=4.2.0; extra == 'dev'
79
+ Requires-Dist: pytest-asyncio; extra == 'dev'
80
+ Requires-Dist: pytest-cov; extra == 'dev'
81
+ Requires-Dist: pytest-rerunfailures>=15.0; extra == 'dev'
82
+ Requires-Dist: pytest-timeout>=2.0.0; extra == 'dev'
83
+ Requires-Dist: pytest-xdist>=3.8.0; extra == 'dev'
84
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
85
+ Requires-Dist: ruff<0.15.0,>=0.14.0; extra == 'dev'
86
+ Requires-Dist: trustme>=1.0.0; (platform_system != 'Windows' or platform_machine != 'ARM64') and extra == 'dev'
87
+ Requires-Dist: wandb<1.0.0,>=0.19.0; extra == 'dev'
88
+ Provides-Extra: mlflow
89
+ Requires-Dist: mlflow<4.0.0,>=3.10.0; extra == 'mlflow'
90
+ Provides-Extra: optuna
91
+ Requires-Dist: botorch>=0.10; extra == 'optuna'
92
+ Requires-Dist: gpytorch>=1.11; extra == 'optuna'
93
+ Requires-Dist: optuna-integration>=3.6; extra == 'optuna'
94
+ Requires-Dist: torch>=2.0; extra == 'optuna'
95
+ Provides-Extra: otel
96
+ Requires-Dist: opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.24.0; extra == 'otel'
97
+ Requires-Dist: opentelemetry-sdk<2.0.0,>=1.24.0; extra == 'otel'
98
+ Provides-Extra: test
99
+ Requires-Dist: httpx>=0.27.0; extra == 'test'
100
+ Requires-Dist: hypothesis<6.156,>=6.0.0; (platform_system == 'Windows' and platform_machine == 'ARM64') and extra == 'test'
101
+ Requires-Dist: hypothesis>=6.0.0; (platform_system != 'Windows' or platform_machine != 'ARM64') and extra == 'test'
102
+ Requires-Dist: jsonschema>=4.0.0; extra == 'test'
103
+ Requires-Dist: looptime>=0.5; extra == 'test'
104
+ Requires-Dist: pytest-asyncio; extra == 'test'
105
+ Requires-Dist: pytest-cov; extra == 'test'
106
+ Requires-Dist: pytest-rerunfailures>=15.0; extra == 'test'
107
+ Requires-Dist: pytest-timeout>=2.0.0; extra == 'test'
108
+ Requires-Dist: pytest-xdist>=3.8.0; extra == 'test'
109
+ Requires-Dist: pytest>=7.0.0; extra == 'test'
110
+ Requires-Dist: trustme>=1.0.0; (platform_system != 'Windows' or platform_machine != 'ARM64') and extra == 'test'
111
+ Provides-Extra: wandb
112
+ Requires-Dist: wandb<1.0.0,>=0.19.0; extra == 'wandb'
113
+ Description-Content-Type: text/markdown
114
+
115
+
116
+ <!--
117
+ SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
118
+ SPDX-License-Identifier: Apache-2.0
119
+ -->
120
+
121
+
122
+ # AgentX Harness
123
+
124
+ ## Realistic 1mil Long Context, Multi Turn Agentic Workload Trace Replayer, collected from over $3mil USD of Traces
125
+
126
+ https://inferencex.semianalysis.com/datasets
127
+
128
+ ## Install and run AgentX
129
+
130
+ Requires Python 3.11–3.13. Install the version matching the GitHub release:
131
+
132
+ ```bash
133
+ pip install agentx-harness==1.0.7
134
+
135
+ agentx profile \
136
+ --url "$SERVER_URL" --endpoint /v1/chat/completions \
137
+ --model "$SERVED_MODEL_NAME" --tokenizer "$TOKENIZER" \
138
+ --tokenizer-trust-remote-code \
139
+ --concurrency "$CONC" \
140
+ --public-dataset "$DATASET" \
141
+ --output-artifact-dir "$OUTPUT_DIR"
142
+ ```
143
+
144
+ `agentx profile` selects the AgentX scenario automatically. Explicit flags
145
+ override its defaults; `--config`/`-f` uses the scenario and settings in the
146
+ YAML file. See the [AgentX guide](docs/tutorials/agentx-mvp.md) for dataset
147
+ choices and benchmark settings. The underlying `aiperf` command remains
148
+ available for compatibility.
149
+
150
+ Install in a dedicated virtual environment: this distribution includes the
151
+ fork's `aiperf` Python package and should not be installed alongside the
152
+ upstream `aiperf` distribution. On Linux ARM64, the `crick` dependency requires
153
+ a C compiler to build.
154
+
155
+ The package name is `agentx-harness`; the command is `agentx`. Releases tagged
156
+ `agentx-vX.Y.Z` publish version `X.Y.Z` automatically to PyPI.
157
+
158
+ ## Original README.md Below
159
+
160
+ # AIPerf
161
+
162
+ [![PyPI version](https://img.shields.io/pypi/v/AIPerf)](https://pypi.org/project/aiperf/)
163
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
164
+ [![Codecov](https://codecov.io/gh/ai-dynamo/aiperf/graph/badge.svg)](https://codecov.io/gh/ai-dynamo/aiperf)
165
+ [![Discord](https://dcbadge.limes.pink/api/server/D92uqZRjCZ?style=flat)](https://discord.gg/D92uqZRjCZ)
166
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/ai-dynamo/aiperf)
167
+
168
+ AIPerf is a comprehensive benchmarking tool that measures the performance of generative AI models served by your preferred inference solution. It provides detailed metrics using a command line display as well as extensive benchmark performance reports.
169
+
170
+ <img width="1724" height="670" alt="AIPerf UI Dashboard" src="https://github.com/user-attachments/assets/7eb40867-b1c1-4ebe-bd57-7619f2154bba" />
171
+
172
+ ## Quick Start
173
+
174
+ This quick start guide leverages [Ollama](https://ollama.com/) via
175
+ [Docker Desktop](https://www.docker.com/products/docker-desktop/).
176
+
177
+ ### Setting up a Local Server
178
+
179
+ In order to set up an Ollama server, run `granite4:350m` using the following commands:
180
+
181
+ ```bash
182
+ docker run -d \
183
+ --name ollama \
184
+ -p 11434:11434 \
185
+ -v ollama-data:/root/.ollama \
186
+ ollama/ollama:latest
187
+ docker exec -it ollama ollama pull granite4:350m
188
+ ```
189
+
190
+ ### Basic Usage
191
+
192
+ Create a virtual environment and install AIPerf:
193
+
194
+ ```bash
195
+ python3 -m venv venv
196
+ source venv/bin/activate
197
+ pip install aiperf
198
+ ```
199
+
200
+ > [!NOTE]
201
+ > On Linux **aarch64** (`arm64`), one of AIPerf's dependencies (`crick`)
202
+ > ships only an sdist and needs a C compiler at install time. Install
203
+ > the system build toolchain before `pip install aiperf` —
204
+ > `sudo apt install build-essential` (Debian/Ubuntu),
205
+ > `sudo yum groupinstall "Development Tools"` (RHEL/CentOS), or
206
+ > equivalent. Linux x86_64, macOS, and Windows install from pre-built
207
+ > wheels and need no toolchain.
208
+
209
+ Optional integrations:
210
+ - `pip install "aiperf[mlflow]"` enables MLflow uploads and live telemetry streaming
211
+ - `pip install "aiperf[otel]"` enables OpenTelemetry metric streaming
212
+ - `pip install "aiperf[wandb]"` enables Weights & Biases result uploads
213
+ - `pip install "aiperf[mlflow,otel,wandb]"` installs all telemetry extras
214
+
215
+ To run a simple benchmark against your Ollama server:
216
+
217
+ ```bash
218
+ aiperf profile \
219
+ --model "granite4:350m" \
220
+ --streaming \
221
+ --endpoint-type chat \
222
+ --tokenizer ibm-granite/granite-4.0-micro \
223
+ --url http://localhost:11434 \
224
+ --request-count 10
225
+ ```
226
+
227
+
228
+ ### Example with Custom Configuration
229
+
230
+ ```bash
231
+ aiperf profile \
232
+ --model "granite4:350m" \
233
+ --streaming \
234
+ --endpoint-type chat \
235
+ --tokenizer ibm-granite/granite-4.0-micro \
236
+ --url http://localhost:11434 \
237
+ --concurrency 5 \
238
+ --request-count 10
239
+ ```
240
+
241
+ Example output:
242
+
243
+
244
+ **NOTE:** The example performance is reflective of a CPU-only run and does not represent an official benchmark.
245
+
246
+ ```bash
247
+ NVIDIA AIPerf | LLM Metrics
248
+ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┓
249
+ ┃ Metric ┃ avg ┃ min ┃ max ┃ p99 ┃ p90 ┃ p50 ┃ std ┃
250
+ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━┩
251
+ │ Time to First Token (ms) │ 7,463.28 │ 7,125.81 │ 9,484.24 │ 9,295.48 │ 7,596.62 │ 7,240.23 │ 677.23 │
252
+ │ Time to Second Token (ms) │ 68.73 │ 32.01 │ 102.86 │ 102.55 │ 99.80 │ 67.37 │ 24.95 │
253
+ │ Time to First Output Token (ms) │ 7,463.28 │ 7,125.81 │ 9,484.24 │ 9,295.48 │ 7,596.62 │ 7,240.23 │ 677.23 │
254
+ │ Request Latency (ms) │ 13,829.40 │ 9,029.36 │ 27,905.46 │ 27,237.77 │ 21,228.48 │ 11,338.31 │ 5,614.32 │
255
+ │ Inter Token Latency (ms) │ 65.31 │ 53.06 │ 81.31 │ 81.24 │ 80.64 │ 63.79 │ 9.09 │
256
+ │ Output Token Throughput Per User │ 15.60 │ 12.30 │ 18.85 │ 18.77 │ 18.08 │ 15.68 │ 2.05 │
257
+ │ (tokens/sec/user) │ │ │ │ │ │ │ │
258
+ │ Output Sequence Length (tokens) │ 95.20 │ 29.00 │ 295.00 │ 283.12 │ 176.20 │ 63.00 │ 77.08 │
259
+ │ Input Sequence Length (tokens) │ 550.00 │ 550.00 │ 550.00 │ 550.00 │ 550.00 │ 550.00 │ 0.00 │
260
+ │ Output Token Throughput (tokens/sec) │ 6.85 │ N/A │ N/A │ N/A │ N/A │ N/A │ N/A │
261
+ │ Request Throughput (requests/sec) │ 0.07 │ N/A │ N/A │ N/A │ N/A │ N/A │ N/A │
262
+ │ Request Count (requests) │ 10.00 │ N/A │ N/A │ N/A │ N/A │ N/A │ N/A │
263
+ └──────────────────────────────────────┴───────────┴──────────┴───────────┴───────────┴───────────┴───────────┴──────────┘
264
+
265
+ CLI Command: aiperf profile --model 'granite4:350m' --streaming --endpoint-type 'chat' --tokenizer 'ibm-granite/granite-4.0-micro' --url 'http://localhost:11434'
266
+ Benchmark Duration: 138.89 sec
267
+ CSV Export: /home/user/aiperf/artifacts/granite4:350m-openai-chat-concurrency1/profile_export_aiperf.csv
268
+ JSON Export: /home/user/Code/aiperf/artifacts/granite4:350m-openai-chat-concurrency1/profile_export_aiperf.json
269
+ Log File: /home/user/Code/aiperf/artifacts/granite4:350m-openai-chat-concurrency1/logs/aiperf.log
270
+ ```
271
+
272
+ ## Features
273
+
274
+ - Scalable multiprocess architecture with 10 services communicating via ZMQ
275
+ - 3 UI modes: `dashboard` (real-time TUI), `simple` (progress bars), `none` (headless)
276
+ - Multiple benchmarking modes: concurrency, request-rate, [request-rate with max concurrency](docs/tutorials/request-rate-concurrency.md), [trace replay](docs/benchmark-modes/trace-replay.md)
277
+ - Extensible plugin system for endpoints, datasets, transports, and metrics
278
+ - [Public dataset support](docs/benchmark-datasets.md) including ShareGPT and custom formats
279
+
280
+ ## Supported APIs
281
+
282
+ - OpenAI chat completions, completions, embeddings, audio, images
283
+ - NIM embeddings, rankings
284
+
285
+ ## Tutorials and Feature Guides
286
+
287
+ ### Getting Started
288
+ - [Basic Tutorial](docs/tutorial.md) - Profile Qwen3-0.6B with vLLM
289
+ - [Comprehensive Benchmarking Guide](docs/comprehensive-llm-benchmarking.md) - 5 real-world use cases
290
+ - [Interactive Chat Sanity Checks](docs/tutorials/interactive-chat.md) - Talk to an endpoint with `aiperf chat` and see per-turn TTFT/TPS/ITL
291
+ - [YAML Configuration Files](docs/tutorials/yaml-config.md) - Drive AIPerf from a config file instead of CLI flags
292
+ - [Sampling Distributions in YAML Configs](docs/tutorials/yaml-distributions.md) - Fixed, Normal, Log-normal, Multimodal, and Empirical shapes for ISL/OSL/turns/etc.
293
+ - [User Interface](docs/tutorials/ui-types.md) - Dashboard, simple, or headless
294
+ - [Hugging Face TGI](docs/tutorials/huggingface-tgi.md) - Profile Hugging Face TGI models
295
+ - [OpenAI Text Endpoints](docs/tutorials/openai-text-endpoints.md) - Profile OpenAI-compatible text APIs
296
+
297
+ ### Load Control and Timing
298
+ - [Request Rate with Max Concurrency](docs/tutorials/request-rate-concurrency.md) - Dual request control
299
+ - [Arrival Patterns](docs/tutorials/arrival-patterns.md) - Constant, Poisson, gamma traffic
300
+ - [Prefill Concurrency](docs/tutorials/prefill-concurrency.md) - Memory-safe long-context benchmarking
301
+ - [Adaptive Scale](docs/tutorials/adaptive-scale.md) - Single-run SLA boundary discovery and sustain
302
+ - [Gradual Ramping](docs/tutorials/ramping.md) - Smooth ramp-up of concurrency and request rate
303
+ - [Warmup Phase](docs/tutorials/warmup.md) - Eliminate cold-start effects
304
+ - [User-Centric Timing](docs/tutorials/user-centric-timing.md) - Per-user rate limiting for KV cache benchmarking
305
+ - [Request Cancellation](docs/tutorials/request-cancellation.md) - Timeout and resilience testing
306
+ - [Multi-URL Load Balancing](docs/tutorials/multi-url-load-balancing.md) - Distribute across servers
307
+
308
+ ### Workloads and Data
309
+ - [Trace Benchmarking](docs/benchmark-modes/trace-replay.md) - Deterministic workload replay
310
+ - [Bailian Traces](docs/tutorials/bailian-trace.md) - Bailian production trace replay
311
+ - [Baseten Traces](docs/tutorials/baseten-trace.md) - Baseten Parquet production trace replay
312
+ - [BurstGPT Traces](docs/tutorials/burst-gpt-trace.md) - BurstGPT real-world bursty traffic trace replay
313
+ - [SageMaker Data Capture](docs/tutorials/sagemaker-data-capture.md) - Replay production traffic from SageMaker endpoints
314
+ - [Custom Prompt Benchmarking](docs/tutorials/custom-prompt-benchmarking.md) - Send exact prompts as-is
315
+ - [Custom Dataset](docs/tutorials/custom-dataset.md) - Custom dataset formats
316
+ - [Inline Datasets](docs/tutorials/inline-datasets.md) - Embed records directly in the YAML config (single_turn, multi_turn, multi-pool random_pool, traces)
317
+ - [ShareGPT Dataset](docs/tutorials/sharegpt.md) - Profile with ShareGPT dataset
318
+ - [AIMO Dataset](docs/tutorials/aimo.md) - Profile with AIMO math reasoning datasets (NuminaMath-TIR, NuminaMath-CoT, NuminaMath-1.5, AIME)
319
+ - [MMStar Dataset](docs/tutorials/mmstar.md) - Profile vision language models with MMStar visual QA benchmark
320
+ - [MMVU Dataset](docs/tutorials/mmvu.md) - Profile video language models with MMVU expert-level video understanding benchmark
321
+ - [VisionArena Dataset](docs/tutorials/vision-arena.md) - Profile with real-world vision conversations from Chatbot Arena
322
+ - [LLaVA-OneVision Dataset](docs/tutorials/llava-onevision.md) - Profile with diverse multimodal instruction-following data
323
+ - [SPEED-Bench Dataset](docs/tutorials/speed-bench.md) - Profile speculative decoding with SPEED-Bench
324
+ - [Per-Request Spec-Decode Metrics](docs/tutorials/spec-decode-metrics.md) - Inline per-request acceptance length, draft rate, and pooled histogram from a normal profile run
325
+ - [InstructCoder Dataset](docs/tutorials/instruct-coder.md) - Profile with InstructCoder code generation dataset
326
+ - [SpecBench Dataset](docs/tutorials/spec-bench.md) - Profile with SpecBench speculative decoding dataset
327
+ - [Blazedit Dataset](docs/tutorials/blazedit.md) - Profile with Blazedit code editing dataset
328
+ - [ASR Datasets](docs/tutorials/asr.md) - Profile ASR models with LibriSpeech, VoxPopuli, GigaSpeech, AMI, and SPGISpeech
329
+ - [Synthetic Dataset Generation](docs/tutorials/synthetic-dataset.md) - Generate synthetic datasets
330
+ - [Agentic Code Generator](docs/tutorials/agentic-code-generator.md) - Generate multi-turn coding-agent traces for KV cache benchmarking
331
+ - [Weka Traces](docs/tutorials/weka-trace.md) - Replay real agentic coding sessions with KV-cache-aware Weka traces
332
+ - [AgentX scenarios](docs/tutorials/agentx-mvp.md) - InferenceX defaults (`--scenario agentx`) and the original MVP benchmark (`--scenario inferencex-agentx-mvp`)
333
+ - [Fixed Schedule](docs/tutorials/fixed-schedule.md) - Precise timestamp-based execution
334
+ - [Time-based Benchmarking](docs/tutorials/time-based-benchmarking.md) - Duration-based testing
335
+ - [Sequence Distributions](docs/tutorials/sequence-distributions.md) - Mixed ISL/OSL pairings
336
+ - [Prefix Synthesis](docs/tutorials/prefix-synthesis.md) - Prefix data synthesis for KV cache testing
337
+ - [Reproducibility](docs/reproducibility.md) - Deterministic datasets with `--random-seed`
338
+ - [Template Endpoint](docs/tutorials/template-endpoint.md) - Custom Jinja2 request templates
339
+ - [Multi-Turn Conversations](docs/tutorials/multi-turn.md) - Multi-turn conversation benchmarking
340
+ - [Raw Payload Replay](docs/tutorials/raw-payload-replay.md) - Verbatim JSONL payload replay (single file or directory)
341
+ - [Inputs JSON Replay](docs/tutorials/inputs-json-replay.md) - Verbatim multi-turn replay of AIPerf inputs.json artifacts
342
+ - [Local Tokenizer](docs/tutorials/local-tokenizer.md) - Use local tokenizers without HuggingFace
343
+
344
+ ### Endpoint Types
345
+ - [Embeddings](docs/tutorials/embeddings.md) - Profile embedding models
346
+ - [Rankings](docs/tutorials/rankings.md) - Profile ranking models
347
+ - [OpenAI Responses API](docs/tutorials/openai-responses.md) - Profile OpenAI Responses API endpoints
348
+ - [Audio](docs/tutorials/audio.md) - Profile audio language models
349
+ - [NIM Image Retrieval](docs/tutorials/nim-image-retrieval.md) - Profile NIM image retrieval models
350
+ - [Vision](docs/tutorials/vision.md) - Profile vision language models
351
+ - [Image Generation](docs/tutorials/image-generation.md) - Benchmark any OpenAI-compatible image generation API
352
+ - [SGLang Image Edit](docs/tutorials/sglang-image-edit.md) - Benchmark OpenAI-compatible image-to-image (image edit) endpoints
353
+ - [SGLang Video Generation](docs/tutorials/sglang-video-generation.md) - Video generation benchmarking
354
+ - [Synthetic Video](docs/tutorials/synthetic-video.md) - Synthetic video generation
355
+
356
+ ### Analysis and Monitoring
357
+ - [Timeslice Metrics](docs/tutorials/timeslices.md) - Per-timeslice performance analysis
358
+ - [Goodput](docs/tutorials/goodput.md) - SLO-based throughput measurement
359
+ - [Parameter Sweeps](docs/tutorials/sweeps.md) - YAML reference for grid/zip/scenarios sweeps + multi-run, with picker for choosing a sweep mode
360
+ - [Adaptive Search](docs/tutorials/adaptive-search.md) - Bayesian-optimization walkthrough (single-objective + multi-objective Pareto)
361
+ - [Adaptive Scale](docs/tutorials/adaptive-scale.md) - Single-run SLA boundary discovery and sustain
362
+ - [Search Recipes](docs/sweeping/search-recipes.md) - Named recipe catalog including `pareto-sweep`, `max-throughput-ttft-sla`, `max-concurrency-under-sla`
363
+ - [HTTP Trace Metrics](docs/tutorials/http-trace-metrics.md) - DNS, TCP/TLS, TTFB timing
364
+ - [Multi-Run Confidence](docs/tutorials/multi-run-confidence.md) - Confidence intervals across repeated runs
365
+ - [Profile Exports](docs/tutorials/working-with-profile-exports.md) - Post-processing with Pydantic models
366
+ - [Visualization and Plotting](docs/tutorials/plot.md) - PNG charts and multi-run comparison
367
+ - [Auto-Plot After Profile](docs/tutorials/auto-plot.md) - Run `aiperf plot` automatically after `aiperf profile`
368
+ - [GPU Telemetry](docs/tutorials/gpu-telemetry.md) - DCGM metrics collection
369
+ - [OTel + MLflow Live Telemetry](docs/tutorials/otel-mlflow.md) - Stream metrics to OTel and MLflow in real time
370
+ - [Weights & Biases Export](docs/tutorials/wandb.md) - Upload results tables and artifacts to wandb
371
+ - [Server Metrics](docs/server-metrics/server-metrics.md) - Prometheus-compatible metrics
372
+
373
+ ## Documentation
374
+
375
+ | Document | Purpose |
376
+ |----------|---------|
377
+ | [Architecture](docs/architecture.md) | Three-plane architecture, core components, credit system, data flow |
378
+ | [CLI Options](docs/cli-options.md) | Complete command and option reference |
379
+ | [Metrics Reference](docs/metrics-reference.md) | All metric definitions, formulas, and requirements |
380
+ | [Environment Variables](docs/environment-variables.md) | All `AIPERF_*` configuration variables |
381
+ | [Plugin System](docs/plugins/plugin-system.md) | Plugin architecture, 25+ categories, creation guide |
382
+ | [Creating Plugins](docs/plugins/creating-your-first-plugin.md) | Step-by-step plugin tutorial |
383
+ | [Accuracy Benchmarks](docs/accuracy/accuracy-benchmarking.md) | Accuracy evaluation against MMLU, AIME, and other benchmarks |
384
+ | [Benchmark Modes](docs/benchmark-modes/trace-replay.md) | Trace replay and timing modes |
385
+ | [Server Metrics](docs/server-metrics/server-metrics.md) | Prometheus-compatible server metrics collection |
386
+ | [Tokenizer Auto-Detection](docs/reference/tokenizer-auto-detection.md) | Pre-flight tokenizer detection |
387
+ | [Conversation Context Mode](docs/reference/conversation-context-mode.md) | How conversation history accumulates in multi-turn |
388
+ | [Dataset Synthesis API](docs/api/synthesis.md) | Synthesis module API reference |
389
+ | [Code Patterns](docs/dev/patterns.md) | Code examples for services, models, messages, plugins |
390
+ | [Migrating from Genai-Perf](docs/migrating.md) | Migration guide and feature comparison |
391
+ | [Design Proposals](https://github.com/ai-dynamo/enhancements) | Enhancement proposals and discussions |
392
+
393
+ ## Contributing
394
+
395
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, coding conventions, and contribution guidelines.
396
+
397
+ ## Known Issues
398
+
399
+ - Output sequence length constraints (`--output-tokens-mean`) cannot be guaranteed unless you pass `ignore_eos` and/or `min_tokens` via `--extra-inputs` to an inference server that supports them.
400
+ - Very high concurrency settings (typically >15,000) may lead to port exhaustion on some systems. Adjust system limits or reduce concurrency if connection failures occur.
401
+ - Startup errors caused by invalid configuration settings can cause AIPerf to hang indefinitely. Terminate the process and check configuration settings.
402
+ - Copying selected text may not work reliably in the dashboard UI. Use the `c` key to copy all logs.