fusion-mlx 0.7.3__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.
- fusion_mlx/__init__.py +81 -0
- fusion_mlx/__main__.py +5 -0
- fusion_mlx/_cli_base.py +686 -0
- fusion_mlx/_completion.py +133 -0
- fusion_mlx/_download_gate.py +18 -0
- fusion_mlx/_mirror.py +1645 -0
- fusion_mlx/_mlx_compat.py +128 -0
- fusion_mlx/_parent_watchdog.py +244 -0
- fusion_mlx/_seeded_sampler.py +357 -0
- fusion_mlx/_signal_observability.py +151 -0
- fusion_mlx/_tempfile_safe.py +144 -0
- fusion_mlx/_torch_stub.py +934 -0
- fusion_mlx/_version.py +1 -0
- fusion_mlx/_version_check.py +18 -0
- fusion_mlx/adapter/__init__.py +1 -0
- fusion_mlx/adapter/gemma4.py +5 -0
- fusion_mlx/adapter/harmony.py +5 -0
- fusion_mlx/admin/__init__.py +5 -0
- fusion_mlx/admin/accuracy_bench.py +201 -0
- fusion_mlx/admin/accuracy_benchmark.py +68 -0
- fusion_mlx/admin/auth.py +213 -0
- fusion_mlx/admin/auth_routes.py +261 -0
- fusion_mlx/admin/bench.py +263 -0
- fusion_mlx/admin/benchmark.py +994 -0
- fusion_mlx/admin/canvas_routes.py +123 -0
- fusion_mlx/admin/fine_tune_route.py +309 -0
- fusion_mlx/admin/grammar_route.py +105 -0
- fusion_mlx/admin/helpers.py +913 -0
- fusion_mlx/admin/hf_download.py +419 -0
- fusion_mlx/admin/hf_downloader.py +1046 -0
- fusion_mlx/admin/hf_upload.py +117 -0
- fusion_mlx/admin/hf_uploader.py +557 -0
- fusion_mlx/admin/html_routes.py +121 -0
- fusion_mlx/admin/i18n/en.json +803 -0
- fusion_mlx/admin/i18n/es.json +771 -0
- fusion_mlx/admin/i18n/fr.json +771 -0
- fusion_mlx/admin/i18n/ja.json +771 -0
- fusion_mlx/admin/i18n/ko.json +771 -0
- fusion_mlx/admin/i18n/pt-BR.json +771 -0
- fusion_mlx/admin/i18n/ru.json +771 -0
- fusion_mlx/admin/i18n/zh-TW.json +771 -0
- fusion_mlx/admin/i18n/zh.json +803 -0
- fusion_mlx/admin/logs.py +167 -0
- fusion_mlx/admin/migrate_route.py +387 -0
- fusion_mlx/admin/model_manager_route.py +189 -0
- fusion_mlx/admin/models.py +313 -0
- fusion_mlx/admin/models_route.py +987 -0
- fusion_mlx/admin/ms_download.py +223 -0
- fusion_mlx/admin/ms_downloader.py +1095 -0
- fusion_mlx/admin/oq.py +259 -0
- fusion_mlx/admin/oq_manager.py +692 -0
- fusion_mlx/admin/preset.py +166 -0
- fusion_mlx/admin/profile.py +240 -0
- fusion_mlx/admin/routes.py +145 -0
- fusion_mlx/admin/settings.py +1241 -0
- fusion_mlx/admin/static/css/dashboard.css +238 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_AMS-Regular.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Main-Bold.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Main-Bold.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Main-Italic.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Main-Italic.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Main-Regular.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Main-Regular.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Math-Italic.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Math-Italic.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Script-Regular.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Script-Regular.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Size1-Regular.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Size2-Regular.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Size3-Regular.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Size4-Regular.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- fusion_mlx/admin/static/css/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- fusion_mlx/admin/static/css/hljs-github-dark.min.css +10 -0
- fusion_mlx/admin/static/css/hljs-github.min.css +10 -0
- fusion_mlx/admin/static/css/katex.min.css +1 -0
- fusion_mlx/admin/static/css/tailwind.css +1 -0
- fusion_mlx/admin/static/favicon.svg +30 -0
- fusion_mlx/admin/static/fonts/inter/inter-latin-300-normal.woff2 +0 -0
- fusion_mlx/admin/static/fonts/inter/inter-latin-400-normal.woff2 +0 -0
- fusion_mlx/admin/static/fonts/inter/inter-latin-500-normal.woff2 +0 -0
- fusion_mlx/admin/static/fonts/inter/inter-latin-600-normal.woff2 +0 -0
- fusion_mlx/admin/static/fonts/inter/inter-latin-700-normal.woff2 +0 -0
- fusion_mlx/admin/static/fonts/inter/inter-latin-800-normal.woff2 +0 -0
- fusion_mlx/admin/static/fonts/inter/inter.css +65 -0
- fusion_mlx/admin/static/fonts/noto-sans-jp/NotoSansJP-Bold.woff2 +0 -0
- fusion_mlx/admin/static/fonts/noto-sans-jp/NotoSansJP-Medium.woff2 +0 -0
- fusion_mlx/admin/static/fonts/noto-sans-jp/NotoSansJP-Regular.woff2 +0 -0
- fusion_mlx/admin/static/fonts/noto-sans-jp/noto-sans-jp.css +22 -0
- fusion_mlx/admin/static/fonts/noto-sans-kr/NotoSansKR-Bold.woff2 +0 -0
- fusion_mlx/admin/static/fonts/noto-sans-kr/NotoSansKR-Medium.woff2 +0 -0
- fusion_mlx/admin/static/fonts/noto-sans-kr/NotoSansKR-Regular.woff2 +0 -0
- fusion_mlx/admin/static/fonts/noto-sans-kr/noto-sans-kr.css +22 -0
- fusion_mlx/admin/static/fonts/noto-sans-sc/NotoSansSC-Bold.woff2 +0 -0
- fusion_mlx/admin/static/fonts/noto-sans-sc/NotoSansSC-Medium.woff2 +0 -0
- fusion_mlx/admin/static/fonts/noto-sans-sc/NotoSansSC-Regular.woff2 +0 -0
- fusion_mlx/admin/static/fonts/noto-sans-sc/noto-sans-sc.css +22 -0
- fusion_mlx/admin/static/fonts/noto-sans-tc/NotoSansTC-Bold.woff2 +0 -0
- fusion_mlx/admin/static/fonts/noto-sans-tc/NotoSansTC-Medium.woff2 +0 -0
- fusion_mlx/admin/static/fonts/noto-sans-tc/NotoSansTC-Regular.woff2 +0 -0
- fusion_mlx/admin/static/fonts/noto-sans-tc/noto-sans-tc.css +22 -0
- fusion_mlx/admin/static/fusionmlx_preset.json +119 -0
- fusion_mlx/admin/static/img/integrations/claude.png +0 -0
- fusion_mlx/admin/static/img/integrations/codex.png +0 -0
- fusion_mlx/admin/static/img/integrations/copilot.svg +22 -0
- fusion_mlx/admin/static/img/integrations/hermes.svg +13 -0
- fusion_mlx/admin/static/img/integrations/openclaw.png +0 -0
- fusion_mlx/admin/static/img/integrations/opencode.png +0 -0
- fusion_mlx/admin/static/img/integrations/pi.svg +29 -0
- fusion_mlx/admin/static/js/alpine.min.js +5 -0
- fusion_mlx/admin/static/js/canvas.js +483 -0
- fusion_mlx/admin/static/js/dashboard.js +5362 -0
- fusion_mlx/admin/static/js/highlight.min.js +1213 -0
- fusion_mlx/admin/static/js/hljs-bash.min.js +20 -0
- fusion_mlx/admin/static/js/hljs-javascript.min.js +80 -0
- fusion_mlx/admin/static/js/hljs-json.min.js +7 -0
- fusion_mlx/admin/static/js/hljs-python.min.js +41 -0
- fusion_mlx/admin/static/js/katex-auto-render.min.js +1 -0
- fusion_mlx/admin/static/js/katex.min.js +1 -0
- fusion_mlx/admin/static/js/lucide.min.js +12 -0
- fusion_mlx/admin/static/js/marked-highlight.umd.js +96 -0
- fusion_mlx/admin/static/js/marked.umd.js +2449 -0
- fusion_mlx/admin/static/js/purify.min.js +3 -0
- fusion_mlx/admin/static/logo-dark.svg +36 -0
- fusion_mlx/admin/static/logo-light.svg +24 -0
- fusion_mlx/admin/static/menubar-filled.svg +25 -0
- fusion_mlx/admin/static/menubar-outline.svg +31 -0
- fusion_mlx/admin/static/navbar-logo-dark.svg +25 -0
- fusion_mlx/admin/static/navbar-logo-light.svg +19 -0
- fusion_mlx/admin/stats.py +1046 -0
- fusion_mlx/admin/subkey.py +102 -0
- fusion_mlx/admin/templates/base.html +168 -0
- fusion_mlx/admin/templates/canvas.html +192 -0
- fusion_mlx/admin/templates/chat.html +6146 -0
- fusion_mlx/admin/templates/dashboard/_bench.html +488 -0
- fusion_mlx/admin/templates/dashboard/_bench_accuracy.html +326 -0
- fusion_mlx/admin/templates/dashboard/_fine_tune.html +274 -0
- fusion_mlx/admin/templates/dashboard/_logs.html +117 -0
- fusion_mlx/admin/templates/dashboard/_modal_model_settings.html +1023 -0
- fusion_mlx/admin/templates/dashboard/_models.html +2067 -0
- fusion_mlx/admin/templates/dashboard/_navbar.html +392 -0
- fusion_mlx/admin/templates/dashboard/_settings.html +1315 -0
- fusion_mlx/admin/templates/dashboard/_status.html +971 -0
- fusion_mlx/admin/templates/dashboard.html +99 -0
- fusion_mlx/admin/templates/login.html +328 -0
- fusion_mlx/admin/update_check.py +107 -0
- fusion_mlx/agents/__init__.py +13 -0
- fusion_mlx/agents/adapter.py +18 -0
- fusion_mlx/agents/testing.py +15 -0
- fusion_mlx/aliases.json +727 -0
- fusion_mlx/api/__init__.py +231 -0
- fusion_mlx/api/_anthropic_helpers.py +302 -0
- fusion_mlx/api/_guards.py +97 -0
- fusion_mlx/api/_url_safety.py +136 -0
- fusion_mlx/api/adapters/__init__.py +38 -0
- fusion_mlx/api/adapters/anthropic.py +227 -0
- fusion_mlx/api/adapters/base.py +207 -0
- fusion_mlx/api/adapters/openai.py +254 -0
- fusion_mlx/api/adapters/sse_formatter.py +106 -0
- fusion_mlx/api/agent_routes.py +326 -0
- fusion_mlx/api/analyze_routes.py +261 -0
- fusion_mlx/api/anthropic_adapter.py +413 -0
- fusion_mlx/api/anthropic_models.py +386 -0
- fusion_mlx/api/anthropic_routes.py +876 -0
- fusion_mlx/api/anthropic_utils.py +1223 -0
- fusion_mlx/api/audio_models.py +55 -0
- fusion_mlx/api/audio_routes.py +685 -0
- fusion_mlx/api/bench_routes.py +117 -0
- fusion_mlx/api/constants.py +14 -0
- fusion_mlx/api/context_scaling.py +66 -0
- fusion_mlx/api/convert_models.py +96 -0
- fusion_mlx/api/convert_routes.py +175 -0
- fusion_mlx/api/embedding_models.py +127 -0
- fusion_mlx/api/embedding_utils.py +152 -0
- fusion_mlx/api/embeddings_routes.py +205 -0
- fusion_mlx/api/grammar.py +518 -0
- fusion_mlx/api/guided.py +282 -0
- fusion_mlx/api/harmony_tools.py +109 -0
- fusion_mlx/api/images.py +178 -0
- fusion_mlx/api/layered_quantize_routes.py +222 -0
- fusion_mlx/api/markitdown.py +859 -0
- fusion_mlx/api/markitdown_pdf_fallback.py +261 -0
- fusion_mlx/api/mcp_routes.py +117 -0
- fusion_mlx/api/migration_routes.py +186 -0
- fusion_mlx/api/models.py +857 -0
- fusion_mlx/api/ner_models.py +64 -0
- fusion_mlx/api/ner_routes.py +112 -0
- fusion_mlx/api/ocr_routes.py +225 -0
- fusion_mlx/api/ollama_routes.py +489 -0
- fusion_mlx/api/openai_models.py +568 -0
- fusion_mlx/api/openai_routes.py +1572 -0
- fusion_mlx/api/openclaw_routes.py +524 -0
- fusion_mlx/api/reasoning_routes.py +134 -0
- fusion_mlx/api/recommend_batch_routes.py +191 -0
- fusion_mlx/api/recommend_routes.py +106 -0
- fusion_mlx/api/rerank_models.py +96 -0
- fusion_mlx/api/rerank_routes.py +132 -0
- fusion_mlx/api/response_format_metrics.py +137 -0
- fusion_mlx/api/responses_adapter.py +643 -0
- fusion_mlx/api/responses_models.py +264 -0
- fusion_mlx/api/responses_utils.py +694 -0
- fusion_mlx/api/session_routes.py +131 -0
- fusion_mlx/api/shared_models.py +81 -0
- fusion_mlx/api/spec_routes.py +159 -0
- fusion_mlx/api/streaming.py +200 -0
- fusion_mlx/api/strict_json_schema.py +654 -0
- fusion_mlx/api/thinking.py +397 -0
- fusion_mlx/api/tool_calling.py +1643 -0
- fusion_mlx/api/tool_logits.py +448 -0
- fusion_mlx/api/utils.py +1620 -0
- fusion_mlx/api/videos_routes.py +423 -0
- fusion_mlx/audio/__init__.py +21 -0
- fusion_mlx/audio/probe.py +235 -0
- fusion_mlx/audio/processor.py +140 -0
- fusion_mlx/audio/registry.py +119 -0
- fusion_mlx/audio/stt.py +376 -0
- fusion_mlx/audio/tts.py +322 -0
- fusion_mlx/bench/__init__.py +9 -0
- fusion_mlx/bench/tier_runner.py +11 -0
- fusion_mlx/cache/__init__.py +192 -0
- fusion_mlx/cache/_rotating_subclass.py +42 -0
- fusion_mlx/cache/boundary_snapshot_store.py +1453 -0
- fusion_mlx/cache/factory.py +252 -0
- fusion_mlx/cache/hybrid_cache.py +344 -0
- fusion_mlx/cache/interface.py +45 -0
- fusion_mlx/cache/latent_cache.py +136 -0
- fusion_mlx/cache/mllm_cache.py +500 -0
- fusion_mlx/cache/observability.py +147 -0
- fusion_mlx/cache/paged_cache.py +1817 -0
- fusion_mlx/cache/paged_ssd_cache.py +2087 -0
- fusion_mlx/cache/prefix_cache.py +2858 -0
- fusion_mlx/cache/protocol.py +169 -0
- fusion_mlx/cache/radix_diffusion_cache.py +349 -0
- fusion_mlx/cache/recovery.py +128 -0
- fusion_mlx/cache/response_cache.py +282 -0
- fusion_mlx/cache/stats.py +161 -0
- fusion_mlx/cache/tiered_cache.py +279 -0
- fusion_mlx/cache/type_handlers.py +1391 -0
- fusion_mlx/cache/type_registry.py +243 -0
- fusion_mlx/cache/vision_embedding_cache.py +411 -0
- fusion_mlx/cache/vision_feature_cache.py +512 -0
- fusion_mlx/cli.py +2100 -0
- fusion_mlx/cli_commands.py +2410 -0
- fusion_mlx/cli_convert.py +150 -0
- fusion_mlx/cli_lifecycle.py +141 -0
- fusion_mlx/cli_serve.py +2858 -0
- fusion_mlx/cluster/__init__.py +0 -0
- fusion_mlx/cluster/mdns.py +121 -0
- fusion_mlx/community_bench/__init__.py +2 -0
- fusion_mlx/community_bench/hardware.py +18 -0
- fusion_mlx/community_bench/runner.py +14 -0
- fusion_mlx/community_bench/submission.py +18 -0
- fusion_mlx/compatibility.py +181 -0
- fusion_mlx/config.py +388 -0
- fusion_mlx/custom_kernels/__init__.py +10 -0
- fusion_mlx/custom_kernels/flash_kda/__init__.py +74 -0
- fusion_mlx/custom_kernels/flash_kda/metal_kernels.py +88 -0
- fusion_mlx/custom_kernels/flash_kda/reference.py +126 -0
- fusion_mlx/custom_kernels/fp8_linear.py +162 -0
- fusion_mlx/custom_kernels/glm_moe_dsa/__init__.py +5 -0
- fusion_mlx/custom_kernels/glm_moe_dsa/fast.py +258 -0
- fusion_mlx/custom_kernels/mfa/__init__.py +111 -0
- fusion_mlx/custom_kernels/mfa/attention.py +283 -0
- fusion_mlx/custom_kernels/mfa/compile_metallib.py +158 -0
- fusion_mlx/custom_kernels/mfa/dispatch_policy.py +251 -0
- fusion_mlx/custom_kernels/mfa/distributed/__init__.py +129 -0
- fusion_mlx/custom_kernels/mfa/fp8_linear.py +177 -0
- fusion_mlx/custom_kernels/mfa/kv_cache.py +222 -0
- fusion_mlx/custom_kernels/mfa/masks.py +111 -0
- fusion_mlx/custom_kernels/mfa/quantize.py +208 -0
- fusion_mlx/custom_kernels/mfa/sparse_video_attention.py +198 -0
- fusion_mlx/custom_kernels/mfa/turboquant.py +141 -0
- fusion_mlx/custom_kernels/mfa/video_attention.py +253 -0
- fusion_mlx/custom_kernels/mfa_bridge.py +248 -0
- fusion_mlx/custom_kernels/nvfp4.py +179 -0
- fusion_mlx/custom_kernels/phase_c/__init__.py +113 -0
- fusion_mlx/custom_kernels/phase_c/glm_moe_ffn.py +82 -0
- fusion_mlx/custom_kernels/phase_c/w4a8_dispatch.py +50 -0
- fusion_mlx/custom_kernels/quantize.py +69 -0
- fusion_mlx/custom_kernels/xfuser_attention.py +465 -0
- fusion_mlx/dispatch/__init__.py +30 -0
- fusion_mlx/dispatch/cloud_router.py +252 -0
- fusion_mlx/dispatch/router.py +194 -0
- fusion_mlx/dispatch/smart_router.py +828 -0
- fusion_mlx/doctor/__init__.py +53 -0
- fusion_mlx/doctor/cli.py +104 -0
- fusion_mlx/doctor/env_health.py +864 -0
- fusion_mlx/doctor/runner.py +296 -0
- fusion_mlx/domain/__init__.py +4 -0
- fusion_mlx/domain/events.py +18 -0
- fusion_mlx/embedding.py +12 -0
- fusion_mlx/engine/__init__.py +13 -0
- fusion_mlx/engine/audio_utils.py +71 -0
- fusion_mlx/engine/base.py +347 -0
- fusion_mlx/engine/batched/__init__.py +357 -0
- fusion_mlx/engine/batched/_mtp_dispatch.py +167 -0
- fusion_mlx/engine/dflash.py +10 -0
- fusion_mlx/engine/vlm.py +10 -0
- fusion_mlx/engine_core.py +1204 -0
- fusion_mlx/engine_pool.py +10 -0
- fusion_mlx/engines/__init__.py +34 -0
- fusion_mlx/engines/_progress.py +45 -0
- fusion_mlx/engines/audio_utils.py +62 -0
- fusion_mlx/engines/base.py +449 -0
- fusion_mlx/engines/batched.py +1157 -0
- fusion_mlx/engines/embedding.py +815 -0
- fusion_mlx/engines/image_gen.py +689 -0
- fusion_mlx/engines/ner.py +215 -0
- fusion_mlx/engines/reranker.py +1072 -0
- fusion_mlx/engines/sts.py +259 -0
- fusion_mlx/engines/stt.py +188 -0
- fusion_mlx/engines/tts.py +293 -0
- fusion_mlx/engines/video.py +162 -0
- fusion_mlx/engines/video_backends/__init__.py +136 -0
- fusion_mlx/engines/video_backends/base.py +235 -0
- fusion_mlx/engines/video_backends/cogvideox.py +99 -0
- fusion_mlx/engines/video_backends/cosmos.py +144 -0
- fusion_mlx/engines/video_backends/hunyuanvideo.py +131 -0
- fusion_mlx/engines/video_backends/ltx2.py +203 -0
- fusion_mlx/engines/video_backends/ltx_video_legacy.py +409 -0
- fusion_mlx/engines/video_backends/opensora.py +121 -0
- fusion_mlx/engines/video_backends/skyreels.py +593 -0
- fusion_mlx/engines/video_backends/svd.py +175 -0
- fusion_mlx/engines/video_backends/unimplemented.py +88 -0
- fusion_mlx/engines/video_backends/uniworld.py +7 -0
- fusion_mlx/engines/video_backends/wan2.py +372 -0
- fusion_mlx/engines/vlm.py +1674 -0
- fusion_mlx/eval/__init__.py +64 -0
- fusion_mlx/eval/arc.py +78 -0
- fusion_mlx/eval/base.py +346 -0
- fusion_mlx/eval/bbq.py +86 -0
- fusion_mlx/eval/cmmlu.py +101 -0
- fusion_mlx/eval/datasets.py +88 -0
- fusion_mlx/eval/gsm8k.py +131 -0
- fusion_mlx/eval/hellaswag.py +78 -0
- fusion_mlx/eval/humaneval.py +298 -0
- fusion_mlx/eval/jmmlu.py +80 -0
- fusion_mlx/eval/kmmlu.py +106 -0
- fusion_mlx/eval/livecodebench.py +290 -0
- fusion_mlx/eval/mathqa.py +79 -0
- fusion_mlx/eval/mbpp.py +246 -0
- fusion_mlx/eval/mmlu.py +130 -0
- fusion_mlx/eval/mmlu_pro.py +82 -0
- fusion_mlx/eval/safetybench.py +82 -0
- fusion_mlx/eval/truthfulqa.py +108 -0
- fusion_mlx/eval/winogrande.py +77 -0
- fusion_mlx/exceptions.py +638 -0
- fusion_mlx/gui_compat/__init__.py +14 -0
- fusion_mlx/gui_compat/app_main.py +158 -0
- fusion_mlx/gui_compat/audio_manager.py +109 -0
- fusion_mlx/gui_compat/cli.py +449 -0
- fusion_mlx/gui_compat/database.py +302 -0
- fusion_mlx/gui_compat/download_progress.py +272 -0
- fusion_mlx/gui_compat/huggingface_integration.py +1415 -0
- fusion_mlx/gui_compat/inference_queue_manager.py +752 -0
- fusion_mlx/gui_compat/mlx_integration.py +2005 -0
- fusion_mlx/gui_compat/model_manager.py +715 -0
- fusion_mlx/gui_compat/models.py +297 -0
- fusion_mlx/gui_compat/queued_inference.py +564 -0
- fusion_mlx/gui_compat/server.py +964 -0
- fusion_mlx/gui_compat/system_monitor.py +264 -0
- fusion_mlx/gui_compat/templates/admin.html +1803 -0
- fusion_mlx/gui_compat/tray.py +589 -0
- fusion_mlx/hardware/__init__.py +5 -0
- fusion_mlx/hardware/apple.py +89 -0
- fusion_mlx/hardware/cpu.py +33 -0
- fusion_mlx/hardware/detector.py +38 -0
- fusion_mlx/hardware/memory.py +38 -0
- fusion_mlx/hardware/types.py +26 -0
- fusion_mlx/integrations/__init__.py +52 -0
- fusion_mlx/integrations/base.py +246 -0
- fusion_mlx/integrations/claude.py +75 -0
- fusion_mlx/integrations/codex.py +131 -0
- fusion_mlx/integrations/comfyui.py +526 -0
- fusion_mlx/integrations/copilot.py +61 -0
- fusion_mlx/integrations/factory_droid.py +54 -0
- fusion_mlx/integrations/hermes.py +172 -0
- fusion_mlx/integrations/kilo_code.py +56 -0
- fusion_mlx/integrations/kimi_code.py +56 -0
- fusion_mlx/integrations/openclaw.py +225 -0
- fusion_mlx/integrations/opencode.py +103 -0
- fusion_mlx/integrations/openhands.py +56 -0
- fusion_mlx/integrations/pi.py +113 -0
- fusion_mlx/integrations/pydantic_ai.py +68 -0
- fusion_mlx/integrations/qwen_code.py +56 -0
- fusion_mlx/integrations/smolagents.py +69 -0
- fusion_mlx/kernels/__init__.py +2 -0
- fusion_mlx/kernels/turboquant_fused.py +222 -0
- fusion_mlx/kv_cache_dtype.py +367 -0
- fusion_mlx/launch/__init__.py +44 -0
- fusion_mlx/launch/_common.py +158 -0
- fusion_mlx/launch/claude_code.py +131 -0
- fusion_mlx/launch/cli.py +311 -0
- fusion_mlx/launch/cline.py +147 -0
- fusion_mlx/launch/codex.py +89 -0
- fusion_mlx/launch/continue_dev.py +121 -0
- fusion_mlx/launch/cursor.py +116 -0
- fusion_mlx/launch/factory_droid.py +23 -0
- fusion_mlx/launch/hermes.py +84 -0
- fusion_mlx/launch/kilo_code.py +23 -0
- fusion_mlx/launch/kimi_code.py +23 -0
- fusion_mlx/launch/opencode.py +66 -0
- fusion_mlx/launch/openhands.py +23 -0
- fusion_mlx/launch/pydantic_ai.py +42 -0
- fusion_mlx/launch/qwen_code.py +23 -0
- fusion_mlx/launch/smolagents.py +42 -0
- fusion_mlx/logging_config.py +236 -0
- fusion_mlx/mcp/__init__.py +85 -0
- fusion_mlx/mcp/client.py +401 -0
- fusion_mlx/mcp/config.py +245 -0
- fusion_mlx/mcp/executor.py +500 -0
- fusion_mlx/mcp/manager.py +301 -0
- fusion_mlx/mcp/security.py +730 -0
- fusion_mlx/mcp/tools.py +174 -0
- fusion_mlx/mcp/types.py +201 -0
- fusion_mlx/memory_cache.py +1635 -0
- fusion_mlx/memory_monitor.py +964 -0
- fusion_mlx/middleware/__init__.py +49 -0
- fusion_mlx/middleware/auth.py +396 -0
- fusion_mlx/middleware/body_depth.py +274 -0
- fusion_mlx/middleware/body_size.py +359 -0
- fusion_mlx/middleware/exception_handlers.py +652 -0
- fusion_mlx/middleware/probe_fastpath.py +121 -0
- fusion_mlx/middleware/request_id.py +63 -0
- fusion_mlx/middleware/route_guard.py +155 -0
- fusion_mlx/migrate/__init__.py +2 -0
- fusion_mlx/migrate/analyzer.py +159 -0
- fusion_mlx/migrate/architectures.py +264 -0
- fusion_mlx/migrate/codegen.py +254 -0
- fusion_mlx/migrate/converter.py +240 -0
- fusion_mlx/migrate/validator.py +64 -0
- fusion_mlx/migrate/weight_mapper.py +164 -0
- fusion_mlx/model_aliases.py +444 -0
- fusion_mlx/model_auto_config.py +1415 -0
- fusion_mlx/model_discovery.py +9 -0
- fusion_mlx/model_profiles.py +124 -0
- fusion_mlx/model_registry.py +270 -0
- fusion_mlx/model_settings/__init__.py +882 -0
- fusion_mlx/models/__init__.py +1 -0
- fusion_mlx/models/base_model.py +45 -0
- fusion_mlx/models/gemma4_text.py +5 -0
- fusion_mlx/models/mllm.py +20 -0
- fusion_mlx/models/mlx_embeddings_compat.py +73 -0
- fusion_mlx/models/qwen2_embedding.py +235 -0
- fusion_mlx/models/reranker.py +9 -0
- fusion_mlx/models/vlm.py +250 -0
- fusion_mlx/models/xlm_roberta.py +401 -0
- fusion_mlx/multimodal_processor.py +461 -0
- fusion_mlx/mxfp4_moe_guardrail.py +219 -0
- fusion_mlx/optimizations.py +68 -0
- fusion_mlx/oq/__init__.py +107 -0
- fusion_mlx/oq/_core.py +1136 -0
- fusion_mlx/oq/io.py +967 -0
- fusion_mlx/oq/levels.py +371 -0
- fusion_mlx/oq/plan.py +841 -0
- fusion_mlx/oq/streaming.py +1956 -0
- fusion_mlx/oq.py +26 -0
- fusion_mlx/output_collector.py +164 -0
- fusion_mlx/output_router.py +759 -0
- fusion_mlx/output_router_harmony.py +662 -0
- fusion_mlx/parsers/__init__.py +19 -0
- fusion_mlx/parsers/gemma4.py +462 -0
- fusion_mlx/parsers/harmony.py +442 -0
- fusion_mlx/parsers/output_parser.py +657 -0
- fusion_mlx/patches/__init__.py +2 -0
- fusion_mlx/patches/deepseek_v4/__init__.py +196 -0
- fusion_mlx/patches/deepseek_v4/cache_extras.py +669 -0
- fusion_mlx/patches/deepseek_v4/cache_handlers.py +262 -0
- fusion_mlx/patches/deepseek_v4/chat_template_v4.py +417 -0
- fusion_mlx/patches/deepseek_v4/deepseek_v4_model.py +1206 -0
- fusion_mlx/patches/deepseek_v4/generate_patch.py +91 -0
- fusion_mlx/patches/deepseek_v4/hyper_connection.py +284 -0
- fusion_mlx/patches/deepseek_v4/tokenizer_patch.py +270 -0
- fusion_mlx/patches/deepseek_v4/tool_parser_v4.py +121 -0
- fusion_mlx/patches/deepseek_v4/utils_patch.py +271 -0
- fusion_mlx/patches/dflash_lifecycle.py +144 -0
- fusion_mlx/patches/glm_moe_dsa/__init__.py +108 -0
- fusion_mlx/patches/glm_moe_dsa/deepseek_v32.py +1110 -0
- fusion_mlx/patches/glm_moe_dsa/generate_patch.py +291 -0
- fusion_mlx/patches/glm_moe_dsa/glm_moe_dsa_model.py +448 -0
- fusion_mlx/patches/glm_moe_dsa/kernels.py +56 -0
- fusion_mlx/patches/glm_moe_dsa/sparse_mla.py +518 -0
- fusion_mlx/patches/glm_moe_dsa/switch_layers.py +283 -0
- fusion_mlx/patches/index_cache.py +266 -0
- fusion_mlx/patches/llama4_attention.py +123 -0
- fusion_mlx/patches/minimax_m3_sparse_attention.py +212 -0
- fusion_mlx/patches/mlx_audio_compat.py +40 -0
- fusion_mlx/patches/mlx_lm_mtp/__init__.py +112 -0
- fusion_mlx/patches/mlx_lm_mtp/batch_generator.py +1772 -0
- fusion_mlx/patches/mlx_lm_mtp/cache_rollback.py +155 -0
- fusion_mlx/patches/mlx_lm_mtp/deepseek_v4_model.py +557 -0
- fusion_mlx/patches/mlx_lm_mtp/qwen35_model.py +811 -0
- fusion_mlx/patches/mlx_vlm_diffusion.py +65 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/__init__.py +578 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/vendor/__init__.py +2 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/vendor/mlx_vlm/__init__.py +2 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/vendor/mlx_vlm/models/__init__.py +2 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/vendor/mlx_vlm/models/minimax_m3/__init__.py +5 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/vendor/mlx_vlm/models/minimax_m3/minimax_m3.py +132 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/vendor/mlx_vlm/models/minimax_m3_vl/__init__.py +23 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/vendor/mlx_vlm/models/minimax_m3_vl/config.py +316 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/vendor/mlx_vlm/models/minimax_m3_vl/language.py +1794 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/vendor/mlx_vlm/models/minimax_m3_vl/minimax_m3_vl.py +432 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/vendor/mlx_vlm/models/minimax_m3_vl/processing_minimax_m3_vl.py +1078 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/vendor/mlx_vlm/models/minimax_m3_vl/vision.py +276 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/vendor/mlx_vlm/tool_parsers/__init__.py +2 -0
- fusion_mlx/patches/mlx_vlm_minimax_m3_compat/vendor/mlx_vlm/tool_parsers/minimax_m3.py +372 -0
- fusion_mlx/patches/mlx_vlm_mtp/__init__.py +105 -0
- fusion_mlx/patches/mlx_vlm_mtp/qwen35_moe_vlm_model.py +180 -0
- fusion_mlx/patches/mlx_vlm_mtp/qwen35_moe_vlm_runtime.py +509 -0
- fusion_mlx/patches/mlx_vlm_mtp/qwen35_vlm_model.py +144 -0
- fusion_mlx/patches/mlx_vlm_mtp/qwen35_vlm_runtime.py +324 -0
- fusion_mlx/patches/qwen3_6_nested_visual.py +111 -0
- fusion_mlx/patches/specprefill.py +922 -0
- fusion_mlx/patches/step3p7/__init__.py +78 -0
- fusion_mlx/patches/step3p7/step3p7_model.py +73 -0
- fusion_mlx/patches/turboquant_attention.py +170 -0
- fusion_mlx/performance.py +85 -0
- fusion_mlx/pflash.py +373 -0
- fusion_mlx/pool/__init__.py +44 -0
- fusion_mlx/pool/engine/__init__.py +1 -0
- fusion_mlx/pool/engine/dflash.py +33 -0
- fusion_mlx/pool/engine_pool.py +2373 -0
- fusion_mlx/pool/memory_enforcer.py +1423 -0
- fusion_mlx/pool/model_discovery.py +1526 -0
- fusion_mlx/pool/priority_scheduler.py +599 -0
- fusion_mlx/pool/settings.py +16 -0
- fusion_mlx/pool/unified_memory_pool.py +704 -0
- fusion_mlx/prefill_progress.py +141 -0
- fusion_mlx/prefill_transient_tracker.py +93 -0
- fusion_mlx/reasoning/__init__.py +130 -0
- fusion_mlx/reasoning/base.py +359 -0
- fusion_mlx/reasoning/deepseek_r1_parser.py +284 -0
- fusion_mlx/reasoning/gemma4_parser.py +484 -0
- fusion_mlx/reasoning/glm4_parser.py +105 -0
- fusion_mlx/reasoning/gpt_oss_parser.py +219 -0
- fusion_mlx/reasoning/harmony_parser.py +197 -0
- fusion_mlx/reasoning/minimax_parser.py +366 -0
- fusion_mlx/reasoning/qwen3_parser.py +458 -0
- fusion_mlx/reasoning/think_detector.py +119 -0
- fusion_mlx/reasoning/think_parser.py +1573 -0
- fusion_mlx/reasoning/ui_tars_parser.py +637 -0
- fusion_mlx/request.py +237 -0
- fusion_mlx/routes_internal/__init__.py +6 -0
- fusion_mlx/routes_internal/anthropic.py +26 -0
- fusion_mlx/routes_internal/audio.py +104 -0
- fusion_mlx/routes_internal/cache.py +225 -0
- fusion_mlx/routes_internal/chat.py +263 -0
- fusion_mlx/routes_internal/embeddings.py +4 -0
- fusion_mlx/routes_internal/gc.py +124 -0
- fusion_mlx/routes_internal/health.py +126 -0
- fusion_mlx/routes_internal/mcp_routes.py +4 -0
- fusion_mlx/routes_internal/metrics.py +295 -0
- fusion_mlx/routes_internal/models.py +131 -0
- fusion_mlx/routes_internal/responses.py +952 -0
- fusion_mlx/runtime/__init__.py +9 -0
- fusion_mlx/runtime/cache.py +186 -0
- fusion_mlx/runtime/diffusion_lane.py +1637 -0
- fusion_mlx/runtime/disk_kv_checkpoint.py +1027 -0
- fusion_mlx/runtime/model_registry.py +68 -0
- fusion_mlx/runtime/radix_index.py +523 -0
- fusion_mlx/runtime/ubc_evict.py +248 -0
- fusion_mlx/scheduler/__init__.py +35 -0
- fusion_mlx/scheduler/_mtp_vendored.py +831 -0
- fusion_mlx/scheduler/compiled_kv_cache.py +78 -0
- fusion_mlx/scheduler/config.py +39 -0
- fusion_mlx/scheduler/core.py +341 -0
- fusion_mlx/scheduler/helpers.py +277 -0
- fusion_mlx/scheduler/monkeypatches.py +601 -0
- fusion_mlx/scheduler/ngram_spec.py +603 -0
- fusion_mlx/scheduler/sampler_fast_path.py +319 -0
- fusion_mlx/scheduler/sched_admission.py +686 -0
- fusion_mlx/scheduler/sched_batch.py +891 -0
- fusion_mlx/scheduler/sched_boundary.py +895 -0
- fusion_mlx/scheduler/sched_cache.py +813 -0
- fusion_mlx/scheduler/sched_handoff.py +119 -0
- fusion_mlx/scheduler/sched_init.py +535 -0
- fusion_mlx/scheduler/sched_misc.py +602 -0
- fusion_mlx/scheduler/sched_query.py +506 -0
- fusion_mlx/scheduler/sched_response.py +774 -0
- fusion_mlx/scheduler/sched_schedule.py +868 -0
- fusion_mlx/scheduler/sched_specprefill.py +219 -0
- fusion_mlx/scheduler/sched_step.py +877 -0
- fusion_mlx/scheduler/sched_thinking.py +457 -0
- fusion_mlx/scheduler/sched_token.py +465 -0
- fusion_mlx/scheduler/sched_trim.py +255 -0
- fusion_mlx/scheduler/sched_vlm_mtp.py +115 -0
- fusion_mlx/scheduler/sched_vlm_mtp_batched.py +558 -0
- fusion_mlx/scheduler/spec_decode.py +899 -0
- fusion_mlx/scheduler/types.py +237 -0
- fusion_mlx/server.py +1649 -0
- fusion_mlx/server_metrics.py +309 -0
- fusion_mlx/service/__init__.py +88 -0
- fusion_mlx/service/disconnect_guard.py +376 -0
- fusion_mlx/service/helpers.py +1652 -0
- fusion_mlx/service/postprocessor/__init__.py +27 -0
- fusion_mlx/service/postprocessor/core.py +1969 -0
- fusion_mlx/service/postprocessor/formatters.py +948 -0
- fusion_mlx/service/postprocessor/parsers.py +944 -0
- fusion_mlx/sessions/__init__.py +23 -0
- fusion_mlx/sessions/tracker.py +195 -0
- fusion_mlx/settings.py +171 -0
- fusion_mlx/share/__init__.py +4 -0
- fusion_mlx/share/cli.py +510 -0
- fusion_mlx/share/warning.py +68 -0
- fusion_mlx/share/ws_tunnel.py +270 -0
- fusion_mlx/speculative/__init__.py +26 -0
- fusion_mlx/speculative/auto_resolve.py +119 -0
- fusion_mlx/speculative/auto_router.py +293 -0
- fusion_mlx/speculative/config.py +160 -0
- fusion_mlx/speculative/constraints.py +59 -0
- fusion_mlx/speculative/dflash/__init__.py +78 -0
- fusion_mlx/speculative/dflash/accept_counter.py +69 -0
- fusion_mlx/speculative/dflash/detect.py +84 -0
- fusion_mlx/speculative/dflash/drafter.py +231 -0
- fusion_mlx/speculative/dflash/drafter_registry.py +48 -0
- fusion_mlx/speculative/dflash/eligibility.py +164 -0
- fusion_mlx/speculative/dflash/generator.py +117 -0
- fusion_mlx/speculative/dflash/runtime.py +86 -0
- fusion_mlx/speculative/dflash/server.py +740 -0
- fusion_mlx/speculative/dflash/verifier.py +126 -0
- fusion_mlx/speculative/dfly/__init__.py +45 -0
- fusion_mlx/speculative/dfly/accept_counter.py +62 -0
- fusion_mlx/speculative/dfly/drafter.py +259 -0
- fusion_mlx/speculative/dfly/eligibility.py +133 -0
- fusion_mlx/speculative/dfly/runtime.py +21 -0
- fusion_mlx/speculative/draft_model.py +159 -0
- fusion_mlx/speculative/dspark/__init__.py +38 -0
- fusion_mlx/speculative/dspark/eligibility.py +121 -0
- fusion_mlx/speculative/dspark/engine/__init__.py +55 -0
- fusion_mlx/speculative/dspark/engine/adapters.py +600 -0
- fusion_mlx/speculative/dspark/engine/api.py +541 -0
- fusion_mlx/speculative/dspark/engine/benchmark_cli.py +1083 -0
- fusion_mlx/speculative/dspark/engine/chat_cli.py +155 -0
- fusion_mlx/speculative/dspark/engine/cli.py +383 -0
- fusion_mlx/speculative/dspark/engine/convert.py +498 -0
- fusion_mlx/speculative/dspark/engine/draft.py +476 -0
- fusion_mlx/speculative/dspark/engine/heads.py +75 -0
- fusion_mlx/speculative/dspark/engine/history.py +111 -0
- fusion_mlx/speculative/dspark/engine/runtime.py +693 -0
- fusion_mlx/speculative/dspark/engine/sampling.py +207 -0
- fusion_mlx/speculative/dspark/engine/sts.py +401 -0
- fusion_mlx/speculative/dspark/runtime.py +74 -0
- fusion_mlx/speculative/dspark/server.py +667 -0
- fusion_mlx/speculative/eagle3/__init__.py +4 -0
- fusion_mlx/speculative/eagle3/model.py +308 -0
- fusion_mlx/speculative/eagle3/speculator.py +352 -0
- fusion_mlx/speculative/hidden_capture.py +199 -0
- fusion_mlx/speculative/mtp/__init__.py +32 -0
- fusion_mlx/speculative/mtp/accept_counter.py +71 -0
- fusion_mlx/speculative/mtp/cache_patch.py +64 -0
- fusion_mlx/speculative/mtp/detect.py +110 -0
- fusion_mlx/speculative/mtp/dispatch.py +78 -0
- fusion_mlx/speculative/mtp/draft_k_controller_v2.py +320 -0
- fusion_mlx/speculative/mtp/gemma4_inject.py +828 -0
- fusion_mlx/speculative/mtp/generator.py +531 -0
- fusion_mlx/speculative/mtp/head.py +114 -0
- fusion_mlx/speculative/mtp/qwen3_5_inject.py +381 -0
- fusion_mlx/speculative/mtp.py +6 -0
- fusion_mlx/speculative/mtp_generate.py +294 -0
- fusion_mlx/speculative/ngram_predictor.py +210 -0
- fusion_mlx/speculative/per_request_route.py +98 -0
- fusion_mlx/speculative/prompt_lookup.py +328 -0
- fusion_mlx/speculative/registry.py +122 -0
- fusion_mlx/speculative/suffix_decoding.py +296 -0
- fusion_mlx/speculative/vlm_mtp.py +220 -0
- fusion_mlx/telemetry/__init__.py +46 -0
- fusion_mlx/telemetry/consent.py +218 -0
- fusion_mlx/telemetry/emit.py +525 -0
- fusion_mlx/telemetry/queue.py +244 -0
- fusion_mlx/telemetry/redact.py +260 -0
- fusion_mlx/telemetry/schema.py +160 -0
- fusion_mlx/telemetry/state.py +254 -0
- fusion_mlx/telemetry/transport.py +304 -0
- fusion_mlx/tests/regression_fp8_quant.py +510 -0
- fusion_mlx/tool_parsers/__init__.py +104 -0
- fusion_mlx/tool_parsers/abstract_tool_parser.py +473 -0
- fusion_mlx/tool_parsers/auto_tool_parser.py +361 -0
- fusion_mlx/tool_parsers/deepseek_tool_parser.py +177 -0
- fusion_mlx/tool_parsers/deepseek_v3_tool_parser.py +366 -0
- fusion_mlx/tool_parsers/deepseekv31_tool_parser.py +428 -0
- fusion_mlx/tool_parsers/functionary_tool_parser.py +194 -0
- fusion_mlx/tool_parsers/gemma4_tool_parser.py +534 -0
- fusion_mlx/tool_parsers/glm47_tool_parser.py +195 -0
- fusion_mlx/tool_parsers/granite_tool_parser.py +148 -0
- fusion_mlx/tool_parsers/harmony_tool_parser.py +358 -0
- fusion_mlx/tool_parsers/hermes_tool_parser.py +639 -0
- fusion_mlx/tool_parsers/kimi_tool_parser.py +161 -0
- fusion_mlx/tool_parsers/llama_tool_parser.py +744 -0
- fusion_mlx/tool_parsers/minimax_tool_parser.py +245 -0
- fusion_mlx/tool_parsers/mistral_tool_parser.py +561 -0
- fusion_mlx/tool_parsers/nemotron_tool_parser.py +168 -0
- fusion_mlx/tool_parsers/qwen3coder_tool_parser.py +670 -0
- fusion_mlx/tool_parsers/qwen_tool_parser.py +190 -0
- fusion_mlx/tool_parsers/seed_oss_tool_parser.py +542 -0
- fusion_mlx/tool_parsers/ui_tars_tool_parser.py +1610 -0
- fusion_mlx/tool_parsers/xlam_tool_parser.py +179 -0
- fusion_mlx/training/__init__.py +4 -0
- fusion_mlx/training/service.py +729 -0
- fusion_mlx/turboquant.py +107 -0
- fusion_mlx/turboquant_kv.py +524 -0
- fusion_mlx/utils/__init__.py +1 -0
- fusion_mlx/utils/chat_template.py +462 -0
- fusion_mlx/utils/chat_templates.py +217 -0
- fusion_mlx/utils/compile_cache.py +108 -0
- fusion_mlx/utils/decode.py +44 -0
- fusion_mlx/utils/fatal.py +27 -0
- fusion_mlx/utils/formatting.py +12 -0
- fusion_mlx/utils/generation_config.py +131 -0
- fusion_mlx/utils/hardware.py +348 -0
- fusion_mlx/utils/image.py +194 -0
- fusion_mlx/utils/install.py +116 -0
- fusion_mlx/utils/json_depth.py +72 -0
- fusion_mlx/utils/mamba_cache.py +139 -0
- fusion_mlx/utils/model_loading.py +164 -0
- fusion_mlx/utils/proc_memory.py +118 -0
- fusion_mlx/utils/psutil_compat.py +209 -0
- fusion_mlx/utils/release_check.py +28 -0
- fusion_mlx/utils/sampling.py +191 -0
- fusion_mlx/utils/tokenizer.py +762 -0
- fusion_mlx/utils/video.py +558 -0
- fusion_mlx/video/__init__.py +20 -0
- fusion_mlx/video/adapters/__init__.py +67 -0
- fusion_mlx/video/adapters/animatediff.py +318 -0
- fusion_mlx/video/adapters/controlnet.py +933 -0
- fusion_mlx/video/adapters/ip_adapter.py +632 -0
- fusion_mlx/video/cogvideox/__init__.py +1 -0
- fusion_mlx/video/cogvideox/config.py +112 -0
- fusion_mlx/video/cogvideox/convert.py +201 -0
- fusion_mlx/video/cogvideox/generate.py +314 -0
- fusion_mlx/video/cogvideox/rope.py +76 -0
- fusion_mlx/video/cogvideox/scheduler.py +57 -0
- fusion_mlx/video/cogvideox/text_encoder.py +20 -0
- fusion_mlx/video/cogvideox/transformer.py +386 -0
- fusion_mlx/video/cogvideox/utils.py +109 -0
- fusion_mlx/video/cogvideox/vae.py +252 -0
- fusion_mlx/video/cosmos/__init__.py +6 -0
- fusion_mlx/video/cosmos/dit.py +674 -0
- fusion_mlx/video/cosmos/generate.py +252 -0
- fusion_mlx/video/cosmos/scheduler.py +110 -0
- fusion_mlx/video/cosmos/text_encoder.py +343 -0
- fusion_mlx/video/cosmos/vae.py +444 -0
- fusion_mlx/video/hunyuanvideo/__init__.py +3 -0
- fusion_mlx/video/hunyuanvideo/dit.py +559 -0
- fusion_mlx/video/hunyuanvideo/generate.py +290 -0
- fusion_mlx/video/hunyuanvideo/scheduler.py +85 -0
- fusion_mlx/video/hunyuanvideo/text_encoder.py +360 -0
- fusion_mlx/video/hunyuanvideo/vae.py +594 -0
- fusion_mlx/video/latentsync_mlx/__init__.py +12 -0
- fusion_mlx/video/latentsync_mlx/attention.py +155 -0
- fusion_mlx/video/latentsync_mlx/convert_weights.py +170 -0
- fusion_mlx/video/latentsync_mlx/motion_module.py +167 -0
- fusion_mlx/video/latentsync_mlx/pipeline.py +513 -0
- fusion_mlx/video/latentsync_mlx/resnet.py +131 -0
- fusion_mlx/video/latentsync_mlx/sampler.py +81 -0
- fusion_mlx/video/latentsync_mlx/unet.py +509 -0
- fusion_mlx/video/latentsync_mlx/vae.py +222 -0
- fusion_mlx/video/ltx2/__init__.py +23 -0
- fusion_mlx/video/ltx2/adaln.py +164 -0
- fusion_mlx/video/ltx2/attention.py +162 -0
- fusion_mlx/video/ltx2/audio.py +77 -0
- fusion_mlx/video/ltx2/audio_vae/__init__.py +45 -0
- fusion_mlx/video/ltx2/audio_vae/attention.py +71 -0
- fusion_mlx/video/ltx2/audio_vae/audio_processor.py +86 -0
- fusion_mlx/video/ltx2/audio_vae/audio_vae.py +473 -0
- fusion_mlx/video/ltx2/audio_vae/causal_conv_2d.py +107 -0
- fusion_mlx/video/ltx2/audio_vae/downsample.py +96 -0
- fusion_mlx/video/ltx2/audio_vae/normalization.py +36 -0
- fusion_mlx/video/ltx2/audio_vae/ops.py +61 -0
- fusion_mlx/video/ltx2/audio_vae/resnet.py +168 -0
- fusion_mlx/video/ltx2/audio_vae/upsample.py +100 -0
- fusion_mlx/video/ltx2/audio_vae/vocoder.py +580 -0
- fusion_mlx/video/ltx2/conditioning.py +134 -0
- fusion_mlx/video/ltx2/config.py +349 -0
- fusion_mlx/video/ltx2/denoise.py +976 -0
- fusion_mlx/video/ltx2/feed_forward.py +38 -0
- fusion_mlx/video/ltx2/generate.py +1957 -0
- fusion_mlx/video/ltx2/guidance.py +40 -0
- fusion_mlx/video/ltx2/lora.py +126 -0
- fusion_mlx/video/ltx2/ltx2_model.py +718 -0
- fusion_mlx/video/ltx2/positions.py +89 -0
- fusion_mlx/video/ltx2/rope.py +355 -0
- fusion_mlx/video/ltx2/samplers.py +104 -0
- fusion_mlx/video/ltx2/scheduler.py +55 -0
- fusion_mlx/video/ltx2/text_encoder.py +1023 -0
- fusion_mlx/video/ltx2/text_projection.py +26 -0
- fusion_mlx/video/ltx2/transformer.py +396 -0
- fusion_mlx/video/ltx2/upsampler.py +385 -0
- fusion_mlx/video/ltx2/utils.py +261 -0
- fusion_mlx/video/ltx2/video_vae/__init__.py +4 -0
- fusion_mlx/video/ltx2/video_vae/convolution.py +246 -0
- fusion_mlx/video/ltx2/video_vae/decoder.py +620 -0
- fusion_mlx/video/ltx2/video_vae/encoder.py +23 -0
- fusion_mlx/video/ltx2/video_vae/ops.py +56 -0
- fusion_mlx/video/ltx2/video_vae/resnet.py +157 -0
- fusion_mlx/video/ltx2/video_vae/sampling.py +207 -0
- fusion_mlx/video/ltx2/video_vae/tiling.py +481 -0
- fusion_mlx/video/ltx2/video_vae/video_vae.py +542 -0
- fusion_mlx/video/ltx_video_legacy/__init__.py +6 -0
- fusion_mlx/video/ltx_video_legacy/denoise.py +151 -0
- fusion_mlx/video/ltx_video_legacy/scheduler.py +103 -0
- fusion_mlx/video/ltx_video_legacy/transformer.py +573 -0
- fusion_mlx/video/ltx_video_legacy/vae.py +796 -0
- fusion_mlx/video/mage/__init__.py +5 -0
- fusion_mlx/video/mage/config.py +35 -0
- fusion_mlx/video/mage/layers.py +245 -0
- fusion_mlx/video/mage/pipeline.py +167 -0
- fusion_mlx/video/mage/scheduler.py +43 -0
- fusion_mlx/video/mage/transformer.py +90 -0
- fusion_mlx/video/mage/vae.py +82 -0
- fusion_mlx/video/musetalk_mlx/__init__.py +6 -0
- fusion_mlx/video/musetalk_mlx/config.py +70 -0
- fusion_mlx/video/musetalk_mlx/models/__init__.py +0 -0
- fusion_mlx/video/musetalk_mlx/models/unet.py +358 -0
- fusion_mlx/video/musetalk_mlx/models/vae.py +233 -0
- fusion_mlx/video/musetalk_mlx/pipeline_mlx.py +176 -0
- fusion_mlx/video/musetalk_mlx/utils/__init__.py +0 -0
- fusion_mlx/video/musetalk_mlx/utils/weights.py +105 -0
- fusion_mlx/video/musetalk_mlx/whisper/__init__.py +0 -0
- fusion_mlx/video/musetalk_mlx/whisper/audio2feature.py +61 -0
- fusion_mlx/video/musetalk_mlx/whisper/log_mel.py +76 -0
- fusion_mlx/video/musetalk_mlx/whisper/whisper_encoder.py +86 -0
- fusion_mlx/video/opensora/__init__.py +2 -0
- fusion_mlx/video/opensora/config.py +52 -0
- fusion_mlx/video/opensora/convert.py +151 -0
- fusion_mlx/video/opensora/generate.py +227 -0
- fusion_mlx/video/opensora/rope.py +60 -0
- fusion_mlx/video/opensora/scheduler.py +90 -0
- fusion_mlx/video/opensora/text_encoder.py +61 -0
- fusion_mlx/video/opensora/transformer.py +418 -0
- fusion_mlx/video/pulid_mlx/__init__.py +17 -0
- fusion_mlx/video/pulid_mlx/attention.py +176 -0
- fusion_mlx/video/pulid_mlx/convert_weights.py +221 -0
- fusion_mlx/video/pulid_mlx/encoders.py +189 -0
- fusion_mlx/video/pulid_mlx/eva_clip.py +398 -0
- fusion_mlx/video/pulid_mlx/pipeline.py +231 -0
- fusion_mlx/video/skyreels_v3/__init__.py +27 -0
- fusion_mlx/video/skyreels_v3/_device.py +182 -0
- fusion_mlx/video/skyreels_v3/attention.py +561 -0
- fusion_mlx/video/skyreels_v3/blocks.py +550 -0
- fusion_mlx/video/skyreels_v3/common.py +456 -0
- fusion_mlx/video/skyreels_v3/config.py +152 -0
- fusion_mlx/video/skyreels_v3/convert_skyreels_v3.py +544 -0
- fusion_mlx/video/skyreels_v3/dit_base.py +225 -0
- fusion_mlx/video/skyreels_v3/generate.py +284 -0
- fusion_mlx/video/skyreels_v3/kv_cache.py +352 -0
- fusion_mlx/video/skyreels_v3/m5_optimizer.py +328 -0
- fusion_mlx/video/skyreels_v3/pipelines/__init__.py +1627 -0
- fusion_mlx/video/skyreels_v3/scheduler/__init__.py +16 -0
- fusion_mlx/video/skyreels_v3/scheduler/fm_solvers_unipc.py +421 -0
- fusion_mlx/video/skyreels_v3/speculative_denoise.py +395 -0
- fusion_mlx/video/skyreels_v3/step_strategy.py +300 -0
- fusion_mlx/video/skyreels_v3/temporal_flicker_fix.py +469 -0
- fusion_mlx/video/skyreels_v3/text_encoder.py +472 -0
- fusion_mlx/video/skyreels_v3/transformer_a2v.py +193 -0
- fusion_mlx/video/skyreels_v3/transformer_r2v.py +137 -0
- fusion_mlx/video/skyreels_v3/transformer_v2v.py +163 -0
- fusion_mlx/video/skyreels_v3/utils/__init__.py +2 -0
- fusion_mlx/video/skyreels_v3/vae.py +343 -0
- fusion_mlx/video/skyreels_v3/weights.py +654 -0
- fusion_mlx/video/svd/__init__.py +4 -0
- fusion_mlx/video/svd/clip_vision.py +231 -0
- fusion_mlx/video/svd/generate.py +180 -0
- fusion_mlx/video/svd/scheduler.py +111 -0
- fusion_mlx/video/svd/unet.py +727 -0
- fusion_mlx/video/svd/vae.py +256 -0
- fusion_mlx/video/t5_encoder.py +407 -0
- fusion_mlx/video/uniworld/__init__.py +21 -0
- fusion_mlx/video/uniworld/backend.py +506 -0
- fusion_mlx/video/uniworld/config.py +114 -0
- fusion_mlx/video/uniworld/feature_merge.py +216 -0
- fusion_mlx/video/uniworld/projectors.py +160 -0
- fusion_mlx/video/uniworld/siglip2.py +226 -0
- fusion_mlx/video/uniworld/weight_converter.py +177 -0
- fusion_mlx/video/wan2/__init__.py +7 -0
- fusion_mlx/video/wan2/attention.py +248 -0
- fusion_mlx/video/wan2/camera_adapter.py +73 -0
- fusion_mlx/video/wan2/config.py +174 -0
- fusion_mlx/video/wan2/convert.py +71 -0
- fusion_mlx/video/wan2/generate.py +1427 -0
- fusion_mlx/video/wan2/i2v_utils.py +39 -0
- fusion_mlx/video/wan2/lora/__init__.py +20 -0
- fusion_mlx/video/wan2/lora/apply.py +350 -0
- fusion_mlx/video/wan2/lora/loader.py +95 -0
- fusion_mlx/video/wan2/lora/types.py +42 -0
- fusion_mlx/video/wan2/postprocess.py +34 -0
- fusion_mlx/video/wan2/rope.py +149 -0
- fusion_mlx/video/wan2/scheduler.py +386 -0
- fusion_mlx/video/wan2/text_encoder.py +217 -0
- fusion_mlx/video/wan2/tiling.py +304 -0
- fusion_mlx/video/wan2/transformer.py +100 -0
- fusion_mlx/video/wan2/utils.py +343 -0
- fusion_mlx/video/wan2/vace.py +106 -0
- fusion_mlx/video/wan2/vae.py +550 -0
- fusion_mlx/video/wan2/vae22.py +1060 -0
- fusion_mlx/video/wan2/wan_2.py +525 -0
- fusion_mlx-0.7.3.dist-info/METADATA +1743 -0
- fusion_mlx-0.7.3.dist-info/RECORD +925 -0
- fusion_mlx-0.7.3.dist-info/WHEEL +5 -0
- fusion_mlx-0.7.3.dist-info/entry_points.txt +3 -0
- fusion_mlx-0.7.3.dist-info/licenses/LICENSE +202 -0
- fusion_mlx-0.7.3.dist-info/top_level.txt +1 -0
fusion_mlx/__init__.py
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"""fusion-mlx — unified local model management for Apple Silicon.
|
|
2
|
+
|
|
3
|
+
Merges the best of fusion-mlx (long-context, memory control, multi-model
|
|
4
|
+
concurrency) with Rapid-MLX (speculative decoding, multi-modal,
|
|
5
|
+
cloud routing) into a single codebase.
|
|
6
|
+
|
|
7
|
+
Key features:
|
|
8
|
+
- EnginePool with LRU eviction, pinning, TTL auto-unload
|
|
9
|
+
- 4-tier ProcessMemoryEnforcer (safe/balanced/aggressive/custom)
|
|
10
|
+
- Paged KV cache with SSD cold layer
|
|
11
|
+
- Block-aware prefix cache with copy-on-write
|
|
12
|
+
- Speculative decoding (SuffixDecoding, DFlash, MTP, VLM-MTP)
|
|
13
|
+
- OpenAI/Anthropic/Responses API compatibility
|
|
14
|
+
- Claude Code, OpenClaw, ComfyUI integrations
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from ._version import __version__
|
|
18
|
+
from .config import MemoryConfig, MemoryTier, ServerConfig
|
|
19
|
+
from .dispatch import CloudRouter, RequestRouter
|
|
20
|
+
from .engine_core import AsyncEngineCore, EngineConfig
|
|
21
|
+
from .engines import (
|
|
22
|
+
BaseEngine,
|
|
23
|
+
BaseNonStreamingEngine,
|
|
24
|
+
BatchedEngine,
|
|
25
|
+
EmbeddingEngine,
|
|
26
|
+
GenerationOutput,
|
|
27
|
+
ImageGenEngine,
|
|
28
|
+
RerankerEngine,
|
|
29
|
+
STSEngine,
|
|
30
|
+
STTEngine,
|
|
31
|
+
TTSEngine,
|
|
32
|
+
VLMBatchedEngine,
|
|
33
|
+
)
|
|
34
|
+
from .pool import EnginePool, MemoryProfile, ModelDiscovery, ProcessMemoryEnforcer
|
|
35
|
+
from .request import Request, RequestOutput, RequestStatus, SamplingParams
|
|
36
|
+
from .scheduler import Scheduler, SchedulerConfig, SchedulerOutput, SchedulingPolicy
|
|
37
|
+
from .server import Server, create_app
|
|
38
|
+
|
|
39
|
+
__all__ = [
|
|
40
|
+
# Version
|
|
41
|
+
"__version__",
|
|
42
|
+
# Server
|
|
43
|
+
"Server",
|
|
44
|
+
"create_app",
|
|
45
|
+
"ServerConfig",
|
|
46
|
+
"MemoryConfig",
|
|
47
|
+
"MemoryTier",
|
|
48
|
+
# Scheduler
|
|
49
|
+
"Scheduler",
|
|
50
|
+
"SchedulerConfig",
|
|
51
|
+
"SchedulingPolicy",
|
|
52
|
+
"SchedulerOutput",
|
|
53
|
+
# Engine core
|
|
54
|
+
"AsyncEngineCore",
|
|
55
|
+
"EngineConfig",
|
|
56
|
+
# Request
|
|
57
|
+
"Request",
|
|
58
|
+
"RequestOutput",
|
|
59
|
+
"RequestStatus",
|
|
60
|
+
"SamplingParams",
|
|
61
|
+
# Engines
|
|
62
|
+
"BaseEngine",
|
|
63
|
+
"BaseNonStreamingEngine",
|
|
64
|
+
"GenerationOutput",
|
|
65
|
+
"BatchedEngine",
|
|
66
|
+
"VLMBatchedEngine",
|
|
67
|
+
"EmbeddingEngine",
|
|
68
|
+
"RerankerEngine",
|
|
69
|
+
"STTEngine",
|
|
70
|
+
"TTSEngine",
|
|
71
|
+
"STSEngine",
|
|
72
|
+
"ImageGenEngine",
|
|
73
|
+
# Pool
|
|
74
|
+
"EnginePool",
|
|
75
|
+
"ProcessMemoryEnforcer",
|
|
76
|
+
"MemoryProfile",
|
|
77
|
+
"ModelDiscovery",
|
|
78
|
+
# Router
|
|
79
|
+
"RequestRouter",
|
|
80
|
+
"CloudRouter",
|
|
81
|
+
]
|