distributed-llm 0.4.1__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.
- distributed_llm-0.4.1/LICENSE +97 -0
- distributed_llm-0.4.1/PKG-INFO +315 -0
- distributed_llm-0.4.1/README.md +181 -0
- distributed_llm-0.4.1/pyproject.toml +292 -0
- distributed_llm-0.4.1/setup.cfg +4 -0
- distributed_llm-0.4.1/src/distllm/__init__.py +47 -0
- distributed_llm-0.4.1/src/distllm/api/__init__.py +11 -0
- distributed_llm-0.4.1/src/distllm/api/api_settings.py +126 -0
- distributed_llm-0.4.1/src/distllm/api/api_state.py +85 -0
- distributed_llm-0.4.1/src/distllm/api/api_versioning.py +984 -0
- distributed_llm-0.4.1/src/distllm/api/app_state.py +29 -0
- distributed_llm-0.4.1/src/distllm/api/auth/__init__.py +181 -0
- distributed_llm-0.4.1/src/distllm/api/auth/models.py +37 -0
- distributed_llm-0.4.1/src/distllm/api/auth/oauth2.py +123 -0
- distributed_llm-0.4.1/src/distllm/api/auth/oidc.py +317 -0
- distributed_llm-0.4.1/src/distllm/api/auth/saml.py +107 -0
- distributed_llm-0.4.1/src/distllm/api/auth/store.py +39 -0
- distributed_llm-0.4.1/src/distllm/api/auth_deps.py +68 -0
- distributed_llm-0.4.1/src/distllm/api/authz/__init__.py +30 -0
- distributed_llm-0.4.1/src/distllm/api/authz/opa.py +297 -0
- distributed_llm-0.4.1/src/distllm/api/background_tasks.py +295 -0
- distributed_llm-0.4.1/src/distllm/api/body_cache_middleware.py +117 -0
- distributed_llm-0.4.1/src/distllm/api/circuit_breaker_middleware.py +175 -0
- distributed_llm-0.4.1/src/distllm/api/cost_middleware.py +186 -0
- distributed_llm-0.4.1/src/distllm/api/csrf_middleware.py +196 -0
- distributed_llm-0.4.1/src/distllm/api/dedup.py +180 -0
- distributed_llm-0.4.1/src/distllm/api/errors.py +256 -0
- distributed_llm-0.4.1/src/distllm/api/grpc_bridge.py +296 -0
- distributed_llm-0.4.1/src/distllm/api/ip_utils.py +58 -0
- distributed_llm-0.4.1/src/distllm/api/middleware.py +706 -0
- distributed_llm-0.4.1/src/distllm/api/observability_middleware.py +169 -0
- distributed_llm-0.4.1/src/distllm/api/persistent_store.py +295 -0
- distributed_llm-0.4.1/src/distllm/api/prompt_injection.py +418 -0
- distributed_llm-0.4.1/src/distllm/api/quota_middleware.py +186 -0
- distributed_llm-0.4.1/src/distllm/api/rate_limit_middleware.py +13 -0
- distributed_llm-0.4.1/src/distllm/api/rate_limiter.py +250 -0
- distributed_llm-0.4.1/src/distllm/api/rate_limiter_unified.py +975 -0
- distributed_llm-0.4.1/src/distllm/api/redis_rate_limiter.py +164 -0
- distributed_llm-0.4.1/src/distllm/api/routes/__init__.py +42 -0
- distributed_llm-0.4.1/src/distllm/api/routes/admin.py +599 -0
- distributed_llm-0.4.1/src/distllm/api/routes/api_keys.py +115 -0
- distributed_llm-0.4.1/src/distllm/api/routes/assistants.py +443 -0
- distributed_llm-0.4.1/src/distllm/api/routes/batch.py +1094 -0
- distributed_llm-0.4.1/src/distllm/api/routes/chat.py +875 -0
- distributed_llm-0.4.1/src/distllm/api/routes/completion.py +141 -0
- distributed_llm-0.4.1/src/distllm/api/routes/debug.py +185 -0
- distributed_llm-0.4.1/src/distllm/api/routes/defrag.py +66 -0
- distributed_llm-0.4.1/src/distllm/api/routes/embeddings.py +399 -0
- distributed_llm-0.4.1/src/distllm/api/routes/eval.py +254 -0
- distributed_llm-0.4.1/src/distllm/api/routes/exchange.py +367 -0
- distributed_llm-0.4.1/src/distllm/api/routes/experiments.py +293 -0
- distributed_llm-0.4.1/src/distllm/api/routes/federated.py +155 -0
- distributed_llm-0.4.1/src/distllm/api/routes/files.py +243 -0
- distributed_llm-0.4.1/src/distllm/api/routes/fine_tuning.py +381 -0
- distributed_llm-0.4.1/src/distllm/api/routes/gossip.py +72 -0
- distributed_llm-0.4.1/src/distllm/api/routes/health.py +395 -0
- distributed_llm-0.4.1/src/distllm/api/routes/leaderboard.py +377 -0
- distributed_llm-0.4.1/src/distllm/api/routes/marketplace.py +320 -0
- distributed_llm-0.4.1/src/distllm/api/routes/metrics_history.py +415 -0
- distributed_llm-0.4.1/src/distllm/api/routes/model_registry.py +255 -0
- distributed_llm-0.4.1/src/distllm/api/routes/moderation.py +420 -0
- distributed_llm-0.4.1/src/distllm/api/routes/plugins.py +184 -0
- distributed_llm-0.4.1/src/distllm/api/routes/prompts.py +347 -0
- distributed_llm-0.4.1/src/distllm/api/routes/router_admin.py +187 -0
- distributed_llm-0.4.1/src/distllm/api/routes/scheduler.py +168 -0
- distributed_llm-0.4.1/src/distllm/api/routes/tokenize.py +77 -0
- distributed_llm-0.4.1/src/distllm/api/routes/tools.py +89 -0
- distributed_llm-0.4.1/src/distllm/api/routes/webhooks.py +336 -0
- distributed_llm-0.4.1/src/distllm/api/routes/webrtc.py +194 -0
- distributed_llm-0.4.1/src/distllm/api/semantic_cache.py +337 -0
- distributed_llm-0.4.1/src/distllm/api/server.py +2038 -0
- distributed_llm-0.4.1/src/distllm/api/server_config.py +140 -0
- distributed_llm-0.4.1/src/distllm/api/server_coordinator.py +125 -0
- distributed_llm-0.4.1/src/distllm/api/server_errors.py +79 -0
- distributed_llm-0.4.1/src/distllm/api/server_lifespan.py +184 -0
- distributed_llm-0.4.1/src/distllm/api/server_routes_api.py +456 -0
- distributed_llm-0.4.1/src/distllm/api/server_routes_dashboard.py +246 -0
- distributed_llm-0.4.1/src/distllm/api/server_state.py +29 -0
- distributed_llm-0.4.1/src/distllm/api/services/__init__.py +2 -0
- distributed_llm-0.4.1/src/distllm/api/services/chat_service.py +677 -0
- distributed_llm-0.4.1/src/distllm/api/services/completion_service.py +227 -0
- distributed_llm-0.4.1/src/distllm/api/services/embedding_service.py +451 -0
- distributed_llm-0.4.1/src/distllm/api/services/eval_service.py +198 -0
- distributed_llm-0.4.1/src/distllm/api/sso_auth.py +644 -0
- distributed_llm-0.4.1/src/distllm/api/sso_middleware.py +808 -0
- distributed_llm-0.4.1/src/distllm/api/streaming.py +479 -0
- distributed_llm-0.4.1/src/distllm/api/token_estimator.py +86 -0
- distributed_llm-0.4.1/src/distllm/api/tool_calling.py +240 -0
- distributed_llm-0.4.1/src/distllm/api/tracing_middleware.py +579 -0
- distributed_llm-0.4.1/src/distllm/api/validation.py +58 -0
- distributed_llm-0.4.1/src/distllm/api/waf.py +344 -0
- distributed_llm-0.4.1/src/distllm/api/webhooks/__init__.py +17 -0
- distributed_llm-0.4.1/src/distllm/api/webhooks/delivery.py +452 -0
- distributed_llm-0.4.1/src/distllm/api/ws_chat.py +495 -0
- distributed_llm-0.4.1/src/distllm/backends/__init__.py +121 -0
- distributed_llm-0.4.1/src/distllm/backends/config.py +85 -0
- distributed_llm-0.4.1/src/distllm/backends/exllama_backend.py +229 -0
- distributed_llm-0.4.1/src/distllm/backends/llamacpp_backend.py +266 -0
- distributed_llm-0.4.1/src/distllm/backends/mlx_backend.py +199 -0
- distributed_llm-0.4.1/src/distllm/backends/nim_backend.py +838 -0
- distributed_llm-0.4.1/src/distllm/backends/ollama_backend.py +48 -0
- distributed_llm-0.4.1/src/distllm/backends/onnx_backend.py +239 -0
- distributed_llm-0.4.1/src/distllm/backends/paged_attention.py +547 -0
- distributed_llm-0.4.1/src/distllm/backends/paged_attention_quantized.py +319 -0
- distributed_llm-0.4.1/src/distllm/backends/protocol.py +203 -0
- distributed_llm-0.4.1/src/distllm/backends/pytorch_backend.py +157 -0
- distributed_llm-0.4.1/src/distllm/backends/registry.py +428 -0
- distributed_llm-0.4.1/src/distllm/backends/tensorrt_backend.py +333 -0
- distributed_llm-0.4.1/src/distllm/backends/tgi_backend.py +120 -0
- distributed_llm-0.4.1/src/distllm/backends/triton_backend.py +875 -0
- distributed_llm-0.4.1/src/distllm/backends/vllm_backend.py +489 -0
- distributed_llm-0.4.1/src/distllm/backends/webgpu_backend.py +255 -0
- distributed_llm-0.4.1/src/distllm/benchmarks/__init__.py +10 -0
- distributed_llm-0.4.1/src/distllm/benchmarks/evaluation_harness.py +69 -0
- distributed_llm-0.4.1/src/distllm/benchmarks/scaling.py +298 -0
- distributed_llm-0.4.1/src/distllm/cache/__init__.py +19 -0
- distributed_llm-0.4.1/src/distllm/cache/crdt.py +507 -0
- distributed_llm-0.4.1/src/distllm/cache/cross_cluster_prefix_index.py +709 -0
- distributed_llm-0.4.1/src/distllm/cli/__init__.py +17 -0
- distributed_llm-0.4.1/src/distllm/cli/adapters.py +93 -0
- distributed_llm-0.4.1/src/distllm/cli/autopsy.py +287 -0
- distributed_llm-0.4.1/src/distllm/cli/backup.py +118 -0
- distributed_llm-0.4.1/src/distllm/cli/benchmark.py +241 -0
- distributed_llm-0.4.1/src/distllm/cli/cert.py +86 -0
- distributed_llm-0.4.1/src/distllm/cli/chat.py +79 -0
- distributed_llm-0.4.1/src/distllm/cli/chat_stream.py +494 -0
- distributed_llm-0.4.1/src/distllm/cli/client.py +233 -0
- distributed_llm-0.4.1/src/distllm/cli/cluster.py +405 -0
- distributed_llm-0.4.1/src/distllm/cli/completion.py +79 -0
- distributed_llm-0.4.1/src/distllm/cli/compress.py +98 -0
- distributed_llm-0.4.1/src/distllm/cli/config_commands.py +71 -0
- distributed_llm-0.4.1/src/distllm/cli/cost_avoid.py +168 -0
- distributed_llm-0.4.1/src/distllm/cli/daas_commands.py +123 -0
- distributed_llm-0.4.1/src/distllm/cli/defrag_commands.py +128 -0
- distributed_llm-0.4.1/src/distllm/cli/deploy.py +252 -0
- distributed_llm-0.4.1/src/distllm/cli/doctor.py +688 -0
- distributed_llm-0.4.1/src/distllm/cli/draft_commands.py +82 -0
- distributed_llm-0.4.1/src/distllm/cli/error_handler.py +192 -0
- distributed_llm-0.4.1/src/distllm/cli/eval.py +168 -0
- distributed_llm-0.4.1/src/distllm/cli/federate_commands.py +125 -0
- distributed_llm-0.4.1/src/distllm/cli/install.py +198 -0
- distributed_llm-0.4.1/src/distllm/cli/logs.py +85 -0
- distributed_llm-0.4.1/src/distllm/cli/main.py +1795 -0
- distributed_llm-0.4.1/src/distllm/cli/models.py +74 -0
- distributed_llm-0.4.1/src/distllm/cli/notify.py +91 -0
- distributed_llm-0.4.1/src/distllm/cli/observe.py +314 -0
- distributed_llm-0.4.1/src/distllm/cli/onboard.py +671 -0
- distributed_llm-0.4.1/src/distllm/cli/output.py +437 -0
- distributed_llm-0.4.1/src/distllm/cli/profile.py +152 -0
- distributed_llm-0.4.1/src/distllm/cli/profile_presets.py +129 -0
- distributed_llm-0.4.1/src/distllm/cli/prompts.py +139 -0
- distributed_llm-0.4.1/src/distllm/cli/quota.py +227 -0
- distributed_llm-0.4.1/src/distllm/cli/router.py +131 -0
- distributed_llm-0.4.1/src/distllm/cli/run.py +59 -0
- distributed_llm-0.4.1/src/distllm/cli/setup.py +104 -0
- distributed_llm-0.4.1/src/distllm/cli/setup_wizard.py +191 -0
- distributed_llm-0.4.1/src/distllm/cli/status.py +65 -0
- distributed_llm-0.4.1/src/distllm/cli/system_commands.py +255 -0
- distributed_llm-0.4.1/src/distllm/cli/tune.py +488 -0
- distributed_llm-0.4.1/src/distllm/cli/tutorial.py +128 -0
- distributed_llm-0.4.1/src/distllm/cli/verify.py +37 -0
- distributed_llm-0.4.1/src/distllm/cli/webhook.py +85 -0
- distributed_llm-0.4.1/src/distllm/client/__init__.py +38 -0
- distributed_llm-0.4.1/src/distllm/client/client.py +503 -0
- distributed_llm-0.4.1/src/distllm/cloud/__init__.py +53 -0
- distributed_llm-0.4.1/src/distllm/cloud/aws.py +199 -0
- distributed_llm-0.4.1/src/distllm/cloud/azure.py +179 -0
- distributed_llm-0.4.1/src/distllm/cloud/common.py +217 -0
- distributed_llm-0.4.1/src/distllm/cloud/gcp.py +238 -0
- distributed_llm-0.4.1/src/distllm/cloud/spot_orchestrator.py +1642 -0
- distributed_llm-0.4.1/src/distllm/cloud/worker_agent.py +344 -0
- distributed_llm-0.4.1/src/distllm/compliance/__init__.py +10 -0
- distributed_llm-0.4.1/src/distllm/compliance/evidence_pack.py +699 -0
- distributed_llm-0.4.1/src/distllm/config/__init__.py +81 -0
- distributed_llm-0.4.1/src/distllm/config/_application.py +41 -0
- distributed_llm-0.4.1/src/distllm/config/_backends.py +80 -0
- distributed_llm-0.4.1/src/distllm/config/_cache.py +121 -0
- distributed_llm-0.4.1/src/distllm/config/_deployment.py +95 -0
- distributed_llm-0.4.1/src/distllm/config/_generation.py +36 -0
- distributed_llm-0.4.1/src/distllm/config/_hardware.py +42 -0
- distributed_llm-0.4.1/src/distllm/config/_model.py +270 -0
- distributed_llm-0.4.1/src/distllm/config/_network.py +235 -0
- distributed_llm-0.4.1/src/distllm/config/_observability.py +42 -0
- distributed_llm-0.4.1/src/distllm/config/_parallelism.py +172 -0
- distributed_llm-0.4.1/src/distllm/config/_performance.py +47 -0
- distributed_llm-0.4.1/src/distllm/config/loader.py +168 -0
- distributed_llm-0.4.1/src/distllm/config/model_heuristics.py +169 -0
- distributed_llm-0.4.1/src/distllm/config/profiles.py +168 -0
- distributed_llm-0.4.1/src/distllm/config/reference.py +104 -0
- distributed_llm-0.4.1/src/distllm/config/resolver.py +240 -0
- distributed_llm-0.4.1/src/distllm/config/settings.py +463 -0
- distributed_llm-0.4.1/src/distllm/constants.py +117 -0
- distributed_llm-0.4.1/src/distllm/core/__init__.py +111 -0
- distributed_llm-0.4.1/src/distllm/core/ab_test_coordinator.py +178 -0
- distributed_llm-0.4.1/src/distllm/core/activation_profiler.py +172 -0
- distributed_llm-0.4.1/src/distllm/core/adaptive_batching.py +234 -0
- distributed_llm-0.4.1/src/distllm/core/adaptive_cache_compressor.py +168 -0
- distributed_llm-0.4.1/src/distllm/core/adaptive_compression.py +427 -0
- distributed_llm-0.4.1/src/distllm/core/adaptive_compression_hierarchy.py +402 -0
- distributed_llm-0.4.1/src/distllm/core/advanced_scheduling/__init__.py +39 -0
- distributed_llm-0.4.1/src/distllm/core/advanced_scheduling/cost_aware.py +55 -0
- distributed_llm-0.4.1/src/distllm/core/advanced_scheduling/disaggregated.py +352 -0
- distributed_llm-0.4.1/src/distllm/core/advanced_scheduling/energy.py +58 -0
- distributed_llm-0.4.1/src/distllm/core/advanced_scheduling/federated.py +59 -0
- distributed_llm-0.4.1/src/distllm/core/advanced_scheduling/heterogeneous.py +84 -0
- distributed_llm-0.4.1/src/distllm/core/advanced_scheduling/multi_objective.py +372 -0
- distributed_llm-0.4.1/src/distllm/core/advanced_scheduling/policy.py +95 -0
- distributed_llm-0.4.1/src/distllm/core/advanced_scheduling/predictive.py +47 -0
- distributed_llm-0.4.1/src/distllm/core/advanced_scheduling/preemption.py +43 -0
- distributed_llm-0.4.1/src/distllm/core/advanced_scheduling/tiered_store.py +604 -0
- distributed_llm-0.4.1/src/distllm/core/advanced_scheduling/token_bank.py +62 -0
- distributed_llm-0.4.1/src/distllm/core/advanced_scheduling/wan.py +85 -0
- distributed_llm-0.4.1/src/distllm/core/aegis_compliance.py +890 -0
- distributed_llm-0.4.1/src/distllm/core/aether_federated.py +1326 -0
- distributed_llm-0.4.1/src/distllm/core/agentic_router.py +749 -0
- distributed_llm-0.4.1/src/distllm/core/api_key_store.py +478 -0
- distributed_llm-0.4.1/src/distllm/core/arbitrage_engine.py +613 -0
- distributed_llm-0.4.1/src/distllm/core/aria_autoscaler.py +1339 -0
- distributed_llm-0.4.1/src/distllm/core/async_connection_pool.py +187 -0
- distributed_llm-0.4.1/src/distllm/core/async_pipelined_speculative.py +543 -0
- distributed_llm-0.4.1/src/distllm/core/atlas_mesh.py +1437 -0
- distributed_llm-0.4.1/src/distllm/core/auto_discovery.py +351 -0
- distributed_llm-0.4.1/src/distllm/core/auto_partitioner.py +396 -0
- distributed_llm-0.4.1/src/distllm/core/autonomous_healer.py +466 -0
- distributed_llm-0.4.1/src/distllm/core/autoq.py +1545 -0
- distributed_llm-0.4.1/src/distllm/core/backup_manager.py +344 -0
- distributed_llm-0.4.1/src/distllm/core/bargaining_engine.py +450 -0
- distributed_llm-0.4.1/src/distllm/core/batch_builder.py +480 -0
- distributed_llm-0.4.1/src/distllm/core/batch_scheduler.py +1342 -0
- distributed_llm-0.4.1/src/distllm/core/block_affinity_tracker.py +162 -0
- distributed_llm-0.4.1/src/distllm/core/block_eviction_policy.py +363 -0
- distributed_llm-0.4.1/src/distllm/core/cache_aware_router.py +116 -0
- distributed_llm-0.4.1/src/distllm/core/cache_bench.py +239 -0
- distributed_llm-0.4.1/src/distllm/core/cache_coherence.py +139 -0
- distributed_llm-0.4.1/src/distllm/core/cache_doctor.py +220 -0
- distributed_llm-0.4.1/src/distllm/core/cache_eviction.py +181 -0
- distributed_llm-0.4.1/src/distllm/core/cache_index.py +91 -0
- distributed_llm-0.4.1/src/distllm/core/cache_manager.py +703 -0
- distributed_llm-0.4.1/src/distllm/core/cache_migration.py +134 -0
- distributed_llm-0.4.1/src/distllm/core/cache_persistence.py +200 -0
- distributed_llm-0.4.1/src/distllm/core/cache_query_log.py +195 -0
- distributed_llm-0.4.1/src/distllm/core/cache_snapshot.py +178 -0
- distributed_llm-0.4.1/src/distllm/core/cache_template_warmer.py +112 -0
- distributed_llm-0.4.1/src/distllm/core/cache_warming.py +188 -0
- distributed_llm-0.4.1/src/distllm/core/calibration.py +223 -0
- distributed_llm-0.4.1/src/distllm/core/carbon_migration.py +338 -0
- distributed_llm-0.4.1/src/distllm/core/cert_rotation.py +402 -0
- distributed_llm-0.4.1/src/distllm/core/certificate_manager.py +414 -0
- distributed_llm-0.4.1/src/distllm/core/cluster_manager.py +212 -0
- distributed_llm-0.4.1/src/distllm/core/cluster_predictive_prefetcher.py +239 -0
- distributed_llm-0.4.1/src/distllm/core/cluster_registry.py +227 -0
- distributed_llm-0.4.1/src/distllm/core/cluster_state_store.py +442 -0
- distributed_llm-0.4.1/src/distllm/core/compliance_evidence.py +503 -0
- distributed_llm-0.4.1/src/distllm/core/compressed_speculative.py +399 -0
- distributed_llm-0.4.1/src/distllm/core/connection_pool.py +387 -0
- distributed_llm-0.4.1/src/distllm/core/constrained_decoder.py +678 -0
- distributed_llm-0.4.1/src/distllm/core/coordinator.py +1594 -0
- distributed_llm-0.4.1/src/distllm/core/coordinator_cli.py +130 -0
- distributed_llm-0.4.1/src/distllm/core/coordinator_config.py +203 -0
- distributed_llm-0.4.1/src/distllm/core/coordinator_config_wiring.py +316 -0
- distributed_llm-0.4.1/src/distllm/core/coordinator_election.py +246 -0
- distributed_llm-0.4.1/src/distllm/core/coordinator_failover.py +197 -0
- distributed_llm-0.4.1/src/distllm/core/coordinator_health.py +135 -0
- distributed_llm-0.4.1/src/distllm/core/coordinator_lifecycle.py +272 -0
- distributed_llm-0.4.1/src/distllm/core/coordinator_metrics.py +155 -0
- distributed_llm-0.4.1/src/distllm/core/coordinator_multi_model.py +41 -0
- distributed_llm-0.4.1/src/distllm/core/coordinator_request.py +246 -0
- distributed_llm-0.4.1/src/distllm/core/coordinator_state.py +215 -0
- distributed_llm-0.4.1/src/distllm/core/coordinator_subsystem.py +614 -0
- distributed_llm-0.4.1/src/distllm/core/correctness_cert.py +133 -0
- distributed_llm-0.4.1/src/distllm/core/correctness_harness.py +421 -0
- distributed_llm-0.4.1/src/distllm/core/cortex_multimodel.py +939 -0
- distributed_llm-0.4.1/src/distllm/core/cost_comparison.py +250 -0
- distributed_llm-0.4.1/src/distllm/core/cost_dashboard.py +363 -0
- distributed_llm-0.4.1/src/distllm/core/cost_optimizer.py +317 -0
- distributed_llm-0.4.1/src/distllm/core/cost_tracker.py +569 -0
- distributed_llm-0.4.1/src/distllm/core/cross_cloud_router.py +924 -0
- distributed_llm-0.4.1/src/distllm/core/cross_model_prefix_sharing.py +237 -0
- distributed_llm-0.4.1/src/distllm/core/cuda_graph.py +165 -0
- distributed_llm-0.4.1/src/distllm/core/debug.py +84 -0
- distributed_llm-0.4.1/src/distllm/core/device_registry.py +289 -0
- distributed_llm-0.4.1/src/distllm/core/di.py +153 -0
- distributed_llm-0.4.1/src/distllm/core/differential_privacy.py +183 -0
- distributed_llm-0.4.1/src/distllm/core/distributed_distillation.py +402 -0
- distributed_llm-0.4.1/src/distllm/core/distributed_speculative.py +1563 -0
- distributed_llm-0.4.1/src/distllm/core/dp_inference/__init__.py +657 -0
- distributed_llm-0.4.1/src/distllm/core/dp_inference/accounting.py +144 -0
- distributed_llm-0.4.1/src/distllm/core/dp_inference/config.py +139 -0
- distributed_llm-0.4.1/src/distllm/core/dp_inference/mechanisms.py +137 -0
- distributed_llm-0.4.1/src/distllm/core/dp_inference.py +1016 -0
- distributed_llm-0.4.1/src/distllm/core/draft_model_router.py +435 -0
- distributed_llm-0.4.1/src/distllm/core/draft_quality_scorer.py +157 -0
- distributed_llm-0.4.1/src/distllm/core/draft_tree.py +232 -0
- distributed_llm-0.4.1/src/distllm/core/dynamic_memory_budget.py +179 -0
- distributed_llm-0.4.1/src/distllm/core/dynamic_sharder.py +364 -0
- distributed_llm-0.4.1/src/distllm/core/dynamic_speculation.py +131 -0
- distributed_llm-0.4.1/src/distllm/core/evaluation/__init__.py +57 -0
- distributed_llm-0.4.1/src/distllm/core/evaluation/constants.py +86 -0
- distributed_llm-0.4.1/src/distllm/core/evaluation/db.py +185 -0
- distributed_llm-0.4.1/src/distllm/core/evaluation/formatters.py +82 -0
- distributed_llm-0.4.1/src/distllm/core/evaluation/loaders.py +320 -0
- distributed_llm-0.4.1/src/distllm/core/evaluation/models.py +66 -0
- distributed_llm-0.4.1/src/distllm/core/evaluation/report.py +79 -0
- distributed_llm-0.4.1/src/distllm/core/evaluation/runner.py +518 -0
- distributed_llm-0.4.1/src/distllm/core/evaluation/scorers.py +278 -0
- distributed_llm-0.4.1/src/distllm/core/evaluation/worker.py +123 -0
- distributed_llm-0.4.1/src/distllm/core/evaluation_harness.py +1530 -0
- distributed_llm-0.4.1/src/distllm/core/event_bus.py +516 -0
- distributed_llm-0.4.1/src/distllm/core/faas_7b.py +201 -0
- distributed_llm-0.4.1/src/distllm/core/feature_flags.py +245 -0
- distributed_llm-0.4.1/src/distllm/core/federated_finetuner.py +377 -0
- distributed_llm-0.4.1/src/distllm/core/federated_incentives.py +267 -0
- distributed_llm-0.4.1/src/distllm/core/framework_adapters.py +390 -0
- distributed_llm-0.4.1/src/distllm/core/gaia_cache.py +1330 -0
- distributed_llm-0.4.1/src/distllm/core/gossip_cache_bridge.py +202 -0
- distributed_llm-0.4.1/src/distllm/core/gpu_power_manager.py +173 -0
- distributed_llm-0.4.1/src/distllm/core/gpu_profiler.py +59 -0
- distributed_llm-0.4.1/src/distllm/core/gpu_resource_manager.py +338 -0
- distributed_llm-0.4.1/src/distllm/core/graceful_degradation.py +264 -0
- distributed_llm-0.4.1/src/distllm/core/grammar_constrained.py +549 -0
- distributed_llm-0.4.1/src/distllm/core/grammar_constrained_draft.py +91 -0
- distributed_llm-0.4.1/src/distllm/core/grammar_decoder.py +285 -0
- distributed_llm-0.4.1/src/distllm/core/ha_coordinator.py +452 -0
- distributed_llm-0.4.1/src/distllm/core/hardware_plugin_registry.py +126 -0
- distributed_llm-0.4.1/src/distllm/core/hashing.py +29 -0
- distributed_llm-0.4.1/src/distllm/core/health_manager.py +320 -0
- distributed_llm-0.4.1/src/distllm/core/heterogeneous_scheduler.py +663 -0
- distributed_llm-0.4.1/src/distllm/core/hibernation_manager.py +250 -0
- distributed_llm-0.4.1/src/distllm/core/hierarchical_digest.py +168 -0
- distributed_llm-0.4.1/src/distllm/core/hybrid_cache.py +253 -0
- distributed_llm-0.4.1/src/distllm/core/hydra_diffusion.py +177 -0
- distributed_llm-0.4.1/src/distllm/core/inference_engine.py +1072 -0
- distributed_llm-0.4.1/src/distllm/core/intelligent_autoscaler.py +219 -0
- distributed_llm-0.4.1/src/distllm/core/kraken_chaos.py +1407 -0
- distributed_llm-0.4.1/src/distllm/core/kv_backup.py +217 -0
- distributed_llm-0.4.1/src/distllm/core/kv_cache.py +1271 -0
- distributed_llm-0.4.1/src/distllm/core/kv_cache_adaptive_quantizer.py +168 -0
- distributed_llm-0.4.1/src/distllm/core/kv_cache_compressor.py +290 -0
- distributed_llm-0.4.1/src/distllm/core/kv_cache_manager.py +142 -0
- distributed_llm-0.4.1/src/distllm/core/kv_cache_marketplace.py +319 -0
- distributed_llm-0.4.1/src/distllm/core/kv_cache_metrics.py +205 -0
- distributed_llm-0.4.1/src/distllm/core/kv_cache_migration.py +137 -0
- distributed_llm-0.4.1/src/distllm/core/kv_cache_paged.py +78 -0
- distributed_llm-0.4.1/src/distllm/core/kv_cache_replication.py +107 -0
- distributed_llm-0.4.1/src/distllm/core/kv_cache_serialization.py +182 -0
- distributed_llm-0.4.1/src/distllm/core/latency_tracker.py +17 -0
- distributed_llm-0.4.1/src/distllm/core/leaky_bucket_limiter.py +194 -0
- distributed_llm-0.4.1/src/distllm/core/learning_router.py +652 -0
- distributed_llm-0.4.1/src/distllm/core/llamacpp_backend.py +23 -0
- distributed_llm-0.4.1/src/distllm/core/load_balancer.py +286 -0
- distributed_llm-0.4.1/src/distllm/core/media_pipeline.py +387 -0
- distributed_llm-0.4.1/src/distllm/core/memory_defragmenter.py +666 -0
- distributed_llm-0.4.1/src/distllm/core/metering.py +449 -0
- distributed_llm-0.4.1/src/distllm/core/metrics_collector.py +39 -0
- distributed_llm-0.4.1/src/distllm/core/micro_batch_scheduler.py +170 -0
- distributed_llm-0.4.1/src/distllm/core/model_hub_enhanced.py +382 -0
- distributed_llm-0.4.1/src/distllm/core/model_registry.py +9 -0
- distributed_llm-0.4.1/src/distllm/core/model_router.py +930 -0
- distributed_llm-0.4.1/src/distllm/core/model_selector.py +245 -0
- distributed_llm-0.4.1/src/distllm/core/model_sizing.py +334 -0
- distributed_llm-0.4.1/src/distllm/core/model_version_manager.py +414 -0
- distributed_llm-0.4.1/src/distllm/core/moe_orchestrator.py +205 -0
- distributed_llm-0.4.1/src/distllm/core/money.py +53 -0
- distributed_llm-0.4.1/src/distllm/core/monitor.py +141 -0
- distributed_llm-0.4.1/src/distllm/core/mtp_head.py +444 -0
- distributed_llm-0.4.1/src/distllm/core/multi_draft_verifier.py +346 -0
- distributed_llm-0.4.1/src/distllm/core/multi_model_serving.py +624 -0
- distributed_llm-0.4.1/src/distllm/core/multimodal_engine.py +194 -0
- distributed_llm-0.4.1/src/distllm/core/neural_partition_optimizer.py +1398 -0
- distributed_llm-0.4.1/src/distllm/core/node_recovery.py +27 -0
- distributed_llm-0.4.1/src/distllm/core/notification_manager.py +317 -0
- distributed_llm-0.4.1/src/distllm/core/param_update_channel.py +104 -0
- distributed_llm-0.4.1/src/distllm/core/pareto_optimizer.py +227 -0
- distributed_llm-0.4.1/src/distllm/core/performance_alerts.py +198 -0
- distributed_llm-0.4.1/src/distllm/core/performance_baseline.py +252 -0
- distributed_llm-0.4.1/src/distllm/core/persistence.py +947 -0
- distributed_llm-0.4.1/src/distllm/core/persistent_store.py +485 -0
- distributed_llm-0.4.1/src/distllm/core/pipeline_composer.py +211 -0
- distributed_llm-0.4.1/src/distllm/core/pipeline_executor.py +500 -0
- distributed_llm-0.4.1/src/distllm/core/pipeline_orchestrator.py +17 -0
- distributed_llm-0.4.1/src/distllm/core/pipeline_overlap.py +177 -0
- distributed_llm-0.4.1/src/distllm/core/placement.py +442 -0
- distributed_llm-0.4.1/src/distllm/core/plugin_marketplace.py +483 -0
- distributed_llm-0.4.1/src/distllm/core/plugin_sandbox.py +751 -0
- distributed_llm-0.4.1/src/distllm/core/plugin_system.py +601 -0
- distributed_llm-0.4.1/src/distllm/core/plugins/__init__.py +26 -0
- distributed_llm-0.4.1/src/distllm/core/plugins/sandbox.py +38 -0
- distributed_llm-0.4.1/src/distllm/core/predictive_cache.py +29 -0
- distributed_llm-0.4.1/src/distllm/core/predictive_cache_warming.py +323 -0
- distributed_llm-0.4.1/src/distllm/core/predictive_failure.py +163 -0
- distributed_llm-0.4.1/src/distllm/core/preemptible_scheduler.py +343 -0
- distributed_llm-0.4.1/src/distllm/core/preference_learning.py +606 -0
- distributed_llm-0.4.1/src/distllm/core/prefix_cache.py +17 -0
- distributed_llm-0.4.1/src/distllm/core/pricing_providers.py +576 -0
- distributed_llm-0.4.1/src/distllm/core/priority_heap.py +62 -0
- distributed_llm-0.4.1/src/distllm/core/privacy_budget.py +177 -0
- distributed_llm-0.4.1/src/distllm/core/prompt_caching_service.py +228 -0
- distributed_llm-0.4.1/src/distllm/core/prompt_library.py +838 -0
- distributed_llm-0.4.1/src/distllm/core/protocols.py +213 -0
- distributed_llm-0.4.1/src/distllm/core/provider_health.py +234 -0
- distributed_llm-0.4.1/src/distllm/core/provisioning.py +329 -0
- distributed_llm-0.4.1/src/distllm/core/pulse_performance_model.py +1558 -0
- distributed_llm-0.4.1/src/distllm/core/quantization_selector.py +210 -0
- distributed_llm-0.4.1/src/distllm/core/radix_tree_cache.py +306 -0
- distributed_llm-0.4.1/src/distllm/core/rebalancer.py +25 -0
- distributed_llm-0.4.1/src/distllm/core/redis_prompt_cache.py +311 -0
- distributed_llm-0.4.1/src/distllm/core/replication_controller.py +128 -0
- distributed_llm-0.4.1/src/distllm/core/request_auditor.py +215 -0
- distributed_llm-0.4.1/src/distllm/core/request_fingerprinting.py +231 -0
- distributed_llm-0.4.1/src/distllm/core/request_latency.py +211 -0
- distributed_llm-0.4.1/src/distllm/core/request_pipeline.py +810 -0
- distributed_llm-0.4.1/src/distllm/core/request_replay.py +253 -0
- distributed_llm-0.4.1/src/distllm/core/request_tracker.py +184 -0
- distributed_llm-0.4.1/src/distllm/core/resource_manager.py +657 -0
- distributed_llm-0.4.1/src/distllm/core/route_audit.py +175 -0
- distributed_llm-0.4.1/src/distllm/core/routing_extensions.py +604 -0
- distributed_llm-0.4.1/src/distllm/core/schedule_simulator.py +289 -0
- distributed_llm-0.4.1/src/distllm/core/schedule_viz.py +233 -0
- distributed_llm-0.4.1/src/distllm/core/scheduler/__init__.py +34 -0
- distributed_llm-0.4.1/src/distllm/core/scheduler/budget.py +25 -0
- distributed_llm-0.4.1/src/distllm/core/scheduler/budget_computer.py +322 -0
- distributed_llm-0.4.1/src/distllm/core/scheduler/chunked_prefill.py +52 -0
- distributed_llm-0.4.1/src/distllm/core/scheduler/kv_cache_manager.py +313 -0
- distributed_llm-0.4.1/src/distllm/core/scheduler/preemption_manager.py +251 -0
- distributed_llm-0.4.1/src/distllm/core/scheduler/pressure.py +48 -0
- distributed_llm-0.4.1/src/distllm/core/scheduler/sequence.py +179 -0
- distributed_llm-0.4.1/src/distllm/core/secret_manager.py +315 -0
- distributed_llm-0.4.1/src/distllm/core/semantic_cache.py +369 -0
- distributed_llm-0.4.1/src/distllm/core/sentinel_qos.py +833 -0
- distributed_llm-0.4.1/src/distllm/core/shadow_eval_runner.py +194 -0
- distributed_llm-0.4.1/src/distllm/core/shared_layer_pool.py +279 -0
- distributed_llm-0.4.1/src/distllm/core/smart_model_router.py +309 -0
- distributed_llm-0.4.1/src/distllm/core/spec_equivalence.py +140 -0
- distributed_llm-0.4.1/src/distllm/core/spec_verify.py +225 -0
- distributed_llm-0.4.1/src/distllm/core/speculative_adaptor.py +108 -0
- distributed_llm-0.4.1/src/distllm/core/speculative_dashboard.py +134 -0
- distributed_llm-0.4.1/src/distllm/core/speculative_decoder.py +1286 -0
- distributed_llm-0.4.1/src/distllm/core/speculative_profiler.py +132 -0
- distributed_llm-0.4.1/src/distllm/core/split_brain.py +236 -0
- distributed_llm-0.4.1/src/distllm/core/spot_failover.py +292 -0
- distributed_llm-0.4.1/src/distllm/core/spot_forecasting.py +463 -0
- distributed_llm-0.4.1/src/distllm/core/starvation_monitor.py +70 -0
- distributed_llm-0.4.1/src/distllm/core/state_replication.py +261 -0
- distributed_llm-0.4.1/src/distllm/core/stats_collector.py +64 -0
- distributed_llm-0.4.1/src/distllm/core/step_processor.py +115 -0
- distributed_llm-0.4.1/src/distllm/core/straggler_alerts.py +174 -0
- distributed_llm-0.4.1/src/distllm/core/straggler_aware_scheduler.py +255 -0
- distributed_llm-0.4.1/src/distllm/core/straggler_detector.py +29 -0
- distributed_llm-0.4.1/src/distllm/core/streaming_cost.py +286 -0
- distributed_llm-0.4.1/src/distllm/core/streaming_generator.py +228 -0
- distributed_llm-0.4.1/src/distllm/core/structured_output/__init__.py +348 -0
- distributed_llm-0.4.1/src/distllm/core/structured_output/config.py +38 -0
- distributed_llm-0.4.1/src/distllm/core/structured_output/engine.py +367 -0
- distributed_llm-0.4.1/src/distllm/core/structured_output/streaming.py +183 -0
- distributed_llm-0.4.1/src/distllm/core/structured_output/validator.py +199 -0
- distributed_llm-0.4.1/src/distllm/core/subsystem_registry.py +171 -0
- distributed_llm-0.4.1/src/distllm/core/synapse_debugger.py +226 -0
- distributed_llm-0.4.1/src/distllm/core/synth_data_generator.py +122 -0
- distributed_llm-0.4.1/src/distllm/core/telemetry.py +240 -0
- distributed_llm-0.4.1/src/distllm/core/tenant_billing.py +446 -0
- distributed_llm-0.4.1/src/distllm/core/tenant_cost_attribution.py +314 -0
- distributed_llm-0.4.1/src/distllm/core/token_generator.py +368 -0
- distributed_llm-0.4.1/src/distllm/core/token_streaming_buffer.py +147 -0
- distributed_llm-0.4.1/src/distllm/core/topology_aware_lb.py +324 -0
- distributed_llm-0.4.1/src/distllm/core/topology_aware_tiering.py +344 -0
- distributed_llm-0.4.1/src/distllm/core/tree_speculative_decoder.py +405 -0
- distributed_llm-0.4.1/src/distllm/core/types.py +17 -0
- distributed_llm-0.4.1/src/distllm/core/unified_router.py +439 -0
- distributed_llm-0.4.1/src/distllm/core/unified_sla_router.py +242 -0
- distributed_llm-0.4.1/src/distllm/core/usage_meter.py +915 -0
- distributed_llm-0.4.1/src/distllm/core/vectorstore/__init__.py +30 -0
- distributed_llm-0.4.1/src/distllm/core/vectorstore/base.py +106 -0
- distributed_llm-0.4.1/src/distllm/core/vectorstore/chroma_store.py +99 -0
- distributed_llm-0.4.1/src/distllm/core/vectorstore/factory.py +97 -0
- distributed_llm-0.4.1/src/distllm/core/vectorstore/pgvector_store.py +123 -0
- distributed_llm-0.4.1/src/distllm/core/vectorstore/providers/__init__.py +7 -0
- distributed_llm-0.4.1/src/distllm/core/vectorstore/providers/milvus.py +219 -0
- distributed_llm-0.4.1/src/distllm/core/vectorstore/providers/pinecone.py +142 -0
- distributed_llm-0.4.1/src/distllm/core/vectorstore/providers/qdrant.py +176 -0
- distributed_llm-0.4.1/src/distllm/core/vectorstore/providers/weaviate.py +185 -0
- distributed_llm-0.4.1/src/distllm/core/vectorstore/qdrant_store.py +148 -0
- distributed_llm-0.4.1/src/distllm/core/vectorstore/rag.py +151 -0
- distributed_llm-0.4.1/src/distllm/core/vllm_backend.py +21 -0
- distributed_llm-0.4.1/src/distllm/core/vllm_node.py +174 -0
- distributed_llm-0.4.1/src/distllm/core/voyager_multimodal.py +1354 -0
- distributed_llm-0.4.1/src/distllm/core/webgpu_manager.py +382 -0
- distributed_llm-0.4.1/src/distllm/core/webhook_formatters.py +243 -0
- distributed_llm-0.4.1/src/distllm/core/webhook_manager.py +433 -0
- distributed_llm-0.4.1/src/distllm/core/wisp_wasm.py +934 -0
- distributed_llm-0.4.1/src/distllm/core/workload_classifier.py +137 -0
- distributed_llm-0.4.1/src/distllm/dashboard/__init__.py +17 -0
- distributed_llm-0.4.1/src/distllm/dashboard/verification_history.py +192 -0
- distributed_llm-0.4.1/src/distllm/dashboard/ws_handler.py +586 -0
- distributed_llm-0.4.1/src/distllm/dist/__init__.py +85 -0
- distributed_llm-0.4.1/src/distllm/dist/__init__.pyi +132 -0
- distributed_llm-0.4.1/src/distllm/dist/adaptive_speculator.py +384 -0
- distributed_llm-0.4.1/src/distllm/dist/admin_cli.py +293 -0
- distributed_llm-0.4.1/src/distllm/dist/api_docs.py +594 -0
- distributed_llm-0.4.1/src/distllm/dist/async_pipeline.py +578 -0
- distributed_llm-0.4.1/src/distllm/dist/attention.py +1699 -0
- distributed_llm-0.4.1/src/distllm/dist/attention_block_pool.py +634 -0
- distributed_llm-0.4.1/src/distllm/dist/attention_distributed.py +138 -0
- distributed_llm-0.4.1/src/distllm/dist/autoscaler.py +196 -0
- distributed_llm-0.4.1/src/distllm/dist/backends/__init__.py +29 -0
- distributed_llm-0.4.1/src/distllm/dist/backends/backend_profiles.py +357 -0
- distributed_llm-0.4.1/src/distllm/dist/backends/graceful_degradation.py +409 -0
- distributed_llm-0.4.1/src/distllm/dist/backends/health_monitor.py +518 -0
- distributed_llm-0.4.1/src/distllm/dist/backends/llamacpp.py +125 -0
- distributed_llm-0.4.1/src/distllm/dist/backends/ray.py +89 -0
- distributed_llm-0.4.1/src/distllm/dist/backends/vllm.py +177 -0
- distributed_llm-0.4.1/src/distllm/dist/block_pool.py +662 -0
- distributed_llm-0.4.1/src/distllm/dist/block_transfer_service.py +267 -0
- distributed_llm-0.4.1/src/distllm/dist/byzantine.py +2193 -0
- distributed_llm-0.4.1/src/distllm/dist/cache.py +305 -0
- distributed_llm-0.4.1/src/distllm/dist/cache_digest.py +405 -0
- distributed_llm-0.4.1/src/distllm/dist/chaos/__init__.py +52 -0
- distributed_llm-0.4.1/src/distllm/dist/chaos/chaos_orchestrator.py +229 -0
- distributed_llm-0.4.1/src/distllm/dist/chaos/fault_injector.py +1273 -0
- distributed_llm-0.4.1/src/distllm/dist/chunked_prefill.py +136 -0
- distributed_llm-0.4.1/src/distllm/dist/cloud_selector.py +257 -0
- distributed_llm-0.4.1/src/distllm/dist/config.py +70 -0
- distributed_llm-0.4.1/src/distllm/dist/cross_cluster.py +231 -0
- distributed_llm-0.4.1/src/distllm/dist/daas/__init__.py +46 -0
- distributed_llm-0.4.1/src/distllm/dist/daas/load_balancer.py +275 -0
- distributed_llm-0.4.1/src/distllm/dist/daas/marketplace_integration.py +374 -0
- distributed_llm-0.4.1/src/distllm/dist/daas/resource_isolation.py +280 -0
- distributed_llm-0.4.1/src/distllm/dist/daas/tenant_dispatcher.py +252 -0
- distributed_llm-0.4.1/src/distllm/dist/daas/usage_meter.py +360 -0
- distributed_llm-0.4.1/src/distllm/dist/daas_server.py +514 -0
- distributed_llm-0.4.1/src/distllm/dist/disagg/__init__.py +162 -0
- distributed_llm-0.4.1/src/distllm/dist/disagg/pool.py +214 -0
- distributed_llm-0.4.1/src/distllm/dist/disagg/transfer.py +77 -0
- distributed_llm-0.4.1/src/distllm/dist/disagg/transfer_compression.py +793 -0
- distributed_llm-0.4.1/src/distllm/dist/disagg/transfer_engine.py +998 -0
- distributed_llm-0.4.1/src/distllm/dist/discovery.py +166 -0
- distributed_llm-0.4.1/src/distllm/dist/draft_bank.py +344 -0
- distributed_llm-0.4.1/src/distllm/dist/draft_migration.py +382 -0
- distributed_llm-0.4.1/src/distllm/dist/ebpf_transport.py +364 -0
- distributed_llm-0.4.1/src/distllm/dist/edge_cloud.py +544 -0
- distributed_llm-0.4.1/src/distllm/dist/edge_federation.py +426 -0
- distributed_llm-0.4.1/src/distllm/dist/execution_planner.py +148 -0
- distributed_llm-0.4.1/src/distllm/dist/federated_merge.py +560 -0
- distributed_llm-0.4.1/src/distllm/dist/federation.py +1114 -0
- distributed_llm-0.4.1/src/distllm/dist/flash_attention.py +237 -0
- distributed_llm-0.4.1/src/distllm/dist/fsdp.py +295 -0
- distributed_llm-0.4.1/src/distllm/dist/geo.py +361 -0
- distributed_llm-0.4.1/src/distllm/dist/ice_transport.py +2968 -0
- distributed_llm-0.4.1/src/distllm/dist/kv_migration.py +237 -0
- distributed_llm-0.4.1/src/distllm/dist/latency.py +60 -0
- distributed_llm-0.4.1/src/distllm/dist/lifecycle.py +467 -0
- distributed_llm-0.4.1/src/distllm/dist/marketplace.py +891 -0
- distributed_llm-0.4.1/src/distllm/dist/merkle.py +178 -0
- distributed_llm-0.4.1/src/distllm/dist/metrics.py +456 -0
- distributed_llm-0.4.1/src/distllm/dist/model_store.py +107 -0
- distributed_llm-0.4.1/src/distllm/dist/multi_tenant.py +339 -0
- distributed_llm-0.4.1/src/distllm/dist/multimodal.py +392 -0
- distributed_llm-0.4.1/src/distllm/dist/nat.py +934 -0
- distributed_llm-0.4.1/src/distllm/dist/nccl.py +733 -0
- distributed_llm-0.4.1/src/distllm/dist/network.py +126 -0
- distributed_llm-0.4.1/src/distllm/dist/node_client.py +568 -0
- distributed_llm-0.4.1/src/distllm/dist/node_pb2.py +66 -0
- distributed_llm-0.4.1/src/distllm/dist/node_pb2.pyi +236 -0
- distributed_llm-0.4.1/src/distllm/dist/node_pb2_grpc.py +312 -0
- distributed_llm-0.4.1/src/distllm/dist/node_pb2_grpc.pyi +41 -0
- distributed_llm-0.4.1/src/distllm/dist/node_registrar.py +247 -0
- distributed_llm-0.4.1/src/distllm/dist/node_service.py +572 -0
- distributed_llm-0.4.1/src/distllm/dist/observability.py +258 -0
- distributed_llm-0.4.1/src/distllm/dist/otel.py +158 -0
- distributed_llm-0.4.1/src/distllm/dist/p2p/__init__.py +22 -0
- distributed_llm-0.4.1/src/distllm/dist/p2p/discovery.py +132 -0
- distributed_llm-0.4.1/src/distllm/dist/p2p/gossip.py +1339 -0
- distributed_llm-0.4.1/src/distllm/dist/p2p/kademlia_dht.py +1058 -0
- distributed_llm-0.4.1/src/distllm/dist/p2p/load_balancer.py +131 -0
- distributed_llm-0.4.1/src/distllm/dist/p2p/quic_transport.py +700 -0
- distributed_llm-0.4.1/src/distllm/dist/p2p/router.py +607 -0
- distributed_llm-0.4.1/src/distllm/dist/p2p/transport.py +399 -0
- distributed_llm-0.4.1/src/distllm/dist/p2p_model_distributor.py +160 -0
- distributed_llm-0.4.1/src/distllm/dist/paged_attention_kernel.py +281 -0
- distributed_llm-0.4.1/src/distllm/dist/parallel.py +1061 -0
- distributed_llm-0.4.1/src/distllm/dist/parallel_planner.py +586 -0
- distributed_llm-0.4.1/src/distllm/dist/parallel_topology.py +231 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/__init__.py +146 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/adaptive.py +532 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/benchmark_suite.py +479 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/cli.py +189 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/cloud_arbitrage.py +523 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/config.py +97 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/cost_model.py +553 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/learned_cost.py +653 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/mixed_precision_tuner.py +310 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/network_cost_model.py +664 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/optimizer.py +650 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/pareto_optimizer.py +466 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/partitioner.py +363 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/persistence.py +392 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/plugins.py +270 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/profiles.py +659 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/quant_bench.py +373 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/quant_calibrate.py +229 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/quant_coordinator.py +260 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/quant_cost.py +293 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/quant_partition.py +432 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/quant_report.py +301 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/quantization_metrics.py +355 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/quantization_search.py +290 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/quantization_tuner.py +1383 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/topology.py +218 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/validator.py +405 -0
- distributed_llm-0.4.1/src/distllm/dist/partition/visualizer.py +275 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/__init__.py +71 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/bandwidth_controller.py +780 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/compression_negotiation.py +771 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/context.py +80 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/continuous_batching.py +435 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/disagg_orchestrator.py +284 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/orchestrator.py +727 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/pipeline_reconfig.py +1395 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/profiler.py +84 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/serialization.py +176 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/simulator.py +172 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/strategy.py +193 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/token_accumulator.py +211 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/transport.py +230 -0
- distributed_llm-0.4.1/src/distllm/dist/pipeline/wan_disagg_orchestrator.py +564 -0
- distributed_llm-0.4.1/src/distllm/dist/power_cap.py +358 -0
- distributed_llm-0.4.1/src/distllm/dist/predictive_cache.py +399 -0
- distributed_llm-0.4.1/src/distllm/dist/preemption.py +198 -0
- distributed_llm-0.4.1/src/distllm/dist/prefix_cache.py +461 -0
- distributed_llm-0.4.1/src/distllm/dist/prefix_clustering.py +305 -0
- distributed_llm-0.4.1/src/distllm/dist/privacy/__init__.py +411 -0
- distributed_llm-0.4.1/src/distllm/dist/privacy/privacy_accountant.py +344 -0
- distributed_llm-0.4.1/src/distllm/dist/privacy.py +240 -0
- distributed_llm-0.4.1/src/distllm/dist/provisioning.py +338 -0
- distributed_llm-0.4.1/src/distllm/dist/quality.py +118 -0
- distributed_llm-0.4.1/src/distllm/dist/quic_transport.py +335 -0
- distributed_llm-0.4.1/src/distllm/dist/quota_enforcer.py +265 -0
- distributed_llm-0.4.1/src/distllm/dist/rebalancer.py +234 -0
- distributed_llm-0.4.1/src/distllm/dist/recovery.py +827 -0
- distributed_llm-0.4.1/src/distllm/dist/recovery_drill.py +281 -0
- distributed_llm-0.4.1/src/distllm/dist/redis_cache.py +265 -0
- distributed_llm-0.4.1/src/distllm/dist/redundant.py +308 -0
- distributed_llm-0.4.1/src/distllm/dist/redundant_executor.py +1536 -0
- distributed_llm-0.4.1/src/distllm/dist/reputation.py +231 -0
- distributed_llm-0.4.1/src/distllm/dist/router.py +382 -0
- distributed_llm-0.4.1/src/distllm/dist/routing/__init__.py +19 -0
- distributed_llm-0.4.1/src/distllm/dist/routing/arbitrage_engine.py +575 -0
- distributed_llm-0.4.1/src/distllm/dist/routing/composite.py +179 -0
- distributed_llm-0.4.1/src/distllm/dist/routing/consistent_hash.py +144 -0
- distributed_llm-0.4.1/src/distllm/dist/routing/latency_aware.py +116 -0
- distributed_llm-0.4.1/src/distllm/dist/routing/load_aware.py +114 -0
- distributed_llm-0.4.1/src/distllm/dist/scheduling/__init__.py +38 -0
- distributed_llm-0.4.1/src/distllm/dist/scheduling/batcher.py +95 -0
- distributed_llm-0.4.1/src/distllm/dist/scheduling/classifier.py +153 -0
- distributed_llm-0.4.1/src/distllm/dist/scheduling/deadline_scheduler.py +958 -0
- distributed_llm-0.4.1/src/distllm/dist/scheduling/iteration.py +404 -0
- distributed_llm-0.4.1/src/distllm/dist/scheduling/profiler.py +57 -0
- distributed_llm-0.4.1/src/distllm/dist/simulation/__init__.py +54 -0
- distributed_llm-0.4.1/src/distllm/dist/simulation/chaos_simulator.py +901 -0
- distributed_llm-0.4.1/src/distllm/dist/simulation/cluster_simulator.py +667 -0
- distributed_llm-0.4.1/src/distllm/dist/simulation/cost_aware_provisioning.py +370 -0
- distributed_llm-0.4.1/src/distllm/dist/simulation/digital_twin.py +617 -0
- distributed_llm-0.4.1/src/distllm/dist/simulation/topology_optimizer.py +747 -0
- distributed_llm-0.4.1/src/distllm/dist/simulation/what_if.py +492 -0
- distributed_llm-0.4.1/src/distllm/dist/speculative/__init__.py +47 -0
- distributed_llm-0.4.1/src/distllm/dist/speculative/adaptive_spec.py +291 -0
- distributed_llm-0.4.1/src/distllm/dist/speculative/draft_cache.py +246 -0
- distributed_llm-0.4.1/src/distllm/dist/speculative/draft_orchestrator.py +634 -0
- distributed_llm-0.4.1/src/distllm/dist/speculative/draft_registry.py +439 -0
- distributed_llm-0.4.1/src/distllm/dist/speculative/multi_draft.py +304 -0
- distributed_llm-0.4.1/src/distllm/dist/speculative/online_sisd.py +523 -0
- distributed_llm-0.4.1/src/distllm/dist/straggler.py +819 -0
- distributed_llm-0.4.1/src/distllm/dist/streaming_kv_transfer.py +174 -0
- distributed_llm-0.4.1/src/distllm/dist/structured_output/__init__.py +7 -0
- distributed_llm-0.4.1/src/distllm/dist/structured_output/engine.py +144 -0
- distributed_llm-0.4.1/src/distllm/dist/tensor_pool.py +120 -0
- distributed_llm-0.4.1/src/distllm/dist/tgi_compat.py +254 -0
- distributed_llm-0.4.1/src/distllm/dist/topology.py +141 -0
- distributed_llm-0.4.1/src/distllm/dist/topology_consensus.py +1961 -0
- distributed_llm-0.4.1/src/distllm/dist/topology_dynamic.py +270 -0
- distributed_llm-0.4.1/src/distllm/dist/tp_inprocess.py +214 -0
- distributed_llm-0.4.1/src/distllm/dist/tp_launcher.py +310 -0
- distributed_llm-0.4.1/src/distllm/dist/tracing.py +325 -0
- distributed_llm-0.4.1/src/distllm/dist/transport.py +493 -0
- distributed_llm-0.4.1/src/distllm/dist/wan_speculative.py +295 -0
- distributed_llm-0.4.1/src/distllm/dist/wandb_integration.py +252 -0
- distributed_llm-0.4.1/src/distllm/dist/webrtc.py +846 -0
- distributed_llm-0.4.1/src/distllm/dist/wide_area.py +515 -0
- distributed_llm-0.4.1/src/distllm/dist/worker.py +635 -0
- distributed_llm-0.4.1/src/distllm/dist/zero_copy.py +307 -0
- distributed_llm-0.4.1/src/distllm/errors/__init__.py +105 -0
- distributed_llm-0.4.1/src/distllm/errors/policies.py +106 -0
- distributed_llm-0.4.1/src/distllm/errors/retry.py +168 -0
- distributed_llm-0.4.1/src/distllm/errors/types.py +721 -0
- distributed_llm-0.4.1/src/distllm/health/__init__.py +6 -0
- distributed_llm-0.4.1/src/distllm/health/failover.py +81 -0
- distributed_llm-0.4.1/src/distllm/health/prober.py +31 -0
- distributed_llm-0.4.1/src/distllm/health/service.py +173 -0
- distributed_llm-0.4.1/src/distllm/health/state.py +76 -0
- distributed_llm-0.4.1/src/distllm/integrations/__init__.py +72 -0
- distributed_llm-0.4.1/src/distllm/integrations/_common/__init__.py +7 -0
- distributed_llm-0.4.1/src/distllm/integrations/_common/base_tool_provider.py +189 -0
- distributed_llm-0.4.1/src/distllm/integrations/_common/cost_tracker.py +144 -0
- distributed_llm-0.4.1/src/distllm/integrations/_common/model_router.py +148 -0
- distributed_llm-0.4.1/src/distllm/integrations/ci/__init__.py +24 -0
- distributed_llm-0.4.1/src/distllm/integrations/ci/_common.py +92 -0
- distributed_llm-0.4.1/src/distllm/integrations/ci/gitlab.py +345 -0
- distributed_llm-0.4.1/src/distllm/integrations/ci/jenkins.py +273 -0
- distributed_llm-0.4.1/src/distllm/integrations/mlflow_tracking.py +372 -0
- distributed_llm-0.4.1/src/distllm/integrations/spark_connector.py +909 -0
- distributed_llm-0.4.1/src/distllm/integrations/wandb/__init__.py +81 -0
- distributed_llm-0.4.1/src/distllm/models/__init__.py +40 -0
- distributed_llm-0.4.1/src/distllm/models/_trust_remote.py +48 -0
- distributed_llm-0.4.1/src/distllm/models/adapter.py +768 -0
- distributed_llm-0.4.1/src/distllm/models/adapter_router.py +198 -0
- distributed_llm-0.4.1/src/distllm/models/cache.py +172 -0
- distributed_llm-0.4.1/src/distllm/models/model_hub.py +650 -0
- distributed_llm-0.4.1/src/distllm/models/partition_planner.py +384 -0
- distributed_llm-0.4.1/src/distllm/models/partitioner.py +784 -0
- distributed_llm-0.4.1/src/distllm/models/rope_scaling.py +119 -0
- distributed_llm-0.4.1/src/distllm/models/safetensors_index.py +179 -0
- distributed_llm-0.4.1/src/distllm/observability/__init__.py +107 -0
- distributed_llm-0.4.1/src/distllm/observability/alerting_config.py +881 -0
- distributed_llm-0.4.1/src/distllm/observability/capacity_models.py +398 -0
- distributed_llm-0.4.1/src/distllm/observability/capacity_planning.py +2870 -0
- distributed_llm-0.4.1/src/distllm/observability/exporter.py +228 -0
- distributed_llm-0.4.1/src/distllm/observability/exporter_datadog.py +1362 -0
- distributed_llm-0.4.1/src/distllm/observability/health_config.py +1282 -0
- distributed_llm-0.4.1/src/distllm/observability/incident_response.py +779 -0
- distributed_llm-0.4.1/src/distllm/observability/logging.py +211 -0
- distributed_llm-0.4.1/src/distllm/observability/logging_config.py +864 -0
- distributed_llm-0.4.1/src/distllm/observability/loki_sink.py +178 -0
- distributed_llm-0.4.1/src/distllm/observability/metrics.py +111 -0
- distributed_llm-0.4.1/src/distllm/observability/metrics_completeness.py +393 -0
- distributed_llm-0.4.1/src/distllm/observability/otel_logging.py +290 -0
- distributed_llm-0.4.1/src/distllm/observability/self_healing_config.py +1308 -0
- distributed_llm-0.4.1/src/distllm/observability/slo_config.py +1520 -0
- distributed_llm-0.4.1/src/distllm/observability/spans.py +235 -0
- distributed_llm-0.4.1/src/distllm/observability/tracing.py +268 -0
- distributed_llm-0.4.1/src/distllm/observability/tracing_config.py +676 -0
- distributed_llm-0.4.1/src/distllm/observability/wandb_monitor.py +66 -0
- distributed_llm-0.4.1/src/distllm/plugins/__init__.py +14 -0
- distributed_llm-0.4.1/src/distllm/plugins/airflow.py +110 -0
- distributed_llm-0.4.1/src/distllm/plugins/auth_plugin.py +576 -0
- distributed_llm-0.4.1/src/distllm/plugins/builtin.py +376 -0
- distributed_llm-0.4.1/src/distllm/plugins/cache_plugin.py +576 -0
- distributed_llm-0.4.1/src/distllm/plugins/health_plugin.py +396 -0
- distributed_llm-0.4.1/src/distllm/plugins/kubeflow.py +84 -0
- distributed_llm-0.4.1/src/distllm/plugins/mlflow_plugin.py +71 -0
- distributed_llm-0.4.1/src/distllm/plugins/registry.py +135 -0
- distributed_llm-0.4.1/src/distllm/prompts/__init__.py +39 -0
- distributed_llm-0.4.1/src/distllm/prompts/analysis.py +103 -0
- distributed_llm-0.4.1/src/distllm/prompts/code.py +172 -0
- distributed_llm-0.4.1/src/distllm/prompts/creative.py +115 -0
- distributed_llm-0.4.1/src/distllm/prompts/education.py +91 -0
- distributed_llm-0.4.1/src/distllm/prompts/engine.py +119 -0
- distributed_llm-0.4.1/src/distllm/prompts/exchange.py +705 -0
- distributed_llm-0.4.1/src/distllm/prompts/language.py +81 -0
- distributed_llm-0.4.1/src/distllm/prompts/library.py +1198 -0
- distributed_llm-0.4.1/src/distllm/prompts/management.py +35 -0
- distributed_llm-0.4.1/src/distllm/prompts/productivity.py +86 -0
- distributed_llm-0.4.1/src/distllm/prompts/professional.py +111 -0
- distributed_llm-0.4.1/src/distllm/prompts/prompt_def.py +33 -0
- distributed_llm-0.4.1/src/distllm/prompts/reasoning.py +108 -0
- distributed_llm-0.4.1/src/distllm/prompts/specialized.py +140 -0
- distributed_llm-0.4.1/src/distllm/prompts/templates.py +128 -0
- distributed_llm-0.4.1/src/distllm/prompts/writing.py +140 -0
- distributed_llm-0.4.1/src/distllm/py.typed +0 -0
- distributed_llm-0.4.1/src/distllm/sdk/__init__.py +82 -0
- distributed_llm-0.4.1/src/distllm/sdk/circuit_breaker.py +139 -0
- distributed_llm-0.4.1/src/distllm/sdk/client.py +1191 -0
- distributed_llm-0.4.1/src/distllm/sdk/observability.py +42 -0
- distributed_llm-0.4.1/src/distllm/sdk/streaming.py +228 -0
- distributed_llm-0.4.1/src/distllm/sdk/transport.py +224 -0
- distributed_llm-0.4.1/src/distllm/sdk/types.py +288 -0
- distributed_llm-0.4.1/src/distllm/security/__init__.py +63 -0
- distributed_llm-0.4.1/src/distllm/security/content_moderation/__init__.py +44 -0
- distributed_llm-0.4.1/src/distllm/security/content_moderation/base.py +405 -0
- distributed_llm-0.4.1/src/distllm/security/content_moderation/jailbreak.py +192 -0
- distributed_llm-0.4.1/src/distllm/security/content_moderation/pii.py +262 -0
- distributed_llm-0.4.1/src/distllm/security/content_moderation/pipeline.py +272 -0
- distributed_llm-0.4.1/src/distllm/security/content_moderation/topics.py +153 -0
- distributed_llm-0.4.1/src/distllm/security/content_moderation/toxicity.py +131 -0
- distributed_llm-0.4.1/src/distllm/security/e2e.py +437 -0
- distributed_llm-0.4.1/src/distllm/security/edge_attestation.py +381 -0
- distributed_llm-0.4.1/src/distllm/security/log_redaction.py +244 -0
- distributed_llm-0.4.1/src/distllm/security/quantum_safe_tls.py +314 -0
- distributed_llm-0.4.1/src/distllm/security/spiffe.py +347 -0
- distributed_llm-0.4.1/src/distllm/security/tee.py +461 -0
- distributed_llm-0.4.1/src/distllm/security/utils.py +139 -0
- distributed_llm-0.4.1/src/distllm/security/watermark.py +779 -0
- distributed_llm-0.4.1/src/distllm/terraform/__init__.py +260 -0
- distributed_llm-0.4.1/src/distllm/ui/__init__.py +7 -0
- distributed_llm-0.4.1/src/distllm/ui/app.py +98 -0
- distributed_llm-0.4.1/src/distllm/utils/__init__.py +0 -0
- distributed_llm-0.4.1/src/distllm/utils/gbnf_grammar.py +99 -0
- distributed_llm-0.4.1/src/distllm/utils/lazy_imports.py +90 -0
- distributed_llm-0.4.1/src/distllm/utils/scheduling.py +38 -0
- distributed_llm-0.4.1/src/distllm/verification/__init__.py +49 -0
- distributed_llm-0.4.1/src/distllm/verification/comparator.py +263 -0
- distributed_llm-0.4.1/src/distllm/verification/hash_registry.py +220 -0
- distributed_llm-0.4.1/src/distllm/verification/report.py +240 -0
- distributed_llm-0.4.1/src/distllm/verification/runner.py +822 -0
- distributed_llm-0.4.1/src/distllm/verification/test_verify.py +205 -0
- distributed_llm-0.4.1/src/distributed_llm.egg-info/PKG-INFO +315 -0
- distributed_llm-0.4.1/src/distributed_llm.egg-info/SOURCES.txt +851 -0
- distributed_llm-0.4.1/src/distributed_llm.egg-info/dependency_links.txt +1 -0
- distributed_llm-0.4.1/src/distributed_llm.egg-info/entry_points.txt +5 -0
- distributed_llm-0.4.1/src/distributed_llm.egg-info/requires.txt +136 -0
- distributed_llm-0.4.1/src/distributed_llm.egg-info/top_level.txt +1 -0
- distributed_llm-0.4.1/tests/test_c4_ci_testing_extra_regression.py +55 -0
- distributed_llm-0.4.1/tests/test_comprehensive.py +1706 -0
- distributed_llm-0.4.1/tests/test_cross_cloud_router.py +298 -0
- distributed_llm-0.4.1/tests/test_cross_platform.py +342 -0
- distributed_llm-0.4.1/tests/test_errors_retry.py +414 -0
- distributed_llm-0.4.1/tests/test_features_6_1_bugs.py +242 -0
- distributed_llm-0.4.1/tests/test_features_autopilot_privacy_plugins.py +246 -0
- distributed_llm-0.4.1/tests/test_features_fusion_prefetch.py +186 -0
- distributed_llm-0.4.1/tests/test_features_integration_cluster.py +234 -0
- distributed_llm-0.4.1/tests/test_features_integrations.py +160 -0
- distributed_llm-0.4.1/tests/test_features_modules_5_1.py +138 -0
- distributed_llm-0.4.1/tests/test_features_property.py +161 -0
- distributed_llm-0.4.1/tests/test_features_release_gates.py +390 -0
- distributed_llm-0.4.1/tests/test_features_sla_equivalence.py +137 -0
- distributed_llm-0.4.1/tests/test_gpu.py +166 -0
- distributed_llm-0.4.1/tests/test_high_severity_fixes.py +106 -0
- distributed_llm-0.4.1/tests/test_high_severity_fixes_2.py +198 -0
- distributed_llm-0.4.1/tests/test_high_severity_fixes_3.py +157 -0
- distributed_llm-0.4.1/tests/test_high_severity_gpu.py +171 -0
- distributed_llm-0.4.1/tests/test_integration_full.py +251 -0
- distributed_llm-0.4.1/tests/test_l6_ssrf_guard.py +31 -0
- distributed_llm-0.4.1/tests/test_marketplace.py +289 -0
- distributed_llm-0.4.1/tests/test_medium_money_preempt_dp.py +184 -0
- distributed_llm-0.4.1/tests/test_medium_severity_fixes.py +153 -0
- distributed_llm-0.4.1/tests/test_medium_severity_fixes_2.py +257 -0
- distributed_llm-0.4.1/tests/test_medium_severity_fixes_3.py +158 -0
- distributed_llm-0.4.1/tests/test_migrations.py +48 -0
- distributed_llm-0.4.1/tests/test_oidc_c2_regression.py +172 -0
- distributed_llm-0.4.1/tests/test_pipeline.py +332 -0
- distributed_llm-0.4.1/tests/test_replication_controller.py +77 -0
- distributed_llm-0.4.1/tests/test_reputation.py +140 -0
- distributed_llm-0.4.1/tests/test_review_table_h9_m6_hash.py +76 -0
- distributed_llm-0.4.1/tests/test_review_table_m17_m14_router.py +118 -0
- distributed_llm-0.4.1/tests/test_routing_chaos.py +165 -0
- distributed_llm-0.4.1/tests/test_routing_integration.py +154 -0
- distributed_llm-0.4.1/tests/test_routing_performance.py +90 -0
- distributed_llm-0.4.1/tests/test_routing_properties.py +144 -0
- distributed_llm-0.4.1/tests/test_routing_security.py +105 -0
- distributed_llm-0.4.1/tests/test_spec_verify_shared.py +136 -0
- distributed_llm-0.4.1/tests/test_speculative_auto.py +176 -0
- distributed_llm-0.4.1/tests/test_speculative_verify_index.py +189 -0
- distributed_llm-0.4.1/tests/test_stable_hashing.py +46 -0
- distributed_llm-0.4.1/tests/test_straggler_comprehensive.py +583 -0
- distributed_llm-0.4.1/tests/test_tenant_cost_money.py +43 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity.
|
|
18
|
+
|
|
19
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
20
|
+
exercising permissions granted by this License.
|
|
21
|
+
|
|
22
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
23
|
+
including but not limited to software source code, documentation
|
|
24
|
+
source, and configuration files.
|
|
25
|
+
|
|
26
|
+
"Object" form shall mean any form resulting from mechanical
|
|
27
|
+
transformation or translation of a Source form, including but
|
|
28
|
+
not limited to compiled object code, generated documentation,
|
|
29
|
+
and conversions to other media types.
|
|
30
|
+
|
|
31
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
32
|
+
Object form, made available under the License.
|
|
33
|
+
|
|
34
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
35
|
+
form, that is based on (or derived from) the Work.
|
|
36
|
+
|
|
37
|
+
"Contribution" shall mean any work of authorship, including
|
|
38
|
+
the original version of the Work and any modifications or additions
|
|
39
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
40
|
+
submitted to the Licensor.
|
|
41
|
+
|
|
42
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
43
|
+
on behalf of whom a Contribution has been received by Licensor.
|
|
44
|
+
|
|
45
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
46
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
47
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
48
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
49
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
50
|
+
Work and such Derivative Works in Source or Object form.
|
|
51
|
+
|
|
52
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
53
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
54
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
55
|
+
(except as stated in this section) patent license to make, have made,
|
|
56
|
+
use, offer to sell, sell, import, and otherwise transfer the Work.
|
|
57
|
+
|
|
58
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
59
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
60
|
+
modifications, provided that You meet the following conditions:
|
|
61
|
+
|
|
62
|
+
(a) You must give any other recipients of the Work or
|
|
63
|
+
Derivative Works a copy of this License; and
|
|
64
|
+
|
|
65
|
+
(b) You must cause any modified files to carry prominent notices
|
|
66
|
+
stating that You changed the files; and
|
|
67
|
+
|
|
68
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
69
|
+
that You distribute, all copyright, patent, trademark, and
|
|
70
|
+
attribution notices from the Source form of the Work; and
|
|
71
|
+
|
|
72
|
+
(d) You may add Your own copyright statement to Your modifications and
|
|
73
|
+
may provide additional or different license terms and conditions
|
|
74
|
+
for use, reproduction, or distribution of Your modifications.
|
|
75
|
+
|
|
76
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
77
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
78
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
79
|
+
this License.
|
|
80
|
+
|
|
81
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
82
|
+
names, trademarks, service marks, or product names of the Licensor.
|
|
83
|
+
|
|
84
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
85
|
+
agreed to in writing, Licensor provides the Work on an "AS IS" BASIS,
|
|
86
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND.
|
|
87
|
+
|
|
88
|
+
8. Limitation of Liability. In no event shall any Contributor be liable
|
|
89
|
+
to You for damages arising from use of the Work or inability to use
|
|
90
|
+
the Work.
|
|
91
|
+
|
|
92
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
93
|
+
the Work or Derivative Works thereof, You may offer to accept support,
|
|
94
|
+
warranty, indemnity, or other liability obligations consistent with
|
|
95
|
+
this License.
|
|
96
|
+
|
|
97
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: distributed-llm
|
|
3
|
+
Version: 0.4.1
|
|
4
|
+
Summary: Distributed LLM inference — pool GPUs across multiple devices to run models no single machine can handle
|
|
5
|
+
Author: Distributed LLM Contributors
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/distributed-llm/distributed-llm
|
|
8
|
+
Project-URL: Documentation, https://github.com/distributed-llm/distributed-llm#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/distributed-llm/distributed-llm
|
|
10
|
+
Project-URL: Issues, https://github.com/distributed-llm/distributed-llm/issues
|
|
11
|
+
Keywords: llm,inference,distributed,pipeline-parallelism,gpu-sharing,peer-to-peer,open-source
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
+
Classifier: Topic :: System :: Distributed Computing
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: fastapi>=0.109.0
|
|
27
|
+
Requires-Dist: uvicorn>=0.27.0
|
|
28
|
+
Requires-Dist: pydantic>=2.5.0
|
|
29
|
+
Requires-Dist: pydantic-settings>=2.0.0
|
|
30
|
+
Requires-Dist: httpx>=0.27
|
|
31
|
+
Requires-Dist: pyyaml>=6.0
|
|
32
|
+
Requires-Dist: loguru>=0.7.0
|
|
33
|
+
Requires-Dist: pyjwt>=2.0.0
|
|
34
|
+
Requires-Dist: numpy>=1.26.0
|
|
35
|
+
Requires-Dist: psutil>=5.9.0
|
|
36
|
+
Provides-Extra: observability
|
|
37
|
+
Requires-Dist: prometheus-client>=0.20; extra == "observability"
|
|
38
|
+
Requires-Dist: opentelemetry-api>=1.21.0; extra == "observability"
|
|
39
|
+
Requires-Dist: opentelemetry-sdk>=1.21.0; extra == "observability"
|
|
40
|
+
Requires-Dist: opentelemetry-exporter-prometheus>=0.42b0; extra == "observability"
|
|
41
|
+
Provides-Extra: self-hosted
|
|
42
|
+
Requires-Dist: torch>=2.5.0; extra == "self-hosted"
|
|
43
|
+
Requires-Dist: transformers>=4.48.0; extra == "self-hosted"
|
|
44
|
+
Requires-Dist: accelerate>=1.0.0; extra == "self-hosted"
|
|
45
|
+
Requires-Dist: safetensors>=0.4.0; extra == "self-hosted"
|
|
46
|
+
Requires-Dist: huggingface-hub>=0.20.0; extra == "self-hosted"
|
|
47
|
+
Requires-Dist: sentencepiece>=0.1.99; extra == "self-hosted"
|
|
48
|
+
Requires-Dist: nvidia-ml-py>=12.0; extra == "self-hosted"
|
|
49
|
+
Provides-Extra: ray
|
|
50
|
+
Requires-Dist: ray[default]>=2.30.0; extra == "ray"
|
|
51
|
+
Provides-Extra: backends
|
|
52
|
+
Requires-Dist: vllm<0.9.0,>=0.7.0; extra == "backends"
|
|
53
|
+
Requires-Dist: sglang<0.5.0,>=0.4.0; extra == "backends"
|
|
54
|
+
Requires-Dist: llama-cpp-python>=0.3.0; extra == "backends"
|
|
55
|
+
Provides-Extra: dev
|
|
56
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
57
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
58
|
+
Requires-Dist: hypothesis>=6.90; extra == "dev"
|
|
59
|
+
Requires-Dist: pytest-benchmark>=4.0; extra == "dev"
|
|
60
|
+
Requires-Dist: black>=24.0; extra == "dev"
|
|
61
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
62
|
+
Requires-Dist: mypy>=1.8; extra == "dev"
|
|
63
|
+
Requires-Dist: opentelemetry-test-utils>=0.42b0; extra == "dev"
|
|
64
|
+
Requires-Dist: bandit[toml]>=1.7; extra == "dev"
|
|
65
|
+
Requires-Dist: detect-secrets>=1.5; extra == "dev"
|
|
66
|
+
Provides-Extra: sdk
|
|
67
|
+
Requires-Dist: httpx>=0.27.0; extra == "sdk"
|
|
68
|
+
Provides-Extra: cli
|
|
69
|
+
Requires-Dist: typer[all]>=0.9.0; extra == "cli"
|
|
70
|
+
Requires-Dist: rich>=13.7.0; extra == "cli"
|
|
71
|
+
Requires-Dist: prompt_toolkit>=3.0.0; extra == "cli"
|
|
72
|
+
Provides-Extra: ui
|
|
73
|
+
Requires-Dist: jinja2>=3.1.0; extra == "ui"
|
|
74
|
+
Requires-Dist: python-multipart>=0.0.6; extra == "ui"
|
|
75
|
+
Requires-Dist: qrcode[pil]>=7.4; extra == "ui"
|
|
76
|
+
Provides-Extra: examples
|
|
77
|
+
Requires-Dist: langchain-openai>=0.1.0; extra == "examples"
|
|
78
|
+
Requires-Dist: langchain-core>=0.1.0; extra == "examples"
|
|
79
|
+
Requires-Dist: llama-index-llms-openai>=0.1.0; extra == "examples"
|
|
80
|
+
Requires-Dist: llama-index-core>=0.10.0; extra == "examples"
|
|
81
|
+
Requires-Dist: crewai>=0.30.0; extra == "examples"
|
|
82
|
+
Provides-Extra: security
|
|
83
|
+
Requires-Dist: cryptography>=41.0; extra == "security"
|
|
84
|
+
Requires-Dist: pynacl>=1.5.0; extra == "security"
|
|
85
|
+
Provides-Extra: moderation
|
|
86
|
+
Requires-Dist: transformers>=4.36.0; extra == "moderation"
|
|
87
|
+
Requires-Dist: onnxruntime>=1.16.0; extra == "moderation"
|
|
88
|
+
Provides-Extra: mlflow
|
|
89
|
+
Requires-Dist: mlflow>=2.0.0; extra == "mlflow"
|
|
90
|
+
Provides-Extra: monitoring
|
|
91
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.21.0; extra == "monitoring"
|
|
92
|
+
Requires-Dist: opentelemetry-proto>=1.21.0; extra == "monitoring"
|
|
93
|
+
Requires-Dist: nvidia-ml-py>=12.0; extra == "monitoring"
|
|
94
|
+
Requires-Dist: psutil>=5.9.0; extra == "monitoring"
|
|
95
|
+
Provides-Extra: model-extras
|
|
96
|
+
Requires-Dist: bitsandbytes>=0.41.0; extra == "model-extras"
|
|
97
|
+
Requires-Dist: peft>=0.14.0; extra == "model-extras"
|
|
98
|
+
Provides-Extra: wan
|
|
99
|
+
Requires-Dist: aioquic>=1.0.0; extra == "wan"
|
|
100
|
+
Provides-Extra: wandb
|
|
101
|
+
Requires-Dist: wandb>=0.18; extra == "wandb"
|
|
102
|
+
Requires-Dist: nvidia-ml-py>=12.0; extra == "wandb"
|
|
103
|
+
Provides-Extra: spark
|
|
104
|
+
Requires-Dist: pyspark>=3.4.0; extra == "spark"
|
|
105
|
+
Provides-Extra: spark-mlflow
|
|
106
|
+
Requires-Dist: distributed-llm[mlflow,spark]; extra == "spark-mlflow"
|
|
107
|
+
Provides-Extra: openai-agents
|
|
108
|
+
Requires-Dist: openai-agents>=0.1.0; extra == "openai-agents"
|
|
109
|
+
Requires-Dist: openai>=1.0.0; extra == "openai-agents"
|
|
110
|
+
Provides-Extra: agno
|
|
111
|
+
Requires-Dist: agno>=1.0.0; extra == "agno"
|
|
112
|
+
Provides-Extra: autogpt
|
|
113
|
+
Requires-Dist: autogpt>=0.4.0; extra == "autogpt"
|
|
114
|
+
Provides-Extra: vector-db-pinecone
|
|
115
|
+
Requires-Dist: pinecone>=3.0.0; extra == "vector-db-pinecone"
|
|
116
|
+
Provides-Extra: vector-db-qdrant
|
|
117
|
+
Requires-Dist: qdrant-client>=1.9.0; extra == "vector-db-qdrant"
|
|
118
|
+
Provides-Extra: vector-db-weaviate
|
|
119
|
+
Requires-Dist: weaviate-client>=4.0.0; extra == "vector-db-weaviate"
|
|
120
|
+
Provides-Extra: vector-db-milvus
|
|
121
|
+
Requires-Dist: pymilvus>=2.3.0; extra == "vector-db-milvus"
|
|
122
|
+
Provides-Extra: vector-db-all
|
|
123
|
+
Requires-Dist: distributed-llm[vector-db-milvus,vector-db-pinecone,vector-db-qdrant,vector-db-weaviate]; extra == "vector-db-all"
|
|
124
|
+
Provides-Extra: spot
|
|
125
|
+
Requires-Dist: httpx>=0.27; extra == "spot"
|
|
126
|
+
Provides-Extra: all
|
|
127
|
+
Requires-Dist: distributed-llm[agno,autogpt,backends,cli,examples,mlflow,observability,openai-agents,ray,sdk,security,self-hosted,spark,spot,ui,wan]; extra == "all"
|
|
128
|
+
Requires-Dist: distributed-llm[model-extras]; extra == "all"
|
|
129
|
+
Provides-Extra: all-dev
|
|
130
|
+
Requires-Dist: distributed-llm[all,dev]; extra == "all-dev"
|
|
131
|
+
Requires-Dist: locust>=2.20; extra == "all-dev"
|
|
132
|
+
Requires-Dist: safety>=3.0; extra == "all-dev"
|
|
133
|
+
Dynamic: license-file
|
|
134
|
+
|
|
135
|
+
# DistLLM — Distributed Inference Across All Your Devices
|
|
136
|
+
|
|
137
|
+
**Pool GPUs from every device you own to run models no single machine can handle.**
|
|
138
|
+
|
|
139
|
+
[](LICENSE)
|
|
140
|
+
[](https://www.python.org/downloads/)
|
|
141
|
+
|
|
142
|
+
You have a gaming PC with an RTX 4090. Your laptop has an RTX 4060. Your friend has a desktop with an RTX 3080. None of you can run Llama 3.1 70B alone. **Together, you can.**
|
|
143
|
+
|
|
144
|
+
DistLLM splits large language models across all your devices using pipeline parallelism. Each device runs a fraction of the model layers. Automatic discovery. Auto-partitioning. Works over LAN, WiFi, or internet.
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
Your Laptop (RTX 4060) ────┐
|
|
148
|
+
│
|
|
149
|
+
Your Gaming PC (RTX 4090) ──┼──► DistLLM Cluster ──► Run 70B models
|
|
150
|
+
│
|
|
151
|
+
Friend's PC (RTX 3080) ────┘
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Why DistLLM?
|
|
155
|
+
|
|
156
|
+
| Problem | Solution |
|
|
157
|
+
|---------|----------|
|
|
158
|
+
| One GPU can't run today's best models | Split across all your devices |
|
|
159
|
+
| Cloud inference costs thousands/month | Use the GPUs you already own |
|
|
160
|
+
| Data privacy concerns with cloud APIs | Your data stays on your devices |
|
|
161
|
+
| Slow single-device inference | Pipeline parallelism = faster generation |
|
|
162
|
+
| Setting up distributed systems is hard | One command to start, one to join |
|
|
163
|
+
|
|
164
|
+
## Quick Start
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
pip install distllm
|
|
168
|
+
|
|
169
|
+
# On your main machine — start a cluster
|
|
170
|
+
distllm cluster start --model meta-llama/Llama-3.2-7B
|
|
171
|
+
|
|
172
|
+
# On every other machine — join the cluster
|
|
173
|
+
distllm cluster join
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## How It Works
|
|
177
|
+
|
|
178
|
+
DistLLM uses **pipeline parallelism** — the model is split across devices by layers:
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
Device 1 (Laptop): Layers 0-5 ──→ Device 2 (Desktop): Layers 6-11 ──→ Device 3 (Friend's PC): Layers 12-17
|
|
182
|
+
|
|
183
|
+
Each device runs ~6 layers → fits in 6-8GB VRAM
|
|
184
|
+
Combined pool → runs models up to 70B parameters
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Key capabilities:
|
|
188
|
+
- **Auto-discovery**: devices find each other on the same network automatically
|
|
189
|
+
- **Auto-partitioning**: automatically assigns layers based on each device's GPU
|
|
190
|
+
- **Node recovery**: if a device disconnects, remaining nodes take over
|
|
191
|
+
- **Straggler detection**: slow nodes are detected and worked around
|
|
192
|
+
- **WAN optimization**: token accumulation for low-latency cross-internet inference
|
|
193
|
+
- **Privacy-first**: keep sensitive layers on your own devices
|
|
194
|
+
|
|
195
|
+
## Installation
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# Core package
|
|
199
|
+
pip install distllm
|
|
200
|
+
|
|
201
|
+
# With vLLM backend (recommended for NVIDIA GPUs)
|
|
202
|
+
pip install "distllm[vllm]"
|
|
203
|
+
|
|
204
|
+
# With llama.cpp backend (CPU, AMD, Apple Silicon)
|
|
205
|
+
pip install "distllm[llamacpp]"
|
|
206
|
+
|
|
207
|
+
# Development
|
|
208
|
+
pip install -e ".[dev]"
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Key Features
|
|
212
|
+
|
|
213
|
+
- **Pipeline parallelism** — split any HuggingFace model across N devices
|
|
214
|
+
- **Auto-discovery** — mDNS/zeroconf device finding on LAN
|
|
215
|
+
- **6 backends** — vLLM, llama.cpp, TensorRT-LLM, ExLlamaV2, ONNX, PyTorch
|
|
216
|
+
- **Auth plugin** — JWT authentication + RBAC role-based access control
|
|
217
|
+
- **Health watchdog** — Continuous node health monitoring with auto circuit-breaking
|
|
218
|
+
- **Semantic caching** — Deduplicate repeated prompts with embedding similarity
|
|
219
|
+
- **Token streaming** — `generate_stream()` for real-time token-by-token responses
|
|
220
|
+
- **Config validation** — Cross-field validation catches invalid combinations at load time
|
|
221
|
+
- **Circuit breaker** — Graduated backpressure for load shedding
|
|
222
|
+
- **Auto-partitioning** — hardware-aware DP solver for optimal layer assignment
|
|
223
|
+
- **Node recovery** — checkpoint-based recovery when nodes disconnect
|
|
224
|
+
- **Straggler detection** — statistical outlier detection for slow nodes
|
|
225
|
+
- **Dynamic rebalancing** — redistribute layers when nodes join/leave
|
|
226
|
+
- **P2P KV cache gossip** — CRDT-based cache sharing between nodes
|
|
227
|
+
- **Wide-area support** — token accumulation for internet-scale inference
|
|
228
|
+
- **Quantization** — 4-bit/8-bit to fit larger models on consumer GPUs
|
|
229
|
+
- **OpenAI-compatible API** — use any OpenAI client to send requests
|
|
230
|
+
- **Full observability** — Prometheus metrics, OTel tracing, structured logging
|
|
231
|
+
- **Interactive chat** — `distllm chat` for CLI-based interaction
|
|
232
|
+
- **Auth plugin** — JWT authentication with RBAC role-based access control
|
|
233
|
+
- **Health watchdog** — continuous node health monitoring with automatic failover
|
|
234
|
+
- **Semantic cache** — caching plugin with deduplication for repeated prompts
|
|
235
|
+
- **Token streaming** — `generate_stream()` SDK method for token-by-token responses
|
|
236
|
+
- **Health endpoints** — `/healthz` (liveness) and `/readyz` (readiness) for Kubernetes probes
|
|
237
|
+
|
|
238
|
+
## CLI Commands
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
# Start a coordinator node
|
|
242
|
+
distllm-coordinator --model meta-llama/Llama-3.2-1B --local --chat
|
|
243
|
+
|
|
244
|
+
# Start distributed coordinator
|
|
245
|
+
distllm-coordinator --model meta-llama/Llama-3.2-7B \
|
|
246
|
+
--nodes laptop:50051:0:5 desktop:50052:6:11 friend:50053:12:17
|
|
247
|
+
|
|
248
|
+
# Start a worker node
|
|
249
|
+
distllm-node --node-id laptop --model meta-llama/Llama-3.2-7B \
|
|
250
|
+
--start-layer 0 --end-layer 5 --total-layers 18 \
|
|
251
|
+
--coordinator-host 192.168.1.100 --coordinator-port 50050
|
|
252
|
+
|
|
253
|
+
# Start the REST API server
|
|
254
|
+
distllm-api --model meta-llama/Llama-3.2-1B --local
|
|
255
|
+
|
|
256
|
+
# System diagnostics (check Python, CUDA, GPU, network, ports)
|
|
257
|
+
distllm doctor
|
|
258
|
+
|
|
259
|
+
# Quantize a model for smaller footprint
|
|
260
|
+
distllm tune quantize --model meta-llama/Llama-3.2-7B --bits 4
|
|
261
|
+
|
|
262
|
+
# Batch inference over a dataset
|
|
263
|
+
distllm tune batch --input prompts.jsonl --output results.jsonl
|
|
264
|
+
|
|
265
|
+
# Warm the semantic cache from prior prompts
|
|
266
|
+
distllm tune cache --preload cache_seed.jsonl
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## Documentation
|
|
270
|
+
|
|
271
|
+
- [Architecture](docs/architecture.md) — Pipeline parallelism, node topology, KV cache management
|
|
272
|
+
- [Deployment](DEPLOYMENT.md) — Local, Docker, and multi-machine deployment
|
|
273
|
+
- [API Reference](docs/api.md) — OpenAI-compatible API docs
|
|
274
|
+
|
|
275
|
+
## Project Structure
|
|
276
|
+
|
|
277
|
+
```
|
|
278
|
+
src/distllm/
|
|
279
|
+
├── core/ # Coordinator, request pipeline, batch scheduler
|
|
280
|
+
├── dist/ # Distributed inference engine
|
|
281
|
+
│ ├── pipeline.py # PipelineOrchestrator — multi-node execution
|
|
282
|
+
│ ├── worker.py # WorkerNode — per-device model subset
|
|
283
|
+
│ ├── recovery.py # NodeRecoveryManager — failure handling
|
|
284
|
+
│ ├── straggler.py # StragglerDetector — slow node detection
|
|
285
|
+
│ ├── rebalancer.py # Dynamic pipeline rebalancing
|
|
286
|
+
│ ├── wide_area.py # WAN-optimized inference
|
|
287
|
+
│ ├── parallel.py # Hybrid parallelism auto-selector
|
|
288
|
+
│ ├── p2p/ # P2P gossip protocol & discovery
|
|
289
|
+
│ └── partition/ # Hardware-aware auto-partitioner
|
|
290
|
+
├── api/ # OpenAI-compatible REST API
|
|
291
|
+
├── models/ # Model partitioning & loading
|
|
292
|
+
├── cli/ # CLI tool
|
|
293
|
+
├── sdk/ # Python client
|
|
294
|
+
├── observability/ # Metrics, tracing, logging
|
|
295
|
+
└── dashboard/ # Web dashboard
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Supported Model Architectures
|
|
299
|
+
|
|
300
|
+
GPT-2, GPT-Neo, Llama 2/3, Mistral, Mixtral, Qwen2.5, Phi, DeepSeek, StableLM, Pythia, Baichuan, ChatGLM, InternLM, and more via HuggingFace AutoModel.
|
|
301
|
+
|
|
302
|
+
## Roadmap
|
|
303
|
+
|
|
304
|
+
- **Current**: Pipeline parallelism across LAN devices, manual node configuration
|
|
305
|
+
- **Q3 2026**: Auto-discovery (mDNS), auto-partitioning, node recovery, GUI dashboard
|
|
306
|
+
- **Q4 2026**: NAT traversal (cross-internet), P2P model distribution, GPU reputation system
|
|
307
|
+
- **2027**: Federated clusters, speculative parallelism, privacy-preserving split, incentive system
|
|
308
|
+
|
|
309
|
+
## Contributing
|
|
310
|
+
|
|
311
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
312
|
+
|
|
313
|
+
## License
|
|
314
|
+
|
|
315
|
+
Apache 2.0. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# DistLLM — Distributed Inference Across All Your Devices
|
|
2
|
+
|
|
3
|
+
**Pool GPUs from every device you own to run models no single machine can handle.**
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://www.python.org/downloads/)
|
|
7
|
+
|
|
8
|
+
You have a gaming PC with an RTX 4090. Your laptop has an RTX 4060. Your friend has a desktop with an RTX 3080. None of you can run Llama 3.1 70B alone. **Together, you can.**
|
|
9
|
+
|
|
10
|
+
DistLLM splits large language models across all your devices using pipeline parallelism. Each device runs a fraction of the model layers. Automatic discovery. Auto-partitioning. Works over LAN, WiFi, or internet.
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
Your Laptop (RTX 4060) ────┐
|
|
14
|
+
│
|
|
15
|
+
Your Gaming PC (RTX 4090) ──┼──► DistLLM Cluster ──► Run 70B models
|
|
16
|
+
│
|
|
17
|
+
Friend's PC (RTX 3080) ────┘
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Why DistLLM?
|
|
21
|
+
|
|
22
|
+
| Problem | Solution |
|
|
23
|
+
|---------|----------|
|
|
24
|
+
| One GPU can't run today's best models | Split across all your devices |
|
|
25
|
+
| Cloud inference costs thousands/month | Use the GPUs you already own |
|
|
26
|
+
| Data privacy concerns with cloud APIs | Your data stays on your devices |
|
|
27
|
+
| Slow single-device inference | Pipeline parallelism = faster generation |
|
|
28
|
+
| Setting up distributed systems is hard | One command to start, one to join |
|
|
29
|
+
|
|
30
|
+
## Quick Start
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install distllm
|
|
34
|
+
|
|
35
|
+
# On your main machine — start a cluster
|
|
36
|
+
distllm cluster start --model meta-llama/Llama-3.2-7B
|
|
37
|
+
|
|
38
|
+
# On every other machine — join the cluster
|
|
39
|
+
distllm cluster join
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## How It Works
|
|
43
|
+
|
|
44
|
+
DistLLM uses **pipeline parallelism** — the model is split across devices by layers:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Device 1 (Laptop): Layers 0-5 ──→ Device 2 (Desktop): Layers 6-11 ──→ Device 3 (Friend's PC): Layers 12-17
|
|
48
|
+
|
|
49
|
+
Each device runs ~6 layers → fits in 6-8GB VRAM
|
|
50
|
+
Combined pool → runs models up to 70B parameters
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Key capabilities:
|
|
54
|
+
- **Auto-discovery**: devices find each other on the same network automatically
|
|
55
|
+
- **Auto-partitioning**: automatically assigns layers based on each device's GPU
|
|
56
|
+
- **Node recovery**: if a device disconnects, remaining nodes take over
|
|
57
|
+
- **Straggler detection**: slow nodes are detected and worked around
|
|
58
|
+
- **WAN optimization**: token accumulation for low-latency cross-internet inference
|
|
59
|
+
- **Privacy-first**: keep sensitive layers on your own devices
|
|
60
|
+
|
|
61
|
+
## Installation
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Core package
|
|
65
|
+
pip install distllm
|
|
66
|
+
|
|
67
|
+
# With vLLM backend (recommended for NVIDIA GPUs)
|
|
68
|
+
pip install "distllm[vllm]"
|
|
69
|
+
|
|
70
|
+
# With llama.cpp backend (CPU, AMD, Apple Silicon)
|
|
71
|
+
pip install "distllm[llamacpp]"
|
|
72
|
+
|
|
73
|
+
# Development
|
|
74
|
+
pip install -e ".[dev]"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Key Features
|
|
78
|
+
|
|
79
|
+
- **Pipeline parallelism** — split any HuggingFace model across N devices
|
|
80
|
+
- **Auto-discovery** — mDNS/zeroconf device finding on LAN
|
|
81
|
+
- **6 backends** — vLLM, llama.cpp, TensorRT-LLM, ExLlamaV2, ONNX, PyTorch
|
|
82
|
+
- **Auth plugin** — JWT authentication + RBAC role-based access control
|
|
83
|
+
- **Health watchdog** — Continuous node health monitoring with auto circuit-breaking
|
|
84
|
+
- **Semantic caching** — Deduplicate repeated prompts with embedding similarity
|
|
85
|
+
- **Token streaming** — `generate_stream()` for real-time token-by-token responses
|
|
86
|
+
- **Config validation** — Cross-field validation catches invalid combinations at load time
|
|
87
|
+
- **Circuit breaker** — Graduated backpressure for load shedding
|
|
88
|
+
- **Auto-partitioning** — hardware-aware DP solver for optimal layer assignment
|
|
89
|
+
- **Node recovery** — checkpoint-based recovery when nodes disconnect
|
|
90
|
+
- **Straggler detection** — statistical outlier detection for slow nodes
|
|
91
|
+
- **Dynamic rebalancing** — redistribute layers when nodes join/leave
|
|
92
|
+
- **P2P KV cache gossip** — CRDT-based cache sharing between nodes
|
|
93
|
+
- **Wide-area support** — token accumulation for internet-scale inference
|
|
94
|
+
- **Quantization** — 4-bit/8-bit to fit larger models on consumer GPUs
|
|
95
|
+
- **OpenAI-compatible API** — use any OpenAI client to send requests
|
|
96
|
+
- **Full observability** — Prometheus metrics, OTel tracing, structured logging
|
|
97
|
+
- **Interactive chat** — `distllm chat` for CLI-based interaction
|
|
98
|
+
- **Auth plugin** — JWT authentication with RBAC role-based access control
|
|
99
|
+
- **Health watchdog** — continuous node health monitoring with automatic failover
|
|
100
|
+
- **Semantic cache** — caching plugin with deduplication for repeated prompts
|
|
101
|
+
- **Token streaming** — `generate_stream()` SDK method for token-by-token responses
|
|
102
|
+
- **Health endpoints** — `/healthz` (liveness) and `/readyz` (readiness) for Kubernetes probes
|
|
103
|
+
|
|
104
|
+
## CLI Commands
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Start a coordinator node
|
|
108
|
+
distllm-coordinator --model meta-llama/Llama-3.2-1B --local --chat
|
|
109
|
+
|
|
110
|
+
# Start distributed coordinator
|
|
111
|
+
distllm-coordinator --model meta-llama/Llama-3.2-7B \
|
|
112
|
+
--nodes laptop:50051:0:5 desktop:50052:6:11 friend:50053:12:17
|
|
113
|
+
|
|
114
|
+
# Start a worker node
|
|
115
|
+
distllm-node --node-id laptop --model meta-llama/Llama-3.2-7B \
|
|
116
|
+
--start-layer 0 --end-layer 5 --total-layers 18 \
|
|
117
|
+
--coordinator-host 192.168.1.100 --coordinator-port 50050
|
|
118
|
+
|
|
119
|
+
# Start the REST API server
|
|
120
|
+
distllm-api --model meta-llama/Llama-3.2-1B --local
|
|
121
|
+
|
|
122
|
+
# System diagnostics (check Python, CUDA, GPU, network, ports)
|
|
123
|
+
distllm doctor
|
|
124
|
+
|
|
125
|
+
# Quantize a model for smaller footprint
|
|
126
|
+
distllm tune quantize --model meta-llama/Llama-3.2-7B --bits 4
|
|
127
|
+
|
|
128
|
+
# Batch inference over a dataset
|
|
129
|
+
distllm tune batch --input prompts.jsonl --output results.jsonl
|
|
130
|
+
|
|
131
|
+
# Warm the semantic cache from prior prompts
|
|
132
|
+
distllm tune cache --preload cache_seed.jsonl
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Documentation
|
|
136
|
+
|
|
137
|
+
- [Architecture](docs/architecture.md) — Pipeline parallelism, node topology, KV cache management
|
|
138
|
+
- [Deployment](DEPLOYMENT.md) — Local, Docker, and multi-machine deployment
|
|
139
|
+
- [API Reference](docs/api.md) — OpenAI-compatible API docs
|
|
140
|
+
|
|
141
|
+
## Project Structure
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
src/distllm/
|
|
145
|
+
├── core/ # Coordinator, request pipeline, batch scheduler
|
|
146
|
+
├── dist/ # Distributed inference engine
|
|
147
|
+
│ ├── pipeline.py # PipelineOrchestrator — multi-node execution
|
|
148
|
+
│ ├── worker.py # WorkerNode — per-device model subset
|
|
149
|
+
│ ├── recovery.py # NodeRecoveryManager — failure handling
|
|
150
|
+
│ ├── straggler.py # StragglerDetector — slow node detection
|
|
151
|
+
│ ├── rebalancer.py # Dynamic pipeline rebalancing
|
|
152
|
+
│ ├── wide_area.py # WAN-optimized inference
|
|
153
|
+
│ ├── parallel.py # Hybrid parallelism auto-selector
|
|
154
|
+
│ ├── p2p/ # P2P gossip protocol & discovery
|
|
155
|
+
│ └── partition/ # Hardware-aware auto-partitioner
|
|
156
|
+
├── api/ # OpenAI-compatible REST API
|
|
157
|
+
├── models/ # Model partitioning & loading
|
|
158
|
+
├── cli/ # CLI tool
|
|
159
|
+
├── sdk/ # Python client
|
|
160
|
+
├── observability/ # Metrics, tracing, logging
|
|
161
|
+
└── dashboard/ # Web dashboard
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Supported Model Architectures
|
|
165
|
+
|
|
166
|
+
GPT-2, GPT-Neo, Llama 2/3, Mistral, Mixtral, Qwen2.5, Phi, DeepSeek, StableLM, Pythia, Baichuan, ChatGLM, InternLM, and more via HuggingFace AutoModel.
|
|
167
|
+
|
|
168
|
+
## Roadmap
|
|
169
|
+
|
|
170
|
+
- **Current**: Pipeline parallelism across LAN devices, manual node configuration
|
|
171
|
+
- **Q3 2026**: Auto-discovery (mDNS), auto-partitioning, node recovery, GUI dashboard
|
|
172
|
+
- **Q4 2026**: NAT traversal (cross-internet), P2P model distribution, GPU reputation system
|
|
173
|
+
- **2027**: Federated clusters, speculative parallelism, privacy-preserving split, incentive system
|
|
174
|
+
|
|
175
|
+
## Contributing
|
|
176
|
+
|
|
177
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
178
|
+
|
|
179
|
+
## License
|
|
180
|
+
|
|
181
|
+
Apache 2.0. See [LICENSE](LICENSE).
|