qmlx-serve 0.11.0__tar.gz

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 (636) hide show
  1. qmlx_serve-0.11.0/LICENSE +29 -0
  2. qmlx_serve-0.11.0/LICENSE-APACHE +202 -0
  3. qmlx_serve-0.11.0/NOTICE +23 -0
  4. qmlx_serve-0.11.0/PKG-INFO +184 -0
  5. qmlx_serve-0.11.0/README.md +68 -0
  6. qmlx_serve-0.11.0/pyproject.toml +445 -0
  7. qmlx_serve-0.11.0/qmlx_serve.egg-info/PKG-INFO +184 -0
  8. qmlx_serve-0.11.0/qmlx_serve.egg-info/SOURCES.txt +634 -0
  9. qmlx_serve-0.11.0/qmlx_serve.egg-info/dependency_links.txt +1 -0
  10. qmlx_serve-0.11.0/qmlx_serve.egg-info/entry_points.txt +10 -0
  11. qmlx_serve-0.11.0/qmlx_serve.egg-info/requires.txt +107 -0
  12. qmlx_serve-0.11.0/qmlx_serve.egg-info/top_level.txt +1 -0
  13. qmlx_serve-0.11.0/setup.cfg +4 -0
  14. qmlx_serve-0.11.0/tests/test_447_stream_tool_choice_auto.py +615 -0
  15. qmlx_serve-0.11.0/tests/test_agent_query_context_skip.py +268 -0
  16. qmlx_serve-0.11.0/tests/test_agent_test_runner_refresh_config.py +153 -0
  17. qmlx_serve-0.11.0/tests/test_alias_hybrid_classification.py +355 -0
  18. qmlx_serve-0.11.0/tests/test_alias_recommended_sampling.py +123 -0
  19. qmlx_serve-0.11.0/tests/test_aliases_contract.py +1381 -0
  20. qmlx_serve-0.11.0/tests/test_anthropic_adapter.py +1194 -0
  21. qmlx_serve-0.11.0/tests/test_anthropic_models.py +367 -0
  22. qmlx_serve-0.11.0/tests/test_anthropic_output_config.py +561 -0
  23. qmlx_serve-0.11.0/tests/test_anthropic_route_auth.py +670 -0
  24. qmlx_serve-0.11.0/tests/test_anthropic_route_streaming.py +334 -0
  25. qmlx_serve-0.11.0/tests/test_anthropic_route_thinking_gate.py +969 -0
  26. qmlx_serve-0.11.0/tests/test_anthropic_spec_polish_bundle.py +479 -0
  27. qmlx_serve-0.11.0/tests/test_anthropic_stop_sequences.py +371 -0
  28. qmlx_serve-0.11.0/tests/test_anthropic_stream_finalize.py +861 -0
  29. qmlx_serve-0.11.0/tests/test_anthropic_stream_reasoning.py +212 -0
  30. qmlx_serve-0.11.0/tests/test_anthropic_streaming_reasoning.py +468 -0
  31. qmlx_serve-0.11.0/tests/test_anthropic_think_leak_r12_m1b.py +878 -0
  32. qmlx_serve-0.11.0/tests/test_anthropic_tool_choice_validation.py +151 -0
  33. qmlx_serve-0.11.0/tests/test_anthropic_tool_param_validation.py +217 -0
  34. qmlx_serve-0.11.0/tests/test_anthropic_tool_usage_d.py +960 -0
  35. qmlx_serve-0.11.0/tests/test_anthropic_tool_validation_scope.py +863 -0
  36. qmlx_serve-0.11.0/tests/test_api_models.py +1014 -0
  37. qmlx_serve-0.11.0/tests/test_api_utils.py +1162 -0
  38. qmlx_serve-0.11.0/tests/test_api_validation_bundle.py +784 -0
  39. qmlx_serve-0.11.0/tests/test_audio.py +275 -0
  40. qmlx_serve-0.11.0/tests/test_audio_alias_registry.py +1208 -0
  41. qmlx_serve-0.11.0/tests/test_audio_boot_check.py +226 -0
  42. qmlx_serve-0.11.0/tests/test_audio_extras_lockin.py +226 -0
  43. qmlx_serve-0.11.0/tests/test_audio_path_shaped_model.py +225 -0
  44. qmlx_serve-0.11.0/tests/test_audio_probe_consistency.py +440 -0
  45. qmlx_serve-0.11.0/tests/test_audio_r11_b_bundle.py +645 -0
  46. qmlx_serve-0.11.0/tests/test_audio_r11_b_pure.py +296 -0
  47. qmlx_serve-0.11.0/tests/test_audio_r7_c_bundle.py +626 -0
  48. qmlx_serve-0.11.0/tests/test_audio_r8_a_bundle.py +1096 -0
  49. qmlx_serve-0.11.0/tests/test_audio_route_registration_gate.py +899 -0
  50. qmlx_serve-0.11.0/tests/test_audio_routes_bundle.py +1185 -0
  51. qmlx_serve-0.11.0/tests/test_audio_upload_size_limit.py +572 -0
  52. qmlx_serve-0.11.0/tests/test_batched_engine_chat_template.py +129 -0
  53. qmlx_serve-0.11.0/tests/test_batched_engine_output_router.py +605 -0
  54. qmlx_serve-0.11.0/tests/test_batched_engine_tool_call_normalization.py +119 -0
  55. qmlx_serve-0.11.0/tests/test_batching.py +821 -0
  56. qmlx_serve-0.11.0/tests/test_batching_deterministic.py +576 -0
  57. qmlx_serve-0.11.0/tests/test_bench_tier_all.py +331 -0
  58. qmlx_serve-0.11.0/tests/test_bench_tier_harness.py +926 -0
  59. qmlx_serve-0.11.0/tests/test_bench_tier_smoke.py +283 -0
  60. qmlx_serve-0.11.0/tests/test_bench_tier_submit_combo.py +737 -0
  61. qmlx_serve-0.11.0/tests/test_bench_vs_ollama.py +1348 -0
  62. qmlx_serve-0.11.0/tests/test_body_receive_timeout.py +824 -0
  63. qmlx_serve-0.11.0/tests/test_cache_routes.py +563 -0
  64. qmlx_serve-0.11.0/tests/test_cancelled_requests_metric.py +1412 -0
  65. qmlx_serve-0.11.0/tests/test_capabilities_field.py +493 -0
  66. qmlx_serve-0.11.0/tests/test_casual_chat_auto_disable_thinking.py +1147 -0
  67. qmlx_serve-0.11.0/tests/test_chat_logprobs_channel_routing.py +196 -0
  68. qmlx_serve-0.11.0/tests/test_chat_n_must_equal_1.py +130 -0
  69. qmlx_serve-0.11.0/tests/test_chat_route_forced_tool_prefix.py +107 -0
  70. qmlx_serve-0.11.0/tests/test_chat_route_forced_tool_prefix_wiring.py +340 -0
  71. qmlx_serve-0.11.0/tests/test_chat_route_tool_choice_enforcement.py +1328 -0
  72. qmlx_serve-0.11.0/tests/test_chat_route_tool_tag_leak.py +303 -0
  73. qmlx_serve-0.11.0/tests/test_chat_route_vlm_image.py +287 -0
  74. qmlx_serve-0.11.0/tests/test_chat_streaming_guided.py +428 -0
  75. qmlx_serve-0.11.0/tests/test_chat_streaming_no_reasoning_alias.py +241 -0
  76. qmlx_serve-0.11.0/tests/test_chat_streaming_spec.py +873 -0
  77. qmlx_serve-0.11.0/tests/test_chat_template_kwargs.py +275 -0
  78. qmlx_serve-0.11.0/tests/test_chat_template_marker_sanitize.py +313 -0
  79. qmlx_serve-0.11.0/tests/test_chat_template_sidecar.py +173 -0
  80. qmlx_serve-0.11.0/tests/test_chat_template_tool_call_arguments.py +658 -0
  81. qmlx_serve-0.11.0/tests/test_check_gha_pinning.py +183 -0
  82. qmlx_serve-0.11.0/tests/test_check_mlx_upstream_calls.py +181 -0
  83. qmlx_serve-0.11.0/tests/test_clean_error_messages.py +437 -0
  84. qmlx_serve-0.11.0/tests/test_cli_argcomplete.py +304 -0
  85. qmlx_serve-0.11.0/tests/test_cli_bench.py +296 -0
  86. qmlx_serve-0.11.0/tests/test_cli_chat.py +2500 -0
  87. qmlx_serve-0.11.0/tests/test_cli_config_fidelity.py +247 -0
  88. qmlx_serve-0.11.0/tests/test_cli_embeddings_extra.py +149 -0
  89. qmlx_serve-0.11.0/tests/test_cli_info.py +78 -0
  90. qmlx_serve-0.11.0/tests/test_cli_jlens.py +420 -0
  91. qmlx_serve-0.11.0/tests/test_cli_models.py +269 -0
  92. qmlx_serve-0.11.0/tests/test_cloud_router.py +780 -0
  93. qmlx_serve-0.11.0/tests/test_codex_profile.py +90 -0
  94. qmlx_serve-0.11.0/tests/test_community_bench.py +2329 -0
  95. qmlx_serve-0.11.0/tests/test_completions_log_redaction.py +195 -0
  96. qmlx_serve-0.11.0/tests/test_completions_response_format_json_schema.py +266 -0
  97. qmlx_serve-0.11.0/tests/test_completions_response_format_logprobs.py +248 -0
  98. qmlx_serve-0.11.0/tests/test_completions_spec_parity.py +1046 -0
  99. qmlx_serve-0.11.0/tests/test_config_and_middleware.py +572 -0
  100. qmlx_serve-0.11.0/tests/test_content_block_strict_types.py +484 -0
  101. qmlx_serve-0.11.0/tests/test_context_length_exceeded.py +451 -0
  102. qmlx_serve-0.11.0/tests/test_context_overflow_400.py +296 -0
  103. qmlx_serve-0.11.0/tests/test_continuous_batching.py +356 -0
  104. qmlx_serve-0.11.0/tests/test_cors_env_configurable.py +586 -0
  105. qmlx_serve-0.11.0/tests/test_cors_lockdown_response_shape.py +243 -0
  106. qmlx_serve-0.11.0/tests/test_d_anthro_validation.py +872 -0
  107. qmlx_serve-0.11.0/tests/test_ddtree_eligibility.py +278 -0
  108. qmlx_serve-0.11.0/tests/test_ddtree_integration.py +487 -0
  109. qmlx_serve-0.11.0/tests/test_deep_nest_dos.py +1083 -0
  110. qmlx_serve-0.11.0/tests/test_deepseek_v32_indexer_gate.py +799 -0
  111. qmlx_serve-0.11.0/tests/test_deepseek_v3_dedicated_parser.py +323 -0
  112. qmlx_serve-0.11.0/tests/test_deepseek_v3_tool_parser.py +588 -0
  113. qmlx_serve-0.11.0/tests/test_deepseek_v4_vendored.py +109 -0
  114. qmlx_serve-0.11.0/tests/test_dense_sampler_fastpath.py +285 -0
  115. qmlx_serve-0.11.0/tests/test_dequantize_cache.py +182 -0
  116. qmlx_serve-0.11.0/tests/test_dflash_adapter_signature.py +489 -0
  117. qmlx_serve-0.11.0/tests/test_dflash_eligibility.py +188 -0
  118. qmlx_serve-0.11.0/tests/test_dflash_integration.py +1179 -0
  119. qmlx_serve-0.11.0/tests/test_dflash_spec_decode.py +1211 -0
  120. qmlx_serve-0.11.0/tests/test_diffusion_engine.py +3450 -0
  121. qmlx_serve-0.11.0/tests/test_disconnect_counter_prod_shape.py +635 -0
  122. qmlx_serve-0.11.0/tests/test_disconnect_guard_aborts_scheduler.py +705 -0
  123. qmlx_serve-0.11.0/tests/test_disk_kv_checkpoint.py +849 -0
  124. qmlx_serve-0.11.0/tests/test_disk_space_check.py +140 -0
  125. qmlx_serve-0.11.0/tests/test_doctor_env_health.py +532 -0
  126. qmlx_serve-0.11.0/tests/test_doctor_extras.py +209 -0
  127. qmlx_serve-0.11.0/tests/test_doctor_no_model_load.py +189 -0
  128. qmlx_serve-0.11.0/tests/test_doctor_runner.py +223 -0
  129. qmlx_serve-0.11.0/tests/test_download_gate.py +911 -0
  130. qmlx_serve-0.11.0/tests/test_embeddings.py +365 -0
  131. qmlx_serve-0.11.0/tests/test_embeddings_extra_guard.py +921 -0
  132. qmlx_serve-0.11.0/tests/test_embeddings_route.py +189 -0
  133. qmlx_serve-0.11.0/tests/test_embeddings_timeout_admission.py +1221 -0
  134. qmlx_serve-0.11.0/tests/test_enable_thinking_prompt_accounting.py +632 -0
  135. qmlx_serve-0.11.0/tests/test_enable_thinking_warning_header.py +178 -0
  136. qmlx_serve-0.11.0/tests/test_engine_router_non_stream.py +422 -0
  137. qmlx_serve-0.11.0/tests/test_engine_step_thread.py +648 -0
  138. qmlx_serve-0.11.0/tests/test_envelope_field_extraction.py +617 -0
  139. qmlx_serve-0.11.0/tests/test_event_loop.py +281 -0
  140. qmlx_serve-0.11.0/tests/test_exception_handlers.py +538 -0
  141. qmlx_serve-0.11.0/tests/test_finalize_harmony_raw_text.py +1094 -0
  142. qmlx_serve-0.11.0/tests/test_fix_reasoning_mtp_doctor.py +198 -0
  143. qmlx_serve-0.11.0/tests/test_gemma4_altup_autodetect.py +167 -0
  144. qmlx_serve-0.11.0/tests/test_gemma4_text_import_guard.py +115 -0
  145. qmlx_serve-0.11.0/tests/test_generation_config_loader.py +462 -0
  146. qmlx_serve-0.11.0/tests/test_guided.py +731 -0
  147. qmlx_serve-0.11.0/tests/test_harmony_finalize.py +770 -0
  148. qmlx_serve-0.11.0/tests/test_harmony_parsers.py +1544 -0
  149. qmlx_serve-0.11.0/tests/test_harmony_stop_final_channel_only.py +555 -0
  150. qmlx_serve-0.11.0/tests/test_healthz_perf_budget.py +185 -0
  151. qmlx_serve-0.11.0/tests/test_help_fuzzy.py +56 -0
  152. qmlx_serve-0.11.0/tests/test_hermes_harness_contract.py +94 -0
  153. qmlx_serve-0.11.0/tests/test_honest_metrics.py +609 -0
  154. qmlx_serve-0.11.0/tests/test_hy3_chat_template_default.py +309 -0
  155. qmlx_serve-0.11.0/tests/test_hybrid_prefix_cache_growth.py +287 -0
  156. qmlx_serve-0.11.0/tests/test_idle_event_wakeup.py +108 -0
  157. qmlx_serve-0.11.0/tests/test_image_aspect_ratio.py +237 -0
  158. qmlx_serve-0.11.0/tests/test_image_block_requires_vision_model.py +327 -0
  159. qmlx_serve-0.11.0/tests/test_image_url_must_be_object.py +203 -0
  160. qmlx_serve-0.11.0/tests/test_internal_route_auth.py +473 -0
  161. qmlx_serve-0.11.0/tests/test_kv_cache_dtype.py +346 -0
  162. qmlx_serve-0.11.0/tests/test_kv_cache_dtype_cli.py +113 -0
  163. qmlx_serve-0.11.0/tests/test_kv_cache_dtype_metrics.py +176 -0
  164. qmlx_serve-0.11.0/tests/test_kv_cache_position_ids.py +420 -0
  165. qmlx_serve-0.11.0/tests/test_launch_cli.py +560 -0
  166. qmlx_serve-0.11.0/tests/test_legacy_functions_field.py +171 -0
  167. qmlx_serve-0.11.0/tests/test_log_namespace_rebrand.py +275 -0
  168. qmlx_serve-0.11.0/tests/test_lone_surrogate_validator.py +353 -0
  169. qmlx_serve-0.11.0/tests/test_max_generation_tokens_ceiling.py +352 -0
  170. qmlx_serve-0.11.0/tests/test_max_tokens_resolver.py +240 -0
  171. qmlx_serve-0.11.0/tests/test_mcp_config_discovery.py +103 -0
  172. qmlx_serve-0.11.0/tests/test_mcp_security.py +879 -0
  173. qmlx_serve-0.11.0/tests/test_memory_cache.py +641 -0
  174. qmlx_serve-0.11.0/tests/test_memory_capacity_check.py +252 -0
  175. qmlx_serve-0.11.0/tests/test_memory_stability.py +271 -0
  176. qmlx_serve-0.11.0/tests/test_metal_cap_enforcement.py +808 -0
  177. qmlx_serve-0.11.0/tests/test_metal_error_recovery.py +225 -0
  178. qmlx_serve-0.11.0/tests/test_metrics_route.py +570 -0
  179. qmlx_serve-0.11.0/tests/test_microbench_parsers.py +120 -0
  180. qmlx_serve-0.11.0/tests/test_mirror_pull.py +3649 -0
  181. qmlx_serve-0.11.0/tests/test_mirror_to_r2.py +338 -0
  182. qmlx_serve-0.11.0/tests/test_mllm.py +456 -0
  183. qmlx_serve-0.11.0/tests/test_mllm_batch_generator.py +692 -0
  184. qmlx_serve-0.11.0/tests/test_mllm_cache.py +1125 -0
  185. qmlx_serve-0.11.0/tests/test_mllm_continuous_batching.py +2136 -0
  186. qmlx_serve-0.11.0/tests/test_mllm_corrupt_image.py +271 -0
  187. qmlx_serve-0.11.0/tests/test_mllm_cross_thread_stream_contract.py +243 -0
  188. qmlx_serve-0.11.0/tests/test_mllm_executor_cancel.py +248 -0
  189. qmlx_serve-0.11.0/tests/test_mllm_hybrid_probe.py +84 -0
  190. qmlx_serve-0.11.0/tests/test_mllm_logprobs_plumbing.py +303 -0
  191. qmlx_serve-0.11.0/tests/test_mllm_penalty_passthrough.py +257 -0
  192. qmlx_serve-0.11.0/tests/test_mllm_usage_tracking.py +247 -0
  193. qmlx_serve-0.11.0/tests/test_mlx_compat.py +394 -0
  194. qmlx_serve-0.11.0/tests/test_modality_field.py +255 -0
  195. qmlx_serve-0.11.0/tests/test_model_aliases.py +164 -0
  196. qmlx_serve-0.11.0/tests/test_model_auto_config.py +1483 -0
  197. qmlx_serve-0.11.0/tests/test_model_profiles_ssot.py +401 -0
  198. qmlx_serve-0.11.0/tests/test_model_registry.py +259 -0
  199. qmlx_serve-0.11.0/tests/test_models_command_layout.py +108 -0
  200. qmlx_serve-0.11.0/tests/test_mtp_cli_wiring.py +2924 -0
  201. qmlx_serve-0.11.0/tests/test_mtp_gemma4_assistant_inject.py +1508 -0
  202. qmlx_serve-0.11.0/tests/test_mtp_inject_and_install.py +90 -0
  203. qmlx_serve-0.11.0/tests/test_mtp_lossless.py +468 -0
  204. qmlx_serve-0.11.0/tests/test_mtp_real_weights.py +305 -0
  205. qmlx_serve-0.11.0/tests/test_mtp_spec_decode.py +1795 -0
  206. qmlx_serve-0.11.0/tests/test_mtp_stream_contract.py +413 -0
  207. qmlx_serve-0.11.0/tests/test_mxfp4_moe_guardrail.py +630 -0
  208. qmlx_serve-0.11.0/tests/test_native_tool_format.py +428 -0
  209. qmlx_serve-0.11.0/tests/test_no_mllm_flag.py +2615 -0
  210. qmlx_serve-0.11.0/tests/test_no_out_of_band_routing.py +1529 -0
  211. qmlx_serve-0.11.0/tests/test_no_pydantic_error_leak.py +643 -0
  212. qmlx_serve-0.11.0/tests/test_openai_tool_choice_validation.py +295 -0
  213. qmlx_serve-0.11.0/tests/test_optimizations.py +110 -0
  214. qmlx_serve-0.11.0/tests/test_orphan_tool_validation.py +600 -0
  215. qmlx_serve-0.11.0/tests/test_output_router.py +993 -0
  216. qmlx_serve-0.11.0/tests/test_packaging_data_files.py +125 -0
  217. qmlx_serve-0.11.0/tests/test_paged_cache.py +872 -0
  218. qmlx_serve-0.11.0/tests/test_paged_cache_benefits.py +463 -0
  219. qmlx_serve-0.11.0/tests/test_paged_cache_real_inference.py +269 -0
  220. qmlx_serve-0.11.0/tests/test_paged_cache_real_model.py +587 -0
  221. qmlx_serve-0.11.0/tests/test_paired_compat.py +459 -0
  222. qmlx_serve-0.11.0/tests/test_parallel_tool_calls.py +214 -0
  223. qmlx_serve-0.11.0/tests/test_param_validation_r5e.py +279 -0
  224. qmlx_serve-0.11.0/tests/test_param_validation_r7b.py +480 -0
  225. qmlx_serve-0.11.0/tests/test_parent_watchdog.py +421 -0
  226. qmlx_serve-0.11.0/tests/test_payload_builder_v2_full.py +147 -0
  227. qmlx_serve-0.11.0/tests/test_payload_builder_v2_kwargs.py +195 -0
  228. qmlx_serve-0.11.0/tests/test_per_request_thinking_budget.py +1178 -0
  229. qmlx_serve-0.11.0/tests/test_pflash.py +346 -0
  230. qmlx_serve-0.11.0/tests/test_pflash_benchmark.py +19 -0
  231. qmlx_serve-0.11.0/tests/test_pflash_engine.py +131 -0
  232. qmlx_serve-0.11.0/tests/test_pflash_metrics.py +300 -0
  233. qmlx_serve-0.11.0/tests/test_pflash_needle.py +220 -0
  234. qmlx_serve-0.11.0/tests/test_pflash_scheduler.py +299 -0
  235. qmlx_serve-0.11.0/tests/test_platform.py +103 -0
  236. qmlx_serve-0.11.0/tests/test_postprocessor.py +2720 -0
  237. qmlx_serve-0.11.0/tests/test_pr_validate_codex.py +1811 -0
  238. qmlx_serve-0.11.0/tests/test_pr_validate_google_review.py +385 -0
  239. qmlx_serve-0.11.0/tests/test_pr_validate_runner.py +1015 -0
  240. qmlx_serve-0.11.0/tests/test_pr_validate_stress_timeout.py +179 -0
  241. qmlx_serve-0.11.0/tests/test_pr_validate_test_env.py +925 -0
  242. qmlx_serve-0.11.0/tests/test_pr_validate_test_plan_check.py +117 -0
  243. qmlx_serve-0.11.0/tests/test_prefix_boundary_path_parity.py +212 -0
  244. qmlx_serve-0.11.0/tests/test_prefix_cache.py +704 -0
  245. qmlx_serve-0.11.0/tests/test_prefix_cache_eviction.py +554 -0
  246. qmlx_serve-0.11.0/tests/test_prefix_cache_persistence.py +2777 -0
  247. qmlx_serve-0.11.0/tests/test_prefix_cache_pressure_eviction.py +628 -0
  248. qmlx_serve-0.11.0/tests/test_prefix_cache_radix_e2e.py +256 -0
  249. qmlx_serve-0.11.0/tests/test_probe_fastpath.py +714 -0
  250. qmlx_serve-0.11.0/tests/test_prompt_cache_snapshot.py +643 -0
  251. qmlx_serve-0.11.0/tests/test_prompt_lookup.py +343 -0
  252. qmlx_serve-0.11.0/tests/test_prompt_lookup_bench.py +300 -0
  253. qmlx_serve-0.11.0/tests/test_pull_audio_alias_resolution.py +137 -0
  254. qmlx_serve-0.11.0/tests/test_pull_summary.py +165 -0
  255. qmlx_serve-0.11.0/tests/test_qwen3coder_bare_wrapper_streaming.py +365 -0
  256. qmlx_serve-0.11.0/tests/test_qwen3coder_tool_parser_streaming.py +371 -0
  257. qmlx_serve-0.11.0/tests/test_r10_scrub_validation_bundle.py +580 -0
  258. qmlx_serve-0.11.0/tests/test_r12_4_strict_json_schema_constraint_matrix.py +421 -0
  259. qmlx_serve-0.11.0/tests/test_r12_4_strict_json_schema_helpers.py +604 -0
  260. qmlx_serve-0.11.0/tests/test_r12_h06_repair_context_guard.py +561 -0
  261. qmlx_serve-0.11.0/tests/test_r12_m3_responses_stream_leading_items_order.py +390 -0
  262. qmlx_serve-0.11.0/tests/test_r12_reasoning_sanitizer_required.py +699 -0
  263. qmlx_serve-0.11.0/tests/test_r15_routes_stability_batch.py +742 -0
  264. qmlx_serve-0.11.0/tests/test_radix_index.py +320 -0
  265. qmlx_serve-0.11.0/tests/test_ready_banner_timing.py +109 -0
  266. qmlx_serve-0.11.0/tests/test_reasoning_content_null_rescue.py +1924 -0
  267. qmlx_serve-0.11.0/tests/test_reasoning_effort_translation.py +387 -0
  268. qmlx_serve-0.11.0/tests/test_reasoning_finalize_stop_in_think.py +947 -0
  269. qmlx_serve-0.11.0/tests/test_reasoning_parser.py +1208 -0
  270. qmlx_serve-0.11.0/tests/test_reasoning_parser_truncation_finalize.py +389 -0
  271. qmlx_serve-0.11.0/tests/test_reasoning_parsers.py +2221 -0
  272. qmlx_serve-0.11.0/tests/test_reasoning_think_detector.py +73 -0
  273. qmlx_serve-0.11.0/tests/test_release_check_m3_port_thread.py +181 -0
  274. qmlx_serve-0.11.0/tests/test_release_check_random.py +219 -0
  275. qmlx_serve-0.11.0/tests/test_request.py +475 -0
  276. qmlx_serve-0.11.0/tests/test_request_body_size_limit.py +522 -0
  277. qmlx_serve-0.11.0/tests/test_request_cancellation.py +216 -0
  278. qmlx_serve-0.11.0/tests/test_request_time_alias_resolution.py +502 -0
  279. qmlx_serve-0.11.0/tests/test_response_format_json_schema_strict.py +2510 -0
  280. qmlx_serve-0.11.0/tests/test_response_format_streaming_fence_strip.py +722 -0
  281. qmlx_serve-0.11.0/tests/test_response_format_strict_types.py +257 -0
  282. qmlx_serve-0.11.0/tests/test_responses_591_followups.py +466 -0
  283. qmlx_serve-0.11.0/tests/test_responses_adapter.py +1517 -0
  284. qmlx_serve-0.11.0/tests/test_responses_budget_exhaust_streaming.py +1445 -0
  285. qmlx_serve-0.11.0/tests/test_responses_bundle.py +977 -0
  286. qmlx_serve-0.11.0/tests/test_responses_chat_template_kwargs.py +652 -0
  287. qmlx_serve-0.11.0/tests/test_responses_engine_failure_envelope.py +461 -0
  288. qmlx_serve-0.11.0/tests/test_responses_input_default_type.py +423 -0
  289. qmlx_serve-0.11.0/tests/test_responses_param_validation.py +344 -0
  290. qmlx_serve-0.11.0/tests/test_responses_route.py +1104 -0
  291. qmlx_serve-0.11.0/tests/test_responses_sse_event_order.py +352 -0
  292. qmlx_serve-0.11.0/tests/test_rm_command.py +216 -0
  293. qmlx_serve-0.11.0/tests/test_route_engine_contract.py +280 -0
  294. qmlx_serve-0.11.0/tests/test_routes.py +1404 -0
  295. qmlx_serve-0.11.0/tests/test_routes_cached_tokens.py +452 -0
  296. qmlx_serve-0.11.0/tests/test_routes_models.py +177 -0
  297. qmlx_serve-0.11.0/tests/test_routes_models_effective_parsers.py +626 -0
  298. qmlx_serve-0.11.0/tests/test_rst_mid_sse_zombie_kv.py +400 -0
  299. qmlx_serve-0.11.0/tests/test_runtime_cache_path.py +121 -0
  300. qmlx_serve-0.11.0/tests/test_sampler_fast_path.py +447 -0
  301. qmlx_serve-0.11.0/tests/test_sampling_param_finite_range.py +802 -0
  302. qmlx_serve-0.11.0/tests/test_sampling_params_passthrough.py +526 -0
  303. qmlx_serve-0.11.0/tests/test_sampling_validation.py +559 -0
  304. qmlx_serve-0.11.0/tests/test_sanitize_output.py +121 -0
  305. qmlx_serve-0.11.0/tests/test_scheduler_disk_kv_hook.py +415 -0
  306. qmlx_serve-0.11.0/tests/test_scheduler_stop_decoder_surface.py +177 -0
  307. qmlx_serve-0.11.0/tests/test_schema_v2_accepts_minimal_v2.py +106 -0
  308. qmlx_serve-0.11.0/tests/test_schema_v2_accepts_v1.py +102 -0
  309. qmlx_serve-0.11.0/tests/test_schema_v2_rejects_partial_harness.py +154 -0
  310. qmlx_serve-0.11.0/tests/test_seed_reproducibility.py +734 -0
  311. qmlx_serve-0.11.0/tests/test_serve_host_loopback_default.py +391 -0
  312. qmlx_serve-0.11.0/tests/test_serve_listen_fd.py +494 -0
  313. qmlx_serve-0.11.0/tests/test_serve_port_collision.py +373 -0
  314. qmlx_serve-0.11.0/tests/test_server.py +1035 -0
  315. qmlx_serve-0.11.0/tests/test_server_api_key_env_fallback.py +325 -0
  316. qmlx_serve-0.11.0/tests/test_server_auth_ordering.py +285 -0
  317. qmlx_serve-0.11.0/tests/test_server_load_model_order.py +394 -0
  318. qmlx_serve-0.11.0/tests/test_server_utils.py +1390 -0
  319. qmlx_serve-0.11.0/tests/test_share_cli.py +1213 -0
  320. qmlx_serve-0.11.0/tests/test_signal_observability.py +535 -0
  321. qmlx_serve-0.11.0/tests/test_speculative_config.py +574 -0
  322. qmlx_serve-0.11.0/tests/test_sse_keepalive.py +580 -0
  323. qmlx_serve-0.11.0/tests/test_stop_matcher_completions.py +307 -0
  324. qmlx_serve-0.11.0/tests/test_stop_string_enforcement.py +309 -0
  325. qmlx_serve-0.11.0/tests/test_stream_forced_tool_reasoning.py +1103 -0
  326. qmlx_serve-0.11.0/tests/test_stream_include_usage_honored.py +427 -0
  327. qmlx_serve-0.11.0/tests/test_streaming.py +195 -0
  328. qmlx_serve-0.11.0/tests/test_streaming_detokenizer.py +259 -0
  329. qmlx_serve-0.11.0/tests/test_streaming_detokenizer_bpe.py +407 -0
  330. qmlx_serve-0.11.0/tests/test_streaming_json_encoder.py +441 -0
  331. qmlx_serve-0.11.0/tests/test_streaming_latency.py +339 -0
  332. qmlx_serve-0.11.0/tests/test_streaming_newlines.py +313 -0
  333. qmlx_serve-0.11.0/tests/test_streaming_pipeline_integration.py +288 -0
  334. qmlx_serve-0.11.0/tests/test_streaming_reasoning_split_r8c.py +513 -0
  335. qmlx_serve-0.11.0/tests/test_streaming_reasoning_with_structured_output.py +201 -0
  336. qmlx_serve-0.11.0/tests/test_streaming_simulator.py +984 -0
  337. qmlx_serve-0.11.0/tests/test_streaming_think_router.py +168 -0
  338. qmlx_serve-0.11.0/tests/test_streaming_tool_filter.py +289 -0
  339. qmlx_serve-0.11.0/tests/test_stress_test_stream_usage.py +64 -0
  340. qmlx_serve-0.11.0/tests/test_structured_output.py +509 -0
  341. qmlx_serve-0.11.0/tests/test_stt_corrupted_file.py +500 -0
  342. qmlx_serve-0.11.0/tests/test_stt_response_format.py +405 -0
  343. qmlx_serve-0.11.0/tests/test_stt_vad_pretrim.py +922 -0
  344. qmlx_serve-0.11.0/tests/test_submit_gitignore.py +50 -0
  345. qmlx_serve-0.11.0/tests/test_suffix_bench_methodology.py +236 -0
  346. qmlx_serve-0.11.0/tests/test_suffix_decoding.py +427 -0
  347. qmlx_serve-0.11.0/tests/test_suffix_decoding_tier.py +274 -0
  348. qmlx_serve-0.11.0/tests/test_telemetry_cli.py +299 -0
  349. qmlx_serve-0.11.0/tests/test_telemetry_consent.py +384 -0
  350. qmlx_serve-0.11.0/tests/test_telemetry_emit.py +761 -0
  351. qmlx_serve-0.11.0/tests/test_telemetry_queue.py +391 -0
  352. qmlx_serve-0.11.0/tests/test_telemetry_redact.py +321 -0
  353. qmlx_serve-0.11.0/tests/test_telemetry_state.py +241 -0
  354. qmlx_serve-0.11.0/tests/test_telemetry_transport.py +458 -0
  355. qmlx_serve-0.11.0/tests/test_tempfile_safe.py +626 -0
  356. qmlx_serve-0.11.0/tests/test_text_model_from_vlm.py +140 -0
  357. qmlx_serve-0.11.0/tests/test_text_only_media_gate.py +182 -0
  358. qmlx_serve-0.11.0/tests/test_tokenizer_gemma4_hybrid.py +411 -0
  359. qmlx_serve-0.11.0/tests/test_tool_call_e2e.py +612 -0
  360. qmlx_serve-0.11.0/tests/test_tool_call_promotion.py +735 -0
  361. qmlx_serve-0.11.0/tests/test_tool_call_streaming_parity.py +342 -0
  362. qmlx_serve-0.11.0/tests/test_tool_calling.py +636 -0
  363. qmlx_serve-0.11.0/tests/test_tool_choice_enforcement.py +1696 -0
  364. qmlx_serve-0.11.0/tests/test_tool_injection.py +259 -0
  365. qmlx_serve-0.11.0/tests/test_tool_logits.py +502 -0
  366. qmlx_serve-0.11.0/tests/test_tool_logits_schema_guards.py +205 -0
  367. qmlx_serve-0.11.0/tests/test_tool_param_enforcement.py +318 -0
  368. qmlx_serve-0.11.0/tests/test_tool_param_enforcement_f141a.py +391 -0
  369. qmlx_serve-0.11.0/tests/test_tool_parser_coverage.py +143 -0
  370. qmlx_serve-0.11.0/tests/test_tool_parser_wire_formats.py +149 -0
  371. qmlx_serve-0.11.0/tests/test_tool_parsers.py +1364 -0
  372. qmlx_serve-0.11.0/tests/test_tool_result_content_array.py +433 -0
  373. qmlx_serve-0.11.0/tests/test_tools_auto_disable_thinking.py +905 -0
  374. qmlx_serve-0.11.0/tests/test_truncation_no_synthetic_text.py +553 -0
  375. qmlx_serve-0.11.0/tests/test_turboquant.py +611 -0
  376. qmlx_serve-0.11.0/tests/test_turboquant_k8v4.py +963 -0
  377. qmlx_serve-0.11.0/tests/test_turboquant_kvcache_state.py +475 -0
  378. qmlx_serve-0.11.0/tests/test_ubc_evict.py +470 -0
  379. qmlx_serve-0.11.0/tests/test_ui_tars_fixes.py +980 -0
  380. qmlx_serve-0.11.0/tests/test_ui_tars_lane_parity.py +1512 -0
  381. qmlx_serve-0.11.0/tests/test_ui_tars_parser.py +913 -0
  382. qmlx_serve-0.11.0/tests/test_ui_tars_stream_action_holdback.py +731 -0
  383. qmlx_serve-0.11.0/tests/test_uitars_boot_check.py +177 -0
  384. qmlx_serve-0.11.0/tests/test_upgrade_cli.py +89 -0
  385. qmlx_serve-0.11.0/tests/test_upstream_regression.py +659 -0
  386. qmlx_serve-0.11.0/tests/test_validate_release_subject.py +105 -0
  387. qmlx_serve-0.11.0/tests/test_version_check.py +526 -0
  388. qmlx_serve-0.11.0/tests/test_vibethinker_function_xml.py +304 -0
  389. qmlx_serve-0.11.0/tests/test_video.py +359 -0
  390. qmlx_serve-0.11.0/tests/test_vision_extra_install.py +554 -0
  391. qmlx_serve-0.11.0/tests/test_xfail_audit.py +183 -0
  392. qmlx_serve-0.11.0/vllm_mlx/__init__.py +156 -0
  393. qmlx_serve-0.11.0/vllm_mlx/_completion.py +133 -0
  394. qmlx_serve-0.11.0/vllm_mlx/_download_gate.py +505 -0
  395. qmlx_serve-0.11.0/vllm_mlx/_integration_tests/__init__.py +14 -0
  396. qmlx_serve-0.11.0/vllm_mlx/_integration_tests/test_aider.sh +334 -0
  397. qmlx_serve-0.11.0/vllm_mlx/_integration_tests/test_anthropic_sdk.py +172 -0
  398. qmlx_serve-0.11.0/vllm_mlx/_integration_tests/test_hermes.py +680 -0
  399. qmlx_serve-0.11.0/vllm_mlx/_integration_tests/test_langchain.py +213 -0
  400. qmlx_serve-0.11.0/vllm_mlx/_integration_tests/test_librechat_docker.py +120 -0
  401. qmlx_serve-0.11.0/vllm_mlx/_integration_tests/test_openwebui.py +155 -0
  402. qmlx_serve-0.11.0/vllm_mlx/_integration_tests/test_pydantic_ai_full.py +156 -0
  403. qmlx_serve-0.11.0/vllm_mlx/_integration_tests/test_smolagents_full.py +118 -0
  404. qmlx_serve-0.11.0/vllm_mlx/_log_namespace.py +100 -0
  405. qmlx_serve-0.11.0/vllm_mlx/_mirror.py +1628 -0
  406. qmlx_serve-0.11.0/vllm_mlx/_mlx_compat.py +133 -0
  407. qmlx_serve-0.11.0/vllm_mlx/_mxfp4_moe_guardrail.py +413 -0
  408. qmlx_serve-0.11.0/vllm_mlx/_parent_watchdog.py +247 -0
  409. qmlx_serve-0.11.0/vllm_mlx/_sampler_fast_path.py +221 -0
  410. qmlx_serve-0.11.0/vllm_mlx/_seeded_sampler.py +357 -0
  411. qmlx_serve-0.11.0/vllm_mlx/_signal_observability.py +401 -0
  412. qmlx_serve-0.11.0/vllm_mlx/_tempfile_safe.py +365 -0
  413. qmlx_serve-0.11.0/vllm_mlx/_version_check.py +391 -0
  414. qmlx_serve-0.11.0/vllm_mlx/agents/__init__.py +214 -0
  415. qmlx_serve-0.11.0/vllm_mlx/agents/adapter.py +198 -0
  416. qmlx_serve-0.11.0/vllm_mlx/agents/base.py +216 -0
  417. qmlx_serve-0.11.0/vllm_mlx/agents/profiles/aider.yaml +41 -0
  418. qmlx_serve-0.11.0/vllm_mlx/agents/profiles/codex.yaml +72 -0
  419. qmlx_serve-0.11.0/vllm_mlx/agents/profiles/hermes.yaml +66 -0
  420. qmlx_serve-0.11.0/vllm_mlx/agents/profiles/kilo-code.yaml +60 -0
  421. qmlx_serve-0.11.0/vllm_mlx/agents/profiles/langchain.yaml +32 -0
  422. qmlx_serve-0.11.0/vllm_mlx/agents/profiles/opencode.yaml +62 -0
  423. qmlx_serve-0.11.0/vllm_mlx/agents/profiles/openhands.yaml +42 -0
  424. qmlx_serve-0.11.0/vllm_mlx/agents/profiles/pydanticai.yaml +33 -0
  425. qmlx_serve-0.11.0/vllm_mlx/agents/profiles/qwen-code.yaml +61 -0
  426. qmlx_serve-0.11.0/vllm_mlx/agents/profiles/smolagents.yaml +31 -0
  427. qmlx_serve-0.11.0/vllm_mlx/agents/testing.py +1339 -0
  428. qmlx_serve-0.11.0/vllm_mlx/aliases.json +1132 -0
  429. qmlx_serve-0.11.0/vllm_mlx/api/__init__.py +139 -0
  430. qmlx_serve-0.11.0/vllm_mlx/api/anthropic_adapter.py +853 -0
  431. qmlx_serve-0.11.0/vllm_mlx/api/anthropic_models.py +626 -0
  432. qmlx_serve-0.11.0/vllm_mlx/api/constants.py +63 -0
  433. qmlx_serve-0.11.0/vllm_mlx/api/guided.py +292 -0
  434. qmlx_serve-0.11.0/vllm_mlx/api/harmony_tools.py +109 -0
  435. qmlx_serve-0.11.0/vllm_mlx/api/models.py +2925 -0
  436. qmlx_serve-0.11.0/vllm_mlx/api/response_format_metrics.py +137 -0
  437. qmlx_serve-0.11.0/vllm_mlx/api/responses_adapter.py +1191 -0
  438. qmlx_serve-0.11.0/vllm_mlx/api/responses_models.py +548 -0
  439. qmlx_serve-0.11.0/vllm_mlx/api/streaming.py +208 -0
  440. qmlx_serve-0.11.0/vllm_mlx/api/strict_json_schema.py +628 -0
  441. qmlx_serve-0.11.0/vllm_mlx/api/tool_calling.py +1254 -0
  442. qmlx_serve-0.11.0/vllm_mlx/api/tool_logits.py +815 -0
  443. qmlx_serve-0.11.0/vllm_mlx/api/utils.py +1543 -0
  444. qmlx_serve-0.11.0/vllm_mlx/attention.py +245 -0
  445. qmlx_serve-0.11.0/vllm_mlx/audio/__init__.py +25 -0
  446. qmlx_serve-0.11.0/vllm_mlx/audio/aliases.json +192 -0
  447. qmlx_serve-0.11.0/vllm_mlx/audio/probe.py +578 -0
  448. qmlx_serve-0.11.0/vllm_mlx/audio/processor.py +213 -0
  449. qmlx_serve-0.11.0/vllm_mlx/audio/registry.py +248 -0
  450. qmlx_serve-0.11.0/vllm_mlx/audio/stt.py +743 -0
  451. qmlx_serve-0.11.0/vllm_mlx/audio/tts.py +543 -0
  452. qmlx_serve-0.11.0/vllm_mlx/bench/__init__.py +8 -0
  453. qmlx_serve-0.11.0/vllm_mlx/bench/_server.py +242 -0
  454. qmlx_serve-0.11.0/vllm_mlx/bench/pflash_replication.py +164 -0
  455. qmlx_serve-0.11.0/vllm_mlx/bench/tier_runner.py +1460 -0
  456. qmlx_serve-0.11.0/vllm_mlx/benchmark.py +1732 -0
  457. qmlx_serve-0.11.0/vllm_mlx/cache/__init__.py +33 -0
  458. qmlx_serve-0.11.0/vllm_mlx/cache/protocol.py +278 -0
  459. qmlx_serve-0.11.0/vllm_mlx/cli.py +8413 -0
  460. qmlx_serve-0.11.0/vllm_mlx/cloud_router.py +192 -0
  461. qmlx_serve-0.11.0/vllm_mlx/community_bench/__init__.py +40 -0
  462. qmlx_serve-0.11.0/vllm_mlx/community_bench/hardware.py +261 -0
  463. qmlx_serve-0.11.0/vllm_mlx/community_bench/runner.py +491 -0
  464. qmlx_serve-0.11.0/vllm_mlx/community_bench/submission.py +817 -0
  465. qmlx_serve-0.11.0/vllm_mlx/config/__init__.py +6 -0
  466. qmlx_serve-0.11.0/vllm_mlx/config/server_config.py +223 -0
  467. qmlx_serve-0.11.0/vllm_mlx/doctor/__init__.py +52 -0
  468. qmlx_serve-0.11.0/vllm_mlx/doctor/cli.py +104 -0
  469. qmlx_serve-0.11.0/vllm_mlx/doctor/env_health.py +844 -0
  470. qmlx_serve-0.11.0/vllm_mlx/doctor/runner.py +296 -0
  471. qmlx_serve-0.11.0/vllm_mlx/domain/__init__.py +1 -0
  472. qmlx_serve-0.11.0/vllm_mlx/domain/events.py +47 -0
  473. qmlx_serve-0.11.0/vllm_mlx/embedding.py +209 -0
  474. qmlx_serve-0.11.0/vllm_mlx/engine/__init__.py +19 -0
  475. qmlx_serve-0.11.0/vllm_mlx/engine/base.py +372 -0
  476. qmlx_serve-0.11.0/vllm_mlx/engine/batched.py +2796 -0
  477. qmlx_serve-0.11.0/vllm_mlx/engine_core.py +1459 -0
  478. qmlx_serve-0.11.0/vllm_mlx/gradio_app.py +405 -0
  479. qmlx_serve-0.11.0/vllm_mlx/honest_metrics.py +262 -0
  480. qmlx_serve-0.11.0/vllm_mlx/jlens.py +484 -0
  481. qmlx_serve-0.11.0/vllm_mlx/kernels/__init__.py +12 -0
  482. qmlx_serve-0.11.0/vllm_mlx/kernels/turboquant_fused.py +290 -0
  483. qmlx_serve-0.11.0/vllm_mlx/kv_cache_dtype.py +367 -0
  484. qmlx_serve-0.11.0/vllm_mlx/launch/__init__.py +45 -0
  485. qmlx_serve-0.11.0/vllm_mlx/launch/_common.py +158 -0
  486. qmlx_serve-0.11.0/vllm_mlx/launch/claude_code.py +131 -0
  487. qmlx_serve-0.11.0/vllm_mlx/launch/cli.py +311 -0
  488. qmlx_serve-0.11.0/vllm_mlx/launch/cline.py +147 -0
  489. qmlx_serve-0.11.0/vllm_mlx/launch/continue_dev.py +121 -0
  490. qmlx_serve-0.11.0/vllm_mlx/launch/cursor.py +116 -0
  491. qmlx_serve-0.11.0/vllm_mlx/mcp/__init__.py +85 -0
  492. qmlx_serve-0.11.0/vllm_mlx/mcp/client.py +328 -0
  493. qmlx_serve-0.11.0/vllm_mlx/mcp/config.py +211 -0
  494. qmlx_serve-0.11.0/vllm_mlx/mcp/executor.py +500 -0
  495. qmlx_serve-0.11.0/vllm_mlx/mcp/manager.py +301 -0
  496. qmlx_serve-0.11.0/vllm_mlx/mcp/security.py +719 -0
  497. qmlx_serve-0.11.0/vllm_mlx/mcp/tools.py +174 -0
  498. qmlx_serve-0.11.0/vllm_mlx/mcp/types.py +194 -0
  499. qmlx_serve-0.11.0/vllm_mlx/memory_cache.py +2999 -0
  500. qmlx_serve-0.11.0/vllm_mlx/middleware/__init__.py +2 -0
  501. qmlx_serve-0.11.0/vllm_mlx/middleware/auth.py +358 -0
  502. qmlx_serve-0.11.0/vllm_mlx/middleware/body_depth.py +452 -0
  503. qmlx_serve-0.11.0/vllm_mlx/middleware/body_size.py +612 -0
  504. qmlx_serve-0.11.0/vllm_mlx/middleware/exception_handlers.py +1202 -0
  505. qmlx_serve-0.11.0/vllm_mlx/middleware/probe_fastpath.py +265 -0
  506. qmlx_serve-0.11.0/vllm_mlx/mllm_batch_generator.py +1298 -0
  507. qmlx_serve-0.11.0/vllm_mlx/mllm_cache.py +461 -0
  508. qmlx_serve-0.11.0/vllm_mlx/mllm_scheduler.py +1821 -0
  509. qmlx_serve-0.11.0/vllm_mlx/model_aliases.py +777 -0
  510. qmlx_serve-0.11.0/vllm_mlx/model_auto_config.py +1376 -0
  511. qmlx_serve-0.11.0/vllm_mlx/model_registry.py +185 -0
  512. qmlx_serve-0.11.0/vllm_mlx/model_runner.py +490 -0
  513. qmlx_serve-0.11.0/vllm_mlx/models/__init__.py +13 -0
  514. qmlx_serve-0.11.0/vllm_mlx/models/deepseek_v4.py +2187 -0
  515. qmlx_serve-0.11.0/vllm_mlx/models/gemma4_text.py +381 -0
  516. qmlx_serve-0.11.0/vllm_mlx/models/gemma4_vendored/__init__.py +88 -0
  517. qmlx_serve-0.11.0/vllm_mlx/models/gemma4_vendored/config.py +145 -0
  518. qmlx_serve-0.11.0/vllm_mlx/models/gemma4_vendored/language.py +916 -0
  519. qmlx_serve-0.11.0/vllm_mlx/models/gemma4_vendored/rope_utils.py +110 -0
  520. qmlx_serve-0.11.0/vllm_mlx/models/hy_v3.py +468 -0
  521. qmlx_serve-0.11.0/vllm_mlx/models/mllm.py +2382 -0
  522. qmlx_serve-0.11.0/vllm_mlx/multimodal_processor.py +457 -0
  523. qmlx_serve-0.11.0/vllm_mlx/optimizations.py +209 -0
  524. qmlx_serve-0.11.0/vllm_mlx/output_collector.py +221 -0
  525. qmlx_serve-0.11.0/vllm_mlx/output_router.py +759 -0
  526. qmlx_serve-0.11.0/vllm_mlx/output_router_harmony.py +662 -0
  527. qmlx_serve-0.11.0/vllm_mlx/paged_cache.py +1344 -0
  528. qmlx_serve-0.11.0/vllm_mlx/patches/__init__.py +1 -0
  529. qmlx_serve-0.11.0/vllm_mlx/patches/deepseek_v32_indexer_gate.py +690 -0
  530. qmlx_serve-0.11.0/vllm_mlx/patches/qwen3_next_mtp.py +342 -0
  531. qmlx_serve-0.11.0/vllm_mlx/pflash.py +373 -0
  532. qmlx_serve-0.11.0/vllm_mlx/plugin.py +155 -0
  533. qmlx_serve-0.11.0/vllm_mlx/positioned_kv_cache.py +434 -0
  534. qmlx_serve-0.11.0/vllm_mlx/prefix_cache.py +1183 -0
  535. qmlx_serve-0.11.0/vllm_mlx/reasoning/__init__.py +126 -0
  536. qmlx_serve-0.11.0/vllm_mlx/reasoning/base.py +359 -0
  537. qmlx_serve-0.11.0/vllm_mlx/reasoning/deepseek_r1_parser.py +284 -0
  538. qmlx_serve-0.11.0/vllm_mlx/reasoning/gpt_oss_parser.py +219 -0
  539. qmlx_serve-0.11.0/vllm_mlx/reasoning/harmony_parser.py +197 -0
  540. qmlx_serve-0.11.0/vllm_mlx/reasoning/harmony_stop.py +182 -0
  541. qmlx_serve-0.11.0/vllm_mlx/reasoning/qwen3_parser.py +459 -0
  542. qmlx_serve-0.11.0/vllm_mlx/reasoning/think_detector.py +119 -0
  543. qmlx_serve-0.11.0/vllm_mlx/reasoning/think_parser.py +1573 -0
  544. qmlx_serve-0.11.0/vllm_mlx/reasoning/ui_tars_parser.py +639 -0
  545. qmlx_serve-0.11.0/vllm_mlx/request.py +335 -0
  546. qmlx_serve-0.11.0/vllm_mlx/routes/__init__.py +10 -0
  547. qmlx_serve-0.11.0/vllm_mlx/routes/anthropic.py +2978 -0
  548. qmlx_serve-0.11.0/vllm_mlx/routes/audio.py +1735 -0
  549. qmlx_serve-0.11.0/vllm_mlx/routes/cache.py +297 -0
  550. qmlx_serve-0.11.0/vllm_mlx/routes/chat.py +5322 -0
  551. qmlx_serve-0.11.0/vllm_mlx/routes/completions.py +891 -0
  552. qmlx_serve-0.11.0/vllm_mlx/routes/embeddings.py +254 -0
  553. qmlx_serve-0.11.0/vllm_mlx/routes/health.py +353 -0
  554. qmlx_serve-0.11.0/vllm_mlx/routes/mcp_routes.py +95 -0
  555. qmlx_serve-0.11.0/vllm_mlx/routes/metrics.py +1839 -0
  556. qmlx_serve-0.11.0/vllm_mlx/routes/models.py +863 -0
  557. qmlx_serve-0.11.0/vllm_mlx/routes/responses.py +3347 -0
  558. qmlx_serve-0.11.0/vllm_mlx/runtime/__init__.py +6 -0
  559. qmlx_serve-0.11.0/vllm_mlx/runtime/cache.py +294 -0
  560. qmlx_serve-0.11.0/vllm_mlx/runtime/diffusion_lane.py +1628 -0
  561. qmlx_serve-0.11.0/vllm_mlx/runtime/disk_kv_checkpoint.py +1871 -0
  562. qmlx_serve-0.11.0/vllm_mlx/runtime/model_registry.py +194 -0
  563. qmlx_serve-0.11.0/vllm_mlx/runtime/radix_index.py +523 -0
  564. qmlx_serve-0.11.0/vllm_mlx/runtime/ubc_evict.py +404 -0
  565. qmlx_serve-0.11.0/vllm_mlx/scheduler.py +6616 -0
  566. qmlx_serve-0.11.0/vllm_mlx/server.py +2300 -0
  567. qmlx_serve-0.11.0/vllm_mlx/service/__init__.py +2 -0
  568. qmlx_serve-0.11.0/vllm_mlx/service/helpers.py +4332 -0
  569. qmlx_serve-0.11.0/vllm_mlx/service/postprocessor.py +3851 -0
  570. qmlx_serve-0.11.0/vllm_mlx/share/__init__.py +4 -0
  571. qmlx_serve-0.11.0/vllm_mlx/share/cli.py +853 -0
  572. qmlx_serve-0.11.0/vllm_mlx/share/warning.py +95 -0
  573. qmlx_serve-0.11.0/vllm_mlx/share/ws_tunnel.py +419 -0
  574. qmlx_serve-0.11.0/vllm_mlx/spec_decode/__init__.py +43 -0
  575. qmlx_serve-0.11.0/vllm_mlx/spec_decode/config.py +270 -0
  576. qmlx_serve-0.11.0/vllm_mlx/spec_decode/dflash/__init__.py +93 -0
  577. qmlx_serve-0.11.0/vllm_mlx/spec_decode/dflash/accept_counter.py +204 -0
  578. qmlx_serve-0.11.0/vllm_mlx/spec_decode/dflash/detect.py +177 -0
  579. qmlx_serve-0.11.0/vllm_mlx/spec_decode/dflash/drafter.py +571 -0
  580. qmlx_serve-0.11.0/vllm_mlx/spec_decode/dflash/drafter_registry.py +159 -0
  581. qmlx_serve-0.11.0/vllm_mlx/spec_decode/dflash/generator.py +250 -0
  582. qmlx_serve-0.11.0/vllm_mlx/spec_decode/dflash/verifier.py +392 -0
  583. qmlx_serve-0.11.0/vllm_mlx/spec_decode/mtp/__init__.py +87 -0
  584. qmlx_serve-0.11.0/vllm_mlx/spec_decode/mtp/accept_counter.py +231 -0
  585. qmlx_serve-0.11.0/vllm_mlx/spec_decode/mtp/cache_patch.py +387 -0
  586. qmlx_serve-0.11.0/vllm_mlx/spec_decode/mtp/detect.py +213 -0
  587. qmlx_serve-0.11.0/vllm_mlx/spec_decode/mtp/dispatch.py +198 -0
  588. qmlx_serve-0.11.0/vllm_mlx/spec_decode/mtp/draft_k_controller_v2.py +715 -0
  589. qmlx_serve-0.11.0/vllm_mlx/spec_decode/mtp/gemma4_inject.py +1464 -0
  590. qmlx_serve-0.11.0/vllm_mlx/spec_decode/mtp/generator.py +944 -0
  591. qmlx_serve-0.11.0/vllm_mlx/spec_decode/mtp/head.py +165 -0
  592. qmlx_serve-0.11.0/vllm_mlx/spec_decode/mtp/qwen3_5_inject.py +601 -0
  593. qmlx_serve-0.11.0/vllm_mlx/spec_decode/registry.py +101 -0
  594. qmlx_serve-0.11.0/vllm_mlx/speculative/__init__.py +8 -0
  595. qmlx_serve-0.11.0/vllm_mlx/speculative/ddtree/__init__.py +14 -0
  596. qmlx_serve-0.11.0/vllm_mlx/speculative/ddtree/eligibility.py +119 -0
  597. qmlx_serve-0.11.0/vllm_mlx/speculative/ddtree/runtime.py +256 -0
  598. qmlx_serve-0.11.0/vllm_mlx/speculative/ddtree/server.py +577 -0
  599. qmlx_serve-0.11.0/vllm_mlx/speculative/dflash/__init__.py +24 -0
  600. qmlx_serve-0.11.0/vllm_mlx/speculative/dflash/eligibility.py +162 -0
  601. qmlx_serve-0.11.0/vllm_mlx/speculative/dflash/runtime.py +86 -0
  602. qmlx_serve-0.11.0/vllm_mlx/speculative/dflash/server.py +744 -0
  603. qmlx_serve-0.11.0/vllm_mlx/speculative/prompt_lookup.py +324 -0
  604. qmlx_serve-0.11.0/vllm_mlx/speculative/suffix_decoding.py +296 -0
  605. qmlx_serve-0.11.0/vllm_mlx/telemetry/__init__.py +46 -0
  606. qmlx_serve-0.11.0/vllm_mlx/telemetry/consent.py +219 -0
  607. qmlx_serve-0.11.0/vllm_mlx/telemetry/emit.py +525 -0
  608. qmlx_serve-0.11.0/vllm_mlx/telemetry/queue.py +244 -0
  609. qmlx_serve-0.11.0/vllm_mlx/telemetry/redact.py +260 -0
  610. qmlx_serve-0.11.0/vllm_mlx/telemetry/schema.py +160 -0
  611. qmlx_serve-0.11.0/vllm_mlx/telemetry/state.py +254 -0
  612. qmlx_serve-0.11.0/vllm_mlx/telemetry/transport.py +304 -0
  613. qmlx_serve-0.11.0/vllm_mlx/text_model_from_vlm.py +169 -0
  614. qmlx_serve-0.11.0/vllm_mlx/tool_parsers/__init__.py +79 -0
  615. qmlx_serve-0.11.0/vllm_mlx/tool_parsers/abstract_tool_parser.py +479 -0
  616. qmlx_serve-0.11.0/vllm_mlx/tool_parsers/auto_tool_parser.py +361 -0
  617. qmlx_serve-0.11.0/vllm_mlx/tool_parsers/deepseek_tool_parser.py +177 -0
  618. qmlx_serve-0.11.0/vllm_mlx/tool_parsers/deepseek_v3_tool_parser.py +366 -0
  619. qmlx_serve-0.11.0/vllm_mlx/tool_parsers/deepseekv31_tool_parser.py +428 -0
  620. qmlx_serve-0.11.0/vllm_mlx/tool_parsers/harmony_tool_parser.py +358 -0
  621. qmlx_serve-0.11.0/vllm_mlx/tool_parsers/hermes_tool_parser.py +637 -0
  622. qmlx_serve-0.11.0/vllm_mlx/tool_parsers/qwen3coder_tool_parser.py +825 -0
  623. qmlx_serve-0.11.0/vllm_mlx/tool_parsers/qwen_tool_parser.py +190 -0
  624. qmlx_serve-0.11.0/vllm_mlx/tool_parsers/ui_tars_tool_parser.py +1610 -0
  625. qmlx_serve-0.11.0/vllm_mlx/turboquant.py +1206 -0
  626. qmlx_serve-0.11.0/vllm_mlx/utils/__init__.py +6 -0
  627. qmlx_serve-0.11.0/vllm_mlx/utils/chat_template.py +1084 -0
  628. qmlx_serve-0.11.0/vllm_mlx/utils/chat_templates.py +225 -0
  629. qmlx_serve-0.11.0/vllm_mlx/utils/decode.py +83 -0
  630. qmlx_serve-0.11.0/vllm_mlx/utils/generation_config.py +229 -0
  631. qmlx_serve-0.11.0/vllm_mlx/utils/json_depth.py +131 -0
  632. qmlx_serve-0.11.0/vllm_mlx/utils/mamba_cache.py +230 -0
  633. qmlx_serve-0.11.0/vllm_mlx/utils/tokenizer.py +1038 -0
  634. qmlx_serve-0.11.0/vllm_mlx/vision_embedding_cache.py +411 -0
  635. qmlx_serve-0.11.0/vllm_mlx/vllm_platform.py +360 -0
  636. qmlx_serve-0.11.0/vllm_mlx/worker.py +266 -0
@@ -0,0 +1,29 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andryo Marzuki
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ This licence covers the original contributions made in qMLX. qMLX is a fork
26
+ of Rapid-MLX and incorporates substantial code licensed under the Apache
27
+ License, Version 2.0. That code remains under Apache-2.0; see LICENSE-APACHE
28
+ for the full text and NOTICE for attribution. The effective licence of the
29
+ combined work is MIT AND Apache-2.0.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,23 @@
1
+ qMLX
2
+ Copyright (c) 2026 Andryo Marzuki
3
+
4
+ This product is a fork of Rapid-MLX
5
+ (https://github.com/raullenchai/Rapid-MLX), developed by raullenchai and the
6
+ Rapid-MLX contributors and licensed under the Apache License, Version 2.0.
7
+ The upstream Apache-2.0 licence text is retained in full in LICENSE-APACHE.
8
+ Upstream code incorporated in this repository remains licensed under
9
+ Apache-2.0.
10
+
11
+ Files in this repository have been modified relative to the upstream
12
+ Rapid-MLX source. Per section 4(b) of the Apache License, Version 2.0, this
13
+ notice records that changes have been made; the complete per-file change
14
+ history is available in this repository's git log.
15
+
16
+ Portions of this software are derived from or vendored from Apple's mlx-lm
17
+ project (https://github.com/ml-explore/mlx-lm), Copyright (c) Apple Inc.,
18
+ licensed under the MIT License. Original copyright headers are retained in
19
+ the affected files (for example vllm_mlx/models/deepseek_v4.py and
20
+ vllm_mlx/models/hy_v3.py).
21
+
22
+ Original contributions made in qMLX are licensed under the MIT License; see
23
+ LICENSE. The effective licence of the combined work is MIT AND Apache-2.0.
@@ -0,0 +1,184 @@
1
+ Metadata-Version: 2.4
2
+ Name: qmlx-serve
3
+ Version: 0.11.0
4
+ Summary: Disk KV restore for hybrid MoE models on Apple Silicon. A Qwen-specialised fork of Rapid-MLX that keeps a 122B model warm on a Mac.
5
+ Author: Andryo Marzuki, Rapid-MLX contributors
6
+ License: MIT AND Apache-2.0
7
+ Project-URL: Homepage, https://qmlx.mrzk.io
8
+ Project-URL: Documentation, https://github.com/marzukia/qMLX#readme
9
+ Project-URL: Repository, https://github.com/marzukia/qMLX
10
+ Keywords: llm,mlx,apple-silicon,inference,transformers
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ License-File: LICENSE-APACHE
27
+ License-File: NOTICE
28
+ Requires-Dist: mlx>=0.31.2
29
+ Requires-Dist: mlx-lm>=0.31.3
30
+ Requires-Dist: transformers<5.13,>=5.0.0
31
+ Requires-Dist: tokenizers>=0.19.0
32
+ Requires-Dist: huggingface-hub>=0.23.0
33
+ Requires-Dist: numpy>=1.24.0
34
+ Requires-Dist: tqdm>=4.66.0
35
+ Requires-Dist: pyyaml>=6.0
36
+ Requires-Dist: requests>=2.28.0
37
+ Requires-Dist: tabulate>=0.9.0
38
+ Requires-Dist: psutil>=5.9.0
39
+ Requires-Dist: fastapi>=0.100.0
40
+ Requires-Dist: uvicorn>=0.23.0
41
+ Requires-Dist: mcp>=1.0.0
42
+ Requires-Dist: jsonschema>=4.0.0
43
+ Requires-Dist: argcomplete>=3.6
44
+ Requires-Dist: websockets>=12.0
45
+ Requires-Dist: openai-harmony>=0.0.8
46
+ Provides-Extra: vision
47
+ Requires-Dist: mlx-vlm>=0.6.3; extra == "vision"
48
+ Requires-Dist: opencv-python>=4.8.0; extra == "vision"
49
+ Requires-Dist: torch>=2.3.0; extra == "vision"
50
+ Requires-Dist: torchvision>=0.18.0; extra == "vision"
51
+ Requires-Dist: pillow>=10.0.0; extra == "vision"
52
+ Provides-Extra: dflash
53
+ Requires-Dist: mlx-vlm>=0.6.3; extra == "dflash"
54
+ Provides-Extra: mtp
55
+ Requires-Dist: pillow>=10.0.0; extra == "mtp"
56
+ Provides-Extra: embeddings
57
+ Requires-Dist: mlx-embeddings>=0.1.0; extra == "embeddings"
58
+ Provides-Extra: mirror
59
+ Requires-Dist: boto3>=1.34.0; extra == "mirror"
60
+ Provides-Extra: chat
61
+ Requires-Dist: gradio>=4.0.0; extra == "chat"
62
+ Requires-Dist: pytz>=2024.1; extra == "chat"
63
+ Provides-Extra: all
64
+ Requires-Dist: mlx-vlm>=0.6.3; extra == "all"
65
+ Requires-Dist: opencv-python>=4.8.0; extra == "all"
66
+ Requires-Dist: torch>=2.3.0; extra == "all"
67
+ Requires-Dist: torchvision>=0.18.0; extra == "all"
68
+ Requires-Dist: pillow>=10.0.0; extra == "all"
69
+ Requires-Dist: gradio>=4.0.0; extra == "all"
70
+ Requires-Dist: pytz>=2024.1; extra == "all"
71
+ Requires-Dist: mlx-embeddings>=0.1.0; extra == "all"
72
+ Provides-Extra: test
73
+ Requires-Dist: pytest>=7.0.0; extra == "test"
74
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
75
+ Requires-Dist: prometheus_client>=0.16.0; extra == "test"
76
+ Requires-Dist: tomli>=2.0.1; python_version < "3.11" and extra == "test"
77
+ Requires-Dist: aiohttp>=3.9.0; extra == "test"
78
+ Requires-Dist: pillow>=10.0.0; extra == "test"
79
+ Requires-Dist: mlx-vlm>=0.6.3; platform_system == "Darwin" and extra == "test"
80
+ Requires-Dist: mlx-audio<0.4.4,>=0.2.9; platform_system == "Darwin" and extra == "test"
81
+ Provides-Extra: dev
82
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
83
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
84
+ Requires-Dist: prometheus_client>=0.16.0; extra == "dev"
85
+ Requires-Dist: tomli>=2.0.1; python_version < "3.11" and extra == "dev"
86
+ Requires-Dist: aiohttp>=3.9.0; extra == "dev"
87
+ Requires-Dist: pillow>=10.0.0; extra == "dev"
88
+ Requires-Dist: mlx-vlm>=0.6.3; platform_system == "Darwin" and extra == "dev"
89
+ Requires-Dist: mlx-audio<0.4.4,>=0.2.9; platform_system == "Darwin" and extra == "dev"
90
+ Requires-Dist: black>=23.0.0; extra == "dev"
91
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
92
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
93
+ Provides-Extra: vllm
94
+ Requires-Dist: vllm>=0.4.0; extra == "vllm"
95
+ Provides-Extra: guided
96
+ Requires-Dist: outlines[mlxlm]>=1.0.0; extra == "guided"
97
+ Provides-Extra: audio
98
+ Requires-Dist: mlx-audio<0.4.4,>=0.2.9; extra == "audio"
99
+ Requires-Dist: sounddevice>=0.4.0; extra == "audio"
100
+ Requires-Dist: soundfile>=0.12.0; extra == "audio"
101
+ Requires-Dist: scipy>=1.10.0; extra == "audio"
102
+ Requires-Dist: numba>=0.57.0; extra == "audio"
103
+ Requires-Dist: tiktoken>=0.5.0; extra == "audio"
104
+ Requires-Dist: misaki[ja,zh]>=0.5.0; extra == "audio"
105
+ Requires-Dist: spacy>=3.7.0; extra == "audio"
106
+ Requires-Dist: num2words>=0.5.0; extra == "audio"
107
+ Requires-Dist: loguru>=0.7.0; extra == "audio"
108
+ Requires-Dist: espeakng-loader>=0.2.0; extra == "audio"
109
+ Requires-Dist: phonemizer-fork>=3.3.0; extra == "audio"
110
+ Requires-Dist: ordered_set>=4.1.0; extra == "audio"
111
+ Requires-Dist: cn2an>=0.5.0; extra == "audio"
112
+ Requires-Dist: fugashi>=1.3.0; extra == "audio"
113
+ Requires-Dist: unidic-lite>=1.0.0; extra == "audio"
114
+ Requires-Dist: jieba>=0.42.0; extra == "audio"
115
+ Dynamic: license-file
116
+
117
+ <div align="center">
118
+
119
+ [![qMLX](assets/qmlx-light.png#gh-light-mode-only)](https://qmlx.mrzk.io)
120
+ [![qMLX](assets/qmlx-dark.png#gh-dark-mode-only)](https://qmlx.mrzk.io)
121
+
122
+ </div>
123
+
124
+ <p align="center">
125
+ <strong>Keeping a hybrid 122B warm on a Mac.</strong>
126
+ <br>
127
+ <em>A Qwen-specialised fork of <a href="https://github.com/raullenchai/Rapid-MLX">Rapid-MLX</a> for long-context serving of hybrid MoE models on Apple Silicon.</em>
128
+ </p>
129
+
130
+ <p align="center">
131
+ <a href="https://qmlx.mrzk.io">Website</a> &middot;
132
+ <a href="https://github.com/marzukia/qMLX#readme">Docs</a> &middot;
133
+ <a href="https://charted.mrzk.io">charted</a>
134
+ </p>
135
+
136
+ ---
137
+
138
+ ## Why this exists
139
+
140
+ Qwen3.5-122B-A10B is a hybrid: about 75% of its layers are DeltaNet (recurrent, linear-attention) and 25% are full attention. The recurrent state cannot be rewound to an earlier position, so the standard in-memory prefix cache drops every entry that contains those layers. On this model it misses 100% of the time. In a normal window we measured zero in-memory hits against 109 disk hits.
141
+
142
+ So the only thing that keeps the model warm is disk KV restore: checkpoint the attention KV to SSD, page it back on the next turn. It is not a fallback here, it is the entire cache. qMLX is that subsystem built properly, plus the fixes needed to make it hold on real agentic-coding traffic.
143
+
144
+ The result: a follow-up question on a 130,000-token conversation goes from a multi-minute cold prefill to a sub-second restore. Measured on an M3 Ultra, a repeated 32k prompt drops from 88 seconds of prefill to 0.64 seconds, 137x faster.
145
+
146
+ ## What is in it
147
+
148
+ - **Disk KV checkpoint and restore** for hybrid recurrent + attention MoE caches, with int4 checkpoints dequantised on restore.
149
+ - **Matchable-aware disk-cap eviction** so the checkpoint the next turn needs never gets evicted by unmatchable interval writes.
150
+ - **Honest, phase-split metrics**: real decode tok/s (decode window only), real prefill throughput (excludes cached tokens), disk-restore hit rate, TTFT. No amortised (prompt+gen)/wall throughput lie.
151
+ - **Live divergence logging** that pinpoints the exact token where a prefix-cache match broke, so this class of bug is diagnosable in minutes.
152
+
153
+ ## Status
154
+
155
+ Alpha. It runs one model (Qwen3.5-122B-A10B) on one class of machine (M3 Ultra, 96GB+ unified). Qwen-first, and honest about what is built and what is not. Decode slows gradually with context because the dense-attention layers re-read a growing KV each token, but there is no cliff: it stays usable well past 100k tokens on this hardware. Windowed attention to flatten that curve further is on the roadmap.
156
+
157
+ ## Install
158
+
159
+ From source (this is a fork, not published to PyPI under its own name):
160
+
161
+ ```sh
162
+ git clone https://github.com/marzukia/qMLX.git
163
+ cd qMLX
164
+ pip install -e .
165
+ ```
166
+
167
+ ## Serving
168
+
169
+ ```sh
170
+ rapid-mlx serve mlx-community/Qwen3.5-122B-A10B-4bit \
171
+ --text-only --host 0.0.0.0 --port 8095 --max-num-seqs 1 \
172
+ --enable-prefix-cache --prefix-cache-index radix \
173
+ --enable-disk-kv-restore --kv-disk-checkpoint-interval 256
174
+ ```
175
+
176
+ Drop-in OpenAI / Anthropic API, same as upstream. `--text-only` is required: the vision path is incompatible with the hybrid continuous-batching that the cache work depends on.
177
+
178
+ ## Credit
179
+
180
+ Forked from [raullenchai/Rapid-MLX](https://github.com/raullenchai/Rapid-MLX). The base engine, the OpenAI/Anthropic API surface, and the MLX serving path are theirs. qMLX adds the hybrid-aware disk restore, the eviction and metrics work, and the Qwen specialisation. We went a different direction on hybrid attention, too fundamental to reconcile in a PR, hence the fork.
181
+
182
+ ## Notes
183
+
184
+ The package is still imported as `vllm_mlx` and the CLI is still `rapid-mlx`; those are kept as functional identifiers for compatibility. `rapid_mlx_*` metric names, `RAPID_MLX_*` env vars, and the `~/.cache/rapid-mlx/` cache path are unchanged for the same reason.
@@ -0,0 +1,68 @@
1
+ <div align="center">
2
+
3
+ [![qMLX](assets/qmlx-light.png#gh-light-mode-only)](https://qmlx.mrzk.io)
4
+ [![qMLX](assets/qmlx-dark.png#gh-dark-mode-only)](https://qmlx.mrzk.io)
5
+
6
+ </div>
7
+
8
+ <p align="center">
9
+ <strong>Keeping a hybrid 122B warm on a Mac.</strong>
10
+ <br>
11
+ <em>A Qwen-specialised fork of <a href="https://github.com/raullenchai/Rapid-MLX">Rapid-MLX</a> for long-context serving of hybrid MoE models on Apple Silicon.</em>
12
+ </p>
13
+
14
+ <p align="center">
15
+ <a href="https://qmlx.mrzk.io">Website</a> &middot;
16
+ <a href="https://github.com/marzukia/qMLX#readme">Docs</a> &middot;
17
+ <a href="https://charted.mrzk.io">charted</a>
18
+ </p>
19
+
20
+ ---
21
+
22
+ ## Why this exists
23
+
24
+ Qwen3.5-122B-A10B is a hybrid: about 75% of its layers are DeltaNet (recurrent, linear-attention) and 25% are full attention. The recurrent state cannot be rewound to an earlier position, so the standard in-memory prefix cache drops every entry that contains those layers. On this model it misses 100% of the time. In a normal window we measured zero in-memory hits against 109 disk hits.
25
+
26
+ So the only thing that keeps the model warm is disk KV restore: checkpoint the attention KV to SSD, page it back on the next turn. It is not a fallback here, it is the entire cache. qMLX is that subsystem built properly, plus the fixes needed to make it hold on real agentic-coding traffic.
27
+
28
+ The result: a follow-up question on a 130,000-token conversation goes from a multi-minute cold prefill to a sub-second restore. Measured on an M3 Ultra, a repeated 32k prompt drops from 88 seconds of prefill to 0.64 seconds, 137x faster.
29
+
30
+ ## What is in it
31
+
32
+ - **Disk KV checkpoint and restore** for hybrid recurrent + attention MoE caches, with int4 checkpoints dequantised on restore.
33
+ - **Matchable-aware disk-cap eviction** so the checkpoint the next turn needs never gets evicted by unmatchable interval writes.
34
+ - **Honest, phase-split metrics**: real decode tok/s (decode window only), real prefill throughput (excludes cached tokens), disk-restore hit rate, TTFT. No amortised (prompt+gen)/wall throughput lie.
35
+ - **Live divergence logging** that pinpoints the exact token where a prefix-cache match broke, so this class of bug is diagnosable in minutes.
36
+
37
+ ## Status
38
+
39
+ Alpha. It runs one model (Qwen3.5-122B-A10B) on one class of machine (M3 Ultra, 96GB+ unified). Qwen-first, and honest about what is built and what is not. Decode slows gradually with context because the dense-attention layers re-read a growing KV each token, but there is no cliff: it stays usable well past 100k tokens on this hardware. Windowed attention to flatten that curve further is on the roadmap.
40
+
41
+ ## Install
42
+
43
+ From source (this is a fork, not published to PyPI under its own name):
44
+
45
+ ```sh
46
+ git clone https://github.com/marzukia/qMLX.git
47
+ cd qMLX
48
+ pip install -e .
49
+ ```
50
+
51
+ ## Serving
52
+
53
+ ```sh
54
+ rapid-mlx serve mlx-community/Qwen3.5-122B-A10B-4bit \
55
+ --text-only --host 0.0.0.0 --port 8095 --max-num-seqs 1 \
56
+ --enable-prefix-cache --prefix-cache-index radix \
57
+ --enable-disk-kv-restore --kv-disk-checkpoint-interval 256
58
+ ```
59
+
60
+ Drop-in OpenAI / Anthropic API, same as upstream. `--text-only` is required: the vision path is incompatible with the hybrid continuous-batching that the cache work depends on.
61
+
62
+ ## Credit
63
+
64
+ Forked from [raullenchai/Rapid-MLX](https://github.com/raullenchai/Rapid-MLX). The base engine, the OpenAI/Anthropic API surface, and the MLX serving path are theirs. qMLX adds the hybrid-aware disk restore, the eviction and metrics work, and the Qwen specialisation. We went a different direction on hybrid attention, too fundamental to reconcile in a PR, hence the fork.
65
+
66
+ ## Notes
67
+
68
+ The package is still imported as `vllm_mlx` and the CLI is still `rapid-mlx`; those are kept as functional identifiers for compatibility. `rapid_mlx_*` metric names, `RAPID_MLX_*` env vars, and the `~/.cache/rapid-mlx/` cache path are unchanged for the same reason.