sglang 0.5.2rc2__py3-none-any.whl → 0.5.3rc2__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.
- sglang/bench_one_batch.py +7 -9
- sglang/bench_one_batch_server.py +330 -31
- sglang/bench_serving.py +267 -32
- sglang/global_config.py +2 -2
- sglang/lang/backend/runtime_endpoint.py +1 -1
- sglang/launch_server.py +14 -0
- sglang/profiler.py +2 -2
- sglang/srt/batch_invariant_ops/__init__.py +27 -0
- sglang/srt/batch_invariant_ops/batch_invariant_ops.py +549 -0
- sglang/srt/configs/__init__.py +8 -0
- sglang/srt/configs/device_config.py +3 -1
- sglang/srt/configs/dots_ocr.py +64 -0
- sglang/srt/configs/dots_vlm.py +139 -0
- sglang/srt/configs/falcon_h1.py +360 -0
- sglang/srt/configs/load_config.py +9 -0
- sglang/srt/configs/model_config.py +181 -82
- sglang/srt/configs/qwen3_next.py +326 -0
- sglang/srt/configs/qwen3_vl.py +586 -0
- sglang/srt/connector/__init__.py +8 -1
- sglang/srt/connector/remote_instance.py +82 -0
- sglang/srt/constrained/base_grammar_backend.py +49 -12
- sglang/srt/constrained/llguidance_backend.py +0 -1
- sglang/srt/constrained/outlines_backend.py +0 -1
- sglang/srt/constrained/outlines_jump_forward.py +1 -1
- sglang/srt/constrained/xgrammar_backend.py +30 -9
- sglang/srt/custom_op.py +11 -1
- sglang/srt/debug_utils/dump_comparator.py +81 -44
- sglang/srt/debug_utils/dump_loader.py +97 -0
- sglang/srt/debug_utils/dumper.py +21 -6
- sglang/srt/debug_utils/text_comparator.py +73 -11
- sglang/srt/disaggregation/ascend/conn.py +2 -2
- sglang/srt/disaggregation/ascend/transfer_engine.py +47 -9
- sglang/srt/disaggregation/base/conn.py +1 -1
- sglang/srt/disaggregation/common/conn.py +279 -108
- sglang/srt/disaggregation/decode.py +71 -19
- sglang/srt/disaggregation/decode_kvcache_offload_manager.py +185 -0
- sglang/srt/disaggregation/decode_schedule_batch_mixin.py +29 -17
- sglang/srt/disaggregation/fake/conn.py +1 -1
- sglang/srt/disaggregation/mini_lb.py +6 -445
- sglang/srt/disaggregation/mooncake/conn.py +55 -537
- sglang/srt/disaggregation/nixl/conn.py +326 -53
- sglang/srt/disaggregation/prefill.py +36 -17
- sglang/srt/disaggregation/utils.py +40 -54
- sglang/srt/distributed/device_communicators/all_reduce_utils.py +16 -0
- sglang/srt/distributed/device_communicators/shm_broadcast.py +4 -2
- sglang/srt/distributed/device_communicators/symm_mem.py +164 -0
- sglang/srt/distributed/parallel_state.py +156 -80
- sglang/srt/entrypoints/engine.py +59 -18
- sglang/srt/entrypoints/grpc_request_manager.py +855 -0
- sglang/srt/entrypoints/grpc_server.py +810 -0
- sglang/srt/entrypoints/http_server.py +130 -59
- sglang/srt/entrypoints/openai/protocol.py +112 -4
- sglang/srt/entrypoints/openai/serving_base.py +65 -3
- sglang/srt/entrypoints/openai/serving_chat.py +204 -55
- sglang/srt/entrypoints/openai/serving_completions.py +14 -3
- sglang/srt/entrypoints/openai/serving_embedding.py +9 -3
- sglang/srt/entrypoints/openai/serving_rerank.py +3 -1
- sglang/srt/entrypoints/openai/serving_responses.py +48 -3
- sglang/srt/entrypoints/openai/serving_score.py +1 -0
- sglang/srt/environ.py +285 -0
- sglang/srt/eplb/eplb_manager.py +2 -2
- sglang/srt/eplb/expert_distribution.py +26 -13
- sglang/srt/eplb/expert_location.py +38 -8
- sglang/srt/eplb/expert_location_updater.py +1 -1
- sglang/srt/function_call/base_format_detector.py +3 -6
- sglang/srt/function_call/ebnf_composer.py +11 -9
- sglang/srt/function_call/function_call_parser.py +9 -2
- sglang/srt/function_call/glm4_moe_detector.py +4 -4
- sglang/srt/function_call/gpt_oss_detector.py +23 -0
- sglang/srt/function_call/json_array_parser.py +63 -0
- sglang/srt/function_call/kimik2_detector.py +17 -4
- sglang/srt/function_call/qwen3_coder_detector.py +1 -1
- sglang/srt/function_call/utils.py +96 -5
- sglang/srt/grpc/__init__.py +1 -0
- sglang/srt/grpc/compile_proto.py +245 -0
- sglang/srt/grpc/sglang_scheduler_pb2.py +111 -0
- sglang/srt/grpc/sglang_scheduler_pb2.pyi +434 -0
- sglang/srt/grpc/sglang_scheduler_pb2_grpc.py +239 -0
- sglang/srt/layers/activation.py +143 -9
- sglang/srt/layers/attention/aiter_backend.py +14 -15
- sglang/srt/layers/attention/ascend_backend.py +115 -9
- sglang/srt/layers/attention/attention_registry.py +206 -0
- sglang/srt/layers/attention/base_attn_backend.py +12 -3
- sglang/srt/layers/attention/cutlass_mla_backend.py +3 -3
- sglang/srt/layers/attention/dual_chunk_flashattention_backend.py +1 -1
- sglang/srt/layers/attention/fla/chunk.py +242 -0
- sglang/srt/layers/attention/fla/chunk_delta_h.py +314 -0
- sglang/srt/layers/attention/fla/chunk_o.py +178 -0
- sglang/srt/layers/attention/fla/chunk_scaled_dot_kkt.py +151 -0
- sglang/srt/layers/attention/fla/cumsum.py +300 -0
- sglang/srt/layers/attention/fla/fused_recurrent.py +640 -0
- sglang/srt/layers/attention/fla/fused_sigmoid_gating_recurrent.py +232 -0
- sglang/srt/layers/attention/fla/index.py +37 -0
- sglang/srt/layers/attention/fla/l2norm.py +150 -0
- sglang/srt/layers/attention/fla/layernorm_gated.py +326 -0
- sglang/srt/layers/attention/fla/op.py +66 -0
- sglang/srt/layers/attention/fla/solve_tril.py +465 -0
- sglang/srt/layers/attention/fla/utils.py +331 -0
- sglang/srt/layers/attention/fla/wy_fast.py +158 -0
- sglang/srt/layers/attention/flashattention_backend.py +41 -8
- sglang/srt/layers/attention/flashinfer_backend.py +118 -198
- sglang/srt/layers/attention/flashinfer_mla_backend.py +27 -27
- sglang/srt/layers/attention/flashmla_backend.py +7 -5
- sglang/srt/layers/attention/hybrid_attn_backend.py +68 -53
- sglang/srt/layers/attention/hybrid_linear_attn_backend.py +602 -0
- sglang/srt/layers/attention/intel_amx_backend.py +3 -0
- sglang/srt/layers/attention/mamba/causal_conv1d.py +129 -0
- sglang/srt/layers/attention/mamba/causal_conv1d_triton.py +969 -0
- sglang/srt/layers/attention/mamba/mamba.py +629 -0
- sglang/srt/layers/attention/mamba/mamba_utils.py +81 -0
- sglang/srt/layers/attention/mamba/ops/__init__.py +2 -0
- sglang/srt/layers/attention/mamba/ops/layernorm_gated.py +172 -0
- sglang/srt/layers/attention/mamba/ops/mamba_ssm.py +442 -0
- sglang/srt/layers/attention/mamba/ops/ssd_bmm.py +264 -0
- sglang/srt/layers/attention/mamba/ops/ssd_chunk_scan.py +622 -0
- sglang/srt/layers/attention/mamba/ops/ssd_chunk_state.py +757 -0
- sglang/srt/layers/attention/mamba/ops/ssd_combined.py +262 -0
- sglang/srt/layers/attention/mamba/ops/ssd_state_passing.py +275 -0
- sglang/srt/layers/attention/npu_ops/mla_preprocess.py +393 -0
- sglang/srt/layers/attention/nsa/dequant_k_cache.py +163 -0
- sglang/srt/layers/attention/nsa/index_buf_accessor.py +354 -0
- sglang/srt/layers/attention/nsa/nsa_indexer.py +761 -0
- sglang/srt/layers/attention/nsa/quant_k_cache.py +255 -0
- sglang/srt/layers/attention/nsa/tilelang_kernel.py +785 -0
- sglang/srt/layers/attention/nsa/transform_index.py +144 -0
- sglang/srt/layers/attention/nsa/utils.py +24 -0
- sglang/srt/layers/attention/nsa_backend.py +887 -0
- sglang/srt/layers/attention/tbo_backend.py +6 -6
- sglang/srt/layers/attention/torch_flex_backend.py +325 -0
- sglang/srt/layers/attention/torch_native_backend.py +12 -6
- sglang/srt/layers/attention/triton_backend.py +57 -7
- sglang/srt/layers/attention/trtllm_mha_backend.py +5 -7
- sglang/srt/layers/attention/trtllm_mla_backend.py +276 -39
- sglang/srt/layers/attention/vision.py +58 -0
- sglang/srt/layers/attention/wave_backend.py +4 -4
- sglang/srt/layers/attention/wave_ops/decode_attention.py +2 -4
- sglang/srt/layers/attention/wave_ops/extend_attention.py +1 -3
- sglang/srt/layers/communicator.py +8 -0
- sglang/srt/layers/dp_attention.py +41 -2
- sglang/srt/layers/elementwise.py +3 -1
- sglang/srt/layers/layernorm.py +34 -15
- sglang/srt/layers/linear.py +55 -7
- sglang/srt/layers/logits_processor.py +44 -12
- sglang/srt/layers/moe/__init__.py +2 -1
- sglang/srt/layers/moe/cutlass_w4a8_moe.py +3 -3
- sglang/srt/layers/moe/ep_moe/kernels.py +2 -2
- sglang/srt/layers/moe/ep_moe/layer.py +256 -63
- sglang/srt/layers/moe/flashinfer_cutedsl_moe.py +183 -0
- sglang/srt/layers/moe/fused_moe_native.py +5 -3
- sglang/srt/layers/moe/fused_moe_triton/configs/{triton_3_4_0/E=128,N=768,device_name=NVIDIA_B200,dtype=fp8_w8a8,block_shape=[128, 128].json → triton_3_3_1/E=128,N=768,device_name=NVIDIA_H20,dtype=fp8_w8a8,block_shape=[128, 128].json } +35 -35
- sglang/srt/layers/moe/fused_moe_triton/configs/triton_3_4_0/E=128,N=352,device_name=NVIDIA_RTX_5880_Ada_Generation,dtype=fp8_w8a8.json +146 -0
- sglang/srt/layers/moe/fused_moe_triton/configs/triton_3_4_0/E=256,N=256,device_name=NVIDIA_H800,dtype=fp8_w8a8,block_shape=[128, 128].json +146 -0
- sglang/srt/layers/moe/fused_moe_triton/configs/triton_3_4_0/E=256,N=512,device_name=NVIDIA_H20.json +146 -0
- sglang/srt/layers/moe/fused_moe_triton/configs/triton_3_4_0/E=512,N=128,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- sglang/srt/layers/moe/fused_moe_triton/configs/triton_3_4_0/E=512,N=128,device_name=NVIDIA_H20-3e.json +146 -0
- sglang/srt/layers/moe/fused_moe_triton/configs/triton_3_4_0/E=512,N=128,device_name=NVIDIA_H200.json +146 -0
- sglang/srt/layers/moe/fused_moe_triton/configs/triton_3_4_0/E=512,N=128,device_name=NVIDIA_H800,dtype=fp8_w8a8,block_shape=[128, 128].json +146 -0
- sglang/srt/layers/moe/fused_moe_triton/configs/triton_3_4_0/E=512,N=256,device_name=NVIDIA_B200.json +146 -0
- sglang/srt/layers/moe/fused_moe_triton/configs/triton_3_4_0/E=512,N=256,device_name=NVIDIA_H20-3e.json +146 -0
- sglang/srt/layers/moe/fused_moe_triton/configs/triton_3_4_0/E=512,N=256,device_name=NVIDIA_H200.json +146 -0
- sglang/srt/layers/moe/fused_moe_triton/configs/triton_3_4_0/E=512,N=64,device_name=NVIDIA_H100_80GB_HBM3.json +146 -0
- sglang/srt/layers/moe/fused_moe_triton/configs/triton_3_4_0/E=512,N=64,device_name=NVIDIA_H200.json +146 -0
- sglang/srt/layers/moe/fused_moe_triton/fused_moe.py +5 -2
- sglang/srt/layers/moe/fused_moe_triton/fused_moe_triton_config.py +7 -3
- sglang/srt/layers/moe/fused_moe_triton/fused_moe_triton_kernels.py +23 -20
- sglang/srt/layers/moe/fused_moe_triton/layer.py +71 -70
- sglang/srt/layers/moe/moe_runner/__init__.py +2 -1
- sglang/srt/layers/moe/moe_runner/base.py +274 -1
- sglang/srt/layers/moe/moe_runner/runner.py +80 -0
- sglang/srt/layers/moe/moe_runner/triton.py +448 -0
- sglang/srt/layers/moe/token_dispatcher/__init__.py +16 -4
- sglang/srt/layers/moe/token_dispatcher/{base_dispatcher.py → base.py} +67 -17
- sglang/srt/layers/moe/token_dispatcher/deepep.py +118 -56
- sglang/srt/layers/moe/token_dispatcher/standard.py +44 -2
- sglang/srt/layers/moe/topk.py +30 -9
- sglang/srt/layers/moe/utils.py +22 -6
- sglang/srt/layers/parameter.py +23 -6
- sglang/srt/layers/quantization/awq.py +19 -7
- sglang/srt/layers/quantization/base_config.py +11 -6
- sglang/srt/layers/quantization/blockwise_int8.py +38 -27
- sglang/srt/layers/quantization/compressed_tensors/compressed_tensors.py +1 -0
- sglang/srt/layers/quantization/compressed_tensors/compressed_tensors_moe.py +50 -30
- sglang/srt/layers/quantization/compressed_tensors/schemes/__init__.py +2 -0
- sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_fp8.py +13 -1
- sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py +173 -0
- sglang/srt/layers/quantization/deep_gemm_wrapper/configurer.py +2 -10
- sglang/srt/layers/quantization/deep_gemm_wrapper/entrypoint.py +27 -0
- sglang/srt/layers/quantization/fp8.py +78 -49
- sglang/srt/layers/quantization/fp8_utils.py +51 -32
- sglang/srt/layers/quantization/gptq.py +25 -17
- sglang/srt/layers/quantization/modelopt_quant.py +190 -55
- sglang/srt/layers/quantization/moe_wna16.py +21 -18
- sglang/srt/layers/quantization/mxfp4.py +74 -42
- sglang/srt/layers/quantization/quark/quark_moe.py +48 -30
- sglang/srt/layers/quantization/unquant.py +135 -47
- sglang/srt/layers/quantization/w4afp8.py +26 -17
- sglang/srt/layers/quantization/w8a8_fp8.py +35 -20
- sglang/srt/layers/quantization/w8a8_int8.py +91 -41
- sglang/srt/layers/rotary_embedding.py +78 -31
- sglang/srt/layers/sampler.py +213 -21
- sglang/srt/layers/utils.py +23 -0
- sglang/srt/lora/backend/base_backend.py +50 -8
- sglang/srt/lora/backend/chunked_backend.py +348 -0
- sglang/srt/lora/backend/triton_backend.py +99 -5
- sglang/srt/lora/layers.py +32 -0
- sglang/srt/lora/lora.py +8 -3
- sglang/srt/lora/lora_manager.py +52 -118
- sglang/srt/lora/mem_pool.py +25 -11
- sglang/srt/lora/triton_ops/__init__.py +4 -0
- sglang/srt/lora/triton_ops/chunked_sgmv_expand.py +214 -0
- sglang/srt/lora/triton_ops/chunked_sgmv_shrink.py +174 -0
- sglang/srt/lora/utils.py +22 -11
- sglang/srt/managers/async_dynamic_batch_tokenizer.py +170 -0
- sglang/srt/managers/cache_controller.py +199 -301
- sglang/srt/managers/data_parallel_controller.py +115 -80
- sglang/srt/managers/detokenizer_manager.py +19 -15
- sglang/srt/managers/disagg_service.py +46 -0
- sglang/srt/managers/io_struct.py +340 -109
- sglang/srt/managers/mm_utils.py +44 -6
- sglang/srt/managers/multi_tokenizer_mixin.py +357 -407
- sglang/srt/managers/multimodal_processor.py +1 -2
- sglang/srt/managers/overlap_utils.py +53 -0
- sglang/srt/managers/schedule_batch.py +240 -138
- sglang/srt/managers/schedule_policy.py +144 -17
- sglang/srt/managers/scheduler.py +502 -209
- sglang/srt/managers/scheduler_input_blocker.py +1 -1
- sglang/srt/managers/scheduler_metrics_mixin.py +99 -126
- sglang/srt/managers/scheduler_output_processor_mixin.py +75 -22
- sglang/srt/managers/scheduler_profiler_mixin.py +6 -6
- sglang/srt/managers/scheduler_update_weights_mixin.py +7 -0
- sglang/srt/managers/tokenizer_communicator_mixin.py +675 -0
- sglang/srt/managers/tokenizer_manager.py +320 -632
- sglang/srt/managers/tp_worker.py +81 -22
- sglang/srt/managers/tp_worker_overlap_thread.py +71 -56
- sglang/srt/managers/utils.py +1 -45
- sglang/srt/mem_cache/allocator.py +14 -20
- sglang/srt/mem_cache/allocator_ascend.py +41 -27
- sglang/srt/mem_cache/base_prefix_cache.py +1 -1
- sglang/srt/mem_cache/chunk_cache.py +8 -1
- sglang/srt/mem_cache/evict_policy.py +23 -0
- sglang/srt/mem_cache/hicache_storage.py +43 -24
- sglang/srt/mem_cache/hiradix_cache.py +222 -75
- sglang/srt/mem_cache/memory_pool.py +535 -58
- sglang/srt/mem_cache/memory_pool_host.py +239 -228
- sglang/srt/mem_cache/radix_cache.py +222 -73
- sglang/srt/mem_cache/radix_cache_cpp.py +11 -8
- sglang/srt/mem_cache/storage/__init__.py +10 -0
- sglang/srt/mem_cache/storage/aibrix_kvcache/aibrix_kvcache_storage.py +151 -0
- sglang/srt/mem_cache/storage/aibrix_kvcache/unit_test.py +109 -0
- sglang/srt/mem_cache/storage/backend_factory.py +223 -0
- sglang/srt/mem_cache/storage/eic/eic_storage.py +778 -0
- sglang/srt/mem_cache/storage/eic/test_unit.py +115 -0
- sglang/srt/mem_cache/storage/hf3fs/hf3fs_client.py +164 -0
- sglang/srt/mem_cache/storage/hf3fs/{client_hf3fs.py → hf3fs_usrbio_client.py} +5 -1
- sglang/srt/mem_cache/storage/hf3fs/storage_hf3fs.py +259 -62
- sglang/srt/mem_cache/storage/lmcache/lmc_radix_cache.py +284 -0
- sglang/srt/mem_cache/storage/lmcache/unit_test.py +121 -0
- sglang/srt/mem_cache/storage/mooncake_store/mooncake_store.py +166 -17
- sglang/srt/mem_cache/swa_radix_cache.py +25 -36
- sglang/srt/metrics/collector.py +511 -132
- sglang/srt/metrics/func_timer.py +2 -7
- sglang/srt/metrics/startup_func_log_and_timer.py +150 -0
- sglang/srt/metrics/utils.py +8 -1
- sglang/srt/model_executor/cpu_graph_runner.py +640 -0
- sglang/srt/model_executor/cuda_graph_runner.py +52 -37
- sglang/srt/model_executor/forward_batch_info.py +82 -40
- sglang/srt/model_executor/model_runner.py +432 -157
- sglang/srt/model_executor/npu_graph_runner.py +12 -5
- sglang/srt/model_loader/__init__.py +9 -3
- sglang/srt/model_loader/loader.py +133 -5
- sglang/srt/model_loader/remote_instance_weight_loader_utils.py +69 -0
- sglang/srt/model_loader/weight_utils.py +158 -3
- sglang/srt/models/apertus.py +686 -0
- sglang/srt/models/bailing_moe.py +820 -217
- sglang/srt/models/bailing_moe_nextn.py +168 -0
- sglang/srt/models/deepseek_nextn.py +6 -1
- sglang/srt/models/deepseek_v2.py +607 -130
- sglang/srt/models/dots_ocr.py +173 -0
- sglang/srt/models/dots_vlm.py +174 -0
- sglang/srt/models/dots_vlm_vit.py +337 -0
- sglang/srt/models/ernie4.py +1 -1
- sglang/srt/models/falcon_h1.py +576 -0
- sglang/srt/models/gemma3_causal.py +0 -2
- sglang/srt/models/gemma3_mm.py +1 -1
- sglang/srt/models/gemma3n_mm.py +2 -2
- sglang/srt/models/glm4_moe.py +4 -4
- sglang/srt/models/glm4_moe_nextn.py +2 -2
- sglang/srt/models/glm4v.py +5 -3
- sglang/srt/models/glm4v_moe.py +4 -1
- sglang/srt/models/gpt_oss.py +8 -31
- sglang/srt/models/kimi_vl_moonvit.py +2 -2
- sglang/srt/models/llama.py +4 -0
- sglang/srt/models/llama4.py +9 -0
- sglang/srt/models/llama_eagle3.py +13 -0
- sglang/srt/models/longcat_flash.py +3 -3
- sglang/srt/models/longcat_flash_nextn.py +1 -1
- sglang/srt/models/mllama4.py +40 -4
- sglang/srt/models/opt.py +637 -0
- sglang/srt/models/qwen2_5_vl.py +29 -5
- sglang/srt/models/qwen2_audio.py +1 -1
- sglang/srt/models/qwen2_moe.py +120 -13
- sglang/srt/models/qwen2_vl.py +1 -1
- sglang/srt/models/qwen3.py +18 -3
- sglang/srt/models/qwen3_moe.py +32 -4
- sglang/srt/models/qwen3_next.py +1069 -0
- sglang/srt/models/qwen3_next_mtp.py +112 -0
- sglang/srt/models/qwen3_vl.py +787 -0
- sglang/srt/models/qwen3_vl_moe.py +471 -0
- sglang/srt/models/registry.py +15 -3
- sglang/srt/models/sarashina2_vision.py +269 -0
- sglang/srt/models/solar.py +505 -0
- sglang/srt/models/starcoder2.py +357 -0
- sglang/srt/models/step3_vl.py +1 -1
- sglang/srt/models/torch_native_llama.py +9 -2
- sglang/srt/models/utils.py +51 -0
- sglang/srt/multimodal/processors/base_processor.py +15 -7
- sglang/srt/multimodal/processors/dots_vlm.py +98 -0
- sglang/srt/multimodal/processors/glm4v.py +9 -9
- sglang/srt/multimodal/processors/internvl.py +153 -129
- sglang/srt/multimodal/processors/qwen_vl.py +23 -6
- sglang/srt/multimodal/processors/sarashina2_vision.py +81 -0
- sglang/srt/offloader.py +27 -3
- sglang/srt/parser/jinja_template_utils.py +6 -0
- sglang/srt/sampling/sampling_batch_info.py +38 -17
- sglang/srt/sampling/sampling_params.py +7 -0
- sglang/srt/server_args.py +966 -267
- sglang/srt/server_args_config_parser.py +146 -0
- sglang/srt/single_batch_overlap.py +151 -0
- sglang/srt/speculative/cpp_ngram/ngram.cpp +374 -0
- sglang/srt/speculative/cpp_ngram/ngram.h +110 -0
- sglang/srt/speculative/cpp_ngram/ngram_cache.py +138 -0
- sglang/srt/speculative/cpp_ngram/ngram_cache_binding.cpp +43 -0
- sglang/srt/speculative/cpp_ngram/param.h +125 -0
- sglang/srt/speculative/cpp_ngram/queue.h +71 -0
- sglang/srt/speculative/eagle_draft_cuda_graph_runner.py +7 -1
- sglang/srt/speculative/eagle_draft_extend_cuda_graph_runner.py +13 -2
- sglang/srt/speculative/{eagle_utils.py → eagle_info.py} +207 -757
- sglang/srt/speculative/eagle_worker.py +99 -28
- sglang/srt/speculative/ngram_utils.py +428 -0
- sglang/srt/speculative/ngram_worker.py +245 -0
- sglang/srt/speculative/spec_info.py +52 -0
- sglang/srt/speculative/spec_utils.py +606 -0
- sglang/srt/speculative/standalone_worker.py +109 -0
- sglang/srt/torch_memory_saver_adapter.py +5 -7
- sglang/srt/tracing/trace.py +578 -0
- sglang/srt/two_batch_overlap.py +8 -5
- sglang/srt/utils/__init__.py +2 -0
- sglang/srt/{utils.py → utils/common.py} +433 -77
- sglang/srt/{hf_transformers_utils.py → utils/hf_transformers_utils.py} +53 -5
- sglang/srt/{patch_torch.py → utils/patch_torch.py} +8 -0
- sglang/srt/utils/rpd_utils.py +452 -0
- sglang/srt/utils/slow_rank_detector.py +71 -0
- sglang/srt/warmup.py +8 -4
- sglang/srt/weight_sync/utils.py +2 -2
- sglang/test/attention/test_trtllm_mla_backend.py +169 -5
- sglang/test/get_logits_ut.py +57 -0
- sglang/test/run_eval.py +79 -11
- sglang/test/runners.py +5 -1
- sglang/test/simple_eval_common.py +5 -2
- sglang/test/simple_eval_mmmu_vlm.py +441 -0
- sglang/test/test_block_fp8.py +2 -2
- sglang/test/test_cutlass_moe.py +24 -6
- sglang/test/test_deterministic.py +297 -0
- sglang/test/test_disaggregation_utils.py +77 -0
- sglang/test/test_fp4_moe.py +370 -1
- sglang/test/test_programs.py +1 -1
- sglang/test/test_utils.py +383 -5
- sglang/utils.py +21 -1
- sglang/version.py +1 -1
- {sglang-0.5.2rc2.dist-info → sglang-0.5.3rc2.dist-info}/METADATA +69 -124
- {sglang-0.5.2rc2.dist-info → sglang-0.5.3rc2.dist-info}/RECORD +375 -245
- sglang/srt/disaggregation/launch_lb.py +0 -118
- sglang/srt/mem_cache/lora_radix_cache.py +0 -421
- /sglang/srt/{poll_based_barrier.py → utils/poll_based_barrier.py} +0 -0
- {sglang-0.5.2rc2.dist-info → sglang-0.5.3rc2.dist-info}/WHEEL +0 -0
- {sglang-0.5.2rc2.dist-info → sglang-0.5.3rc2.dist-info}/licenses/LICENSE +0 -0
- {sglang-0.5.2rc2.dist-info → sglang-0.5.3rc2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,434 @@
|
|
1
|
+
import datetime
|
2
|
+
|
3
|
+
from google.protobuf import timestamp_pb2 as _timestamp_pb2
|
4
|
+
from google.protobuf import struct_pb2 as _struct_pb2
|
5
|
+
from google.protobuf.internal import containers as _containers
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
7
|
+
from google.protobuf import message as _message
|
8
|
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
9
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
10
|
+
|
11
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
12
|
+
|
13
|
+
class SamplingParams(_message.Message):
|
14
|
+
__slots__ = ("temperature", "top_p", "top_k", "min_p", "frequency_penalty", "presence_penalty", "repetition_penalty", "max_new_tokens", "stop", "stop_token_ids", "skip_special_tokens", "spaces_between_special_tokens", "regex", "json_schema", "ebnf_grammar", "structural_tag", "lora_path", "n", "token_healing", "min_new_tokens", "ignore_eos", "no_stop_trim", "stream_interval", "logit_bias", "custom_params")
|
15
|
+
class LogitBiasEntry(_message.Message):
|
16
|
+
__slots__ = ("key", "value")
|
17
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
18
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
19
|
+
key: str
|
20
|
+
value: float
|
21
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[float] = ...) -> None: ...
|
22
|
+
TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
|
23
|
+
TOP_P_FIELD_NUMBER: _ClassVar[int]
|
24
|
+
TOP_K_FIELD_NUMBER: _ClassVar[int]
|
25
|
+
MIN_P_FIELD_NUMBER: _ClassVar[int]
|
26
|
+
FREQUENCY_PENALTY_FIELD_NUMBER: _ClassVar[int]
|
27
|
+
PRESENCE_PENALTY_FIELD_NUMBER: _ClassVar[int]
|
28
|
+
REPETITION_PENALTY_FIELD_NUMBER: _ClassVar[int]
|
29
|
+
MAX_NEW_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
30
|
+
STOP_FIELD_NUMBER: _ClassVar[int]
|
31
|
+
STOP_TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
|
32
|
+
SKIP_SPECIAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
33
|
+
SPACES_BETWEEN_SPECIAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
34
|
+
REGEX_FIELD_NUMBER: _ClassVar[int]
|
35
|
+
JSON_SCHEMA_FIELD_NUMBER: _ClassVar[int]
|
36
|
+
EBNF_GRAMMAR_FIELD_NUMBER: _ClassVar[int]
|
37
|
+
STRUCTURAL_TAG_FIELD_NUMBER: _ClassVar[int]
|
38
|
+
LORA_PATH_FIELD_NUMBER: _ClassVar[int]
|
39
|
+
N_FIELD_NUMBER: _ClassVar[int]
|
40
|
+
TOKEN_HEALING_FIELD_NUMBER: _ClassVar[int]
|
41
|
+
MIN_NEW_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
42
|
+
IGNORE_EOS_FIELD_NUMBER: _ClassVar[int]
|
43
|
+
NO_STOP_TRIM_FIELD_NUMBER: _ClassVar[int]
|
44
|
+
STREAM_INTERVAL_FIELD_NUMBER: _ClassVar[int]
|
45
|
+
LOGIT_BIAS_FIELD_NUMBER: _ClassVar[int]
|
46
|
+
CUSTOM_PARAMS_FIELD_NUMBER: _ClassVar[int]
|
47
|
+
temperature: float
|
48
|
+
top_p: float
|
49
|
+
top_k: int
|
50
|
+
min_p: float
|
51
|
+
frequency_penalty: float
|
52
|
+
presence_penalty: float
|
53
|
+
repetition_penalty: float
|
54
|
+
max_new_tokens: int
|
55
|
+
stop: _containers.RepeatedScalarFieldContainer[str]
|
56
|
+
stop_token_ids: _containers.RepeatedScalarFieldContainer[int]
|
57
|
+
skip_special_tokens: bool
|
58
|
+
spaces_between_special_tokens: bool
|
59
|
+
regex: str
|
60
|
+
json_schema: str
|
61
|
+
ebnf_grammar: str
|
62
|
+
structural_tag: str
|
63
|
+
lora_path: str
|
64
|
+
n: int
|
65
|
+
token_healing: bool
|
66
|
+
min_new_tokens: int
|
67
|
+
ignore_eos: bool
|
68
|
+
no_stop_trim: bool
|
69
|
+
stream_interval: int
|
70
|
+
logit_bias: _containers.ScalarMap[str, float]
|
71
|
+
custom_params: _struct_pb2.Struct
|
72
|
+
def __init__(self, temperature: _Optional[float] = ..., top_p: _Optional[float] = ..., top_k: _Optional[int] = ..., min_p: _Optional[float] = ..., frequency_penalty: _Optional[float] = ..., presence_penalty: _Optional[float] = ..., repetition_penalty: _Optional[float] = ..., max_new_tokens: _Optional[int] = ..., stop: _Optional[_Iterable[str]] = ..., stop_token_ids: _Optional[_Iterable[int]] = ..., skip_special_tokens: bool = ..., spaces_between_special_tokens: bool = ..., regex: _Optional[str] = ..., json_schema: _Optional[str] = ..., ebnf_grammar: _Optional[str] = ..., structural_tag: _Optional[str] = ..., lora_path: _Optional[str] = ..., n: _Optional[int] = ..., token_healing: bool = ..., min_new_tokens: _Optional[int] = ..., ignore_eos: bool = ..., no_stop_trim: bool = ..., stream_interval: _Optional[int] = ..., logit_bias: _Optional[_Mapping[str, float]] = ..., custom_params: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
73
|
+
|
74
|
+
class DisaggregatedParams(_message.Message):
|
75
|
+
__slots__ = ("bootstrap_host", "bootstrap_port", "bootstrap_room")
|
76
|
+
BOOTSTRAP_HOST_FIELD_NUMBER: _ClassVar[int]
|
77
|
+
BOOTSTRAP_PORT_FIELD_NUMBER: _ClassVar[int]
|
78
|
+
BOOTSTRAP_ROOM_FIELD_NUMBER: _ClassVar[int]
|
79
|
+
bootstrap_host: str
|
80
|
+
bootstrap_port: int
|
81
|
+
bootstrap_room: int
|
82
|
+
def __init__(self, bootstrap_host: _Optional[str] = ..., bootstrap_port: _Optional[int] = ..., bootstrap_room: _Optional[int] = ...) -> None: ...
|
83
|
+
|
84
|
+
class GenerateRequest(_message.Message):
|
85
|
+
__slots__ = ("request_id", "tokenized", "mm_inputs", "sampling_params", "return_logprob", "logprob_start_len", "top_logprobs_num", "token_ids_logprob", "return_hidden_states", "disaggregated_params", "custom_logit_processor", "timestamp", "log_metrics", "input_embeds", "lora_id", "data_parallel_rank", "stream")
|
86
|
+
REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
|
87
|
+
TOKENIZED_FIELD_NUMBER: _ClassVar[int]
|
88
|
+
MM_INPUTS_FIELD_NUMBER: _ClassVar[int]
|
89
|
+
SAMPLING_PARAMS_FIELD_NUMBER: _ClassVar[int]
|
90
|
+
RETURN_LOGPROB_FIELD_NUMBER: _ClassVar[int]
|
91
|
+
LOGPROB_START_LEN_FIELD_NUMBER: _ClassVar[int]
|
92
|
+
TOP_LOGPROBS_NUM_FIELD_NUMBER: _ClassVar[int]
|
93
|
+
TOKEN_IDS_LOGPROB_FIELD_NUMBER: _ClassVar[int]
|
94
|
+
RETURN_HIDDEN_STATES_FIELD_NUMBER: _ClassVar[int]
|
95
|
+
DISAGGREGATED_PARAMS_FIELD_NUMBER: _ClassVar[int]
|
96
|
+
CUSTOM_LOGIT_PROCESSOR_FIELD_NUMBER: _ClassVar[int]
|
97
|
+
TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
|
98
|
+
LOG_METRICS_FIELD_NUMBER: _ClassVar[int]
|
99
|
+
INPUT_EMBEDS_FIELD_NUMBER: _ClassVar[int]
|
100
|
+
LORA_ID_FIELD_NUMBER: _ClassVar[int]
|
101
|
+
DATA_PARALLEL_RANK_FIELD_NUMBER: _ClassVar[int]
|
102
|
+
STREAM_FIELD_NUMBER: _ClassVar[int]
|
103
|
+
request_id: str
|
104
|
+
tokenized: TokenizedInput
|
105
|
+
mm_inputs: MultimodalInputs
|
106
|
+
sampling_params: SamplingParams
|
107
|
+
return_logprob: bool
|
108
|
+
logprob_start_len: int
|
109
|
+
top_logprobs_num: int
|
110
|
+
token_ids_logprob: _containers.RepeatedScalarFieldContainer[int]
|
111
|
+
return_hidden_states: bool
|
112
|
+
disaggregated_params: DisaggregatedParams
|
113
|
+
custom_logit_processor: str
|
114
|
+
timestamp: _timestamp_pb2.Timestamp
|
115
|
+
log_metrics: bool
|
116
|
+
input_embeds: _containers.RepeatedScalarFieldContainer[float]
|
117
|
+
lora_id: str
|
118
|
+
data_parallel_rank: int
|
119
|
+
stream: bool
|
120
|
+
def __init__(self, request_id: _Optional[str] = ..., tokenized: _Optional[_Union[TokenizedInput, _Mapping]] = ..., mm_inputs: _Optional[_Union[MultimodalInputs, _Mapping]] = ..., sampling_params: _Optional[_Union[SamplingParams, _Mapping]] = ..., return_logprob: bool = ..., logprob_start_len: _Optional[int] = ..., top_logprobs_num: _Optional[int] = ..., token_ids_logprob: _Optional[_Iterable[int]] = ..., return_hidden_states: bool = ..., disaggregated_params: _Optional[_Union[DisaggregatedParams, _Mapping]] = ..., custom_logit_processor: _Optional[str] = ..., timestamp: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., log_metrics: bool = ..., input_embeds: _Optional[_Iterable[float]] = ..., lora_id: _Optional[str] = ..., data_parallel_rank: _Optional[int] = ..., stream: bool = ...) -> None: ...
|
121
|
+
|
122
|
+
class TokenizedInput(_message.Message):
|
123
|
+
__slots__ = ("original_text", "input_ids")
|
124
|
+
ORIGINAL_TEXT_FIELD_NUMBER: _ClassVar[int]
|
125
|
+
INPUT_IDS_FIELD_NUMBER: _ClassVar[int]
|
126
|
+
original_text: str
|
127
|
+
input_ids: _containers.RepeatedScalarFieldContainer[int]
|
128
|
+
def __init__(self, original_text: _Optional[str] = ..., input_ids: _Optional[_Iterable[int]] = ...) -> None: ...
|
129
|
+
|
130
|
+
class MultimodalInputs(_message.Message):
|
131
|
+
__slots__ = ("image_urls", "video_urls", "audio_urls", "processed_features", "image_data", "video_data", "audio_data", "modalities")
|
132
|
+
IMAGE_URLS_FIELD_NUMBER: _ClassVar[int]
|
133
|
+
VIDEO_URLS_FIELD_NUMBER: _ClassVar[int]
|
134
|
+
AUDIO_URLS_FIELD_NUMBER: _ClassVar[int]
|
135
|
+
PROCESSED_FEATURES_FIELD_NUMBER: _ClassVar[int]
|
136
|
+
IMAGE_DATA_FIELD_NUMBER: _ClassVar[int]
|
137
|
+
VIDEO_DATA_FIELD_NUMBER: _ClassVar[int]
|
138
|
+
AUDIO_DATA_FIELD_NUMBER: _ClassVar[int]
|
139
|
+
MODALITIES_FIELD_NUMBER: _ClassVar[int]
|
140
|
+
image_urls: _containers.RepeatedScalarFieldContainer[str]
|
141
|
+
video_urls: _containers.RepeatedScalarFieldContainer[str]
|
142
|
+
audio_urls: _containers.RepeatedScalarFieldContainer[str]
|
143
|
+
processed_features: _struct_pb2.Struct
|
144
|
+
image_data: _containers.RepeatedScalarFieldContainer[bytes]
|
145
|
+
video_data: _containers.RepeatedScalarFieldContainer[bytes]
|
146
|
+
audio_data: _containers.RepeatedScalarFieldContainer[bytes]
|
147
|
+
modalities: _containers.RepeatedScalarFieldContainer[str]
|
148
|
+
def __init__(self, image_urls: _Optional[_Iterable[str]] = ..., video_urls: _Optional[_Iterable[str]] = ..., audio_urls: _Optional[_Iterable[str]] = ..., processed_features: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., image_data: _Optional[_Iterable[bytes]] = ..., video_data: _Optional[_Iterable[bytes]] = ..., audio_data: _Optional[_Iterable[bytes]] = ..., modalities: _Optional[_Iterable[str]] = ...) -> None: ...
|
149
|
+
|
150
|
+
class GenerateResponse(_message.Message):
|
151
|
+
__slots__ = ("request_id", "chunk", "complete", "error")
|
152
|
+
REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
|
153
|
+
CHUNK_FIELD_NUMBER: _ClassVar[int]
|
154
|
+
COMPLETE_FIELD_NUMBER: _ClassVar[int]
|
155
|
+
ERROR_FIELD_NUMBER: _ClassVar[int]
|
156
|
+
request_id: str
|
157
|
+
chunk: GenerateStreamChunk
|
158
|
+
complete: GenerateComplete
|
159
|
+
error: GenerateError
|
160
|
+
def __init__(self, request_id: _Optional[str] = ..., chunk: _Optional[_Union[GenerateStreamChunk, _Mapping]] = ..., complete: _Optional[_Union[GenerateComplete, _Mapping]] = ..., error: _Optional[_Union[GenerateError, _Mapping]] = ...) -> None: ...
|
161
|
+
|
162
|
+
class GenerateStreamChunk(_message.Message):
|
163
|
+
__slots__ = ("token_ids", "prompt_tokens", "completion_tokens", "cached_tokens", "output_logprobs", "hidden_states", "input_logprobs", "index")
|
164
|
+
TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
|
165
|
+
PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
166
|
+
COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
167
|
+
CACHED_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
168
|
+
OUTPUT_LOGPROBS_FIELD_NUMBER: _ClassVar[int]
|
169
|
+
HIDDEN_STATES_FIELD_NUMBER: _ClassVar[int]
|
170
|
+
INPUT_LOGPROBS_FIELD_NUMBER: _ClassVar[int]
|
171
|
+
INDEX_FIELD_NUMBER: _ClassVar[int]
|
172
|
+
token_ids: _containers.RepeatedScalarFieldContainer[int]
|
173
|
+
prompt_tokens: int
|
174
|
+
completion_tokens: int
|
175
|
+
cached_tokens: int
|
176
|
+
output_logprobs: OutputLogProbs
|
177
|
+
hidden_states: _containers.RepeatedScalarFieldContainer[float]
|
178
|
+
input_logprobs: InputLogProbs
|
179
|
+
index: int
|
180
|
+
def __init__(self, token_ids: _Optional[_Iterable[int]] = ..., prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., cached_tokens: _Optional[int] = ..., output_logprobs: _Optional[_Union[OutputLogProbs, _Mapping]] = ..., hidden_states: _Optional[_Iterable[float]] = ..., input_logprobs: _Optional[_Union[InputLogProbs, _Mapping]] = ..., index: _Optional[int] = ...) -> None: ...
|
181
|
+
|
182
|
+
class GenerateComplete(_message.Message):
|
183
|
+
__slots__ = ("output_ids", "finish_reason", "prompt_tokens", "completion_tokens", "cached_tokens", "output_logprobs", "all_hidden_states", "matched_token_id", "matched_stop_str", "input_logprobs", "index")
|
184
|
+
OUTPUT_IDS_FIELD_NUMBER: _ClassVar[int]
|
185
|
+
FINISH_REASON_FIELD_NUMBER: _ClassVar[int]
|
186
|
+
PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
187
|
+
COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
188
|
+
CACHED_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
189
|
+
OUTPUT_LOGPROBS_FIELD_NUMBER: _ClassVar[int]
|
190
|
+
ALL_HIDDEN_STATES_FIELD_NUMBER: _ClassVar[int]
|
191
|
+
MATCHED_TOKEN_ID_FIELD_NUMBER: _ClassVar[int]
|
192
|
+
MATCHED_STOP_STR_FIELD_NUMBER: _ClassVar[int]
|
193
|
+
INPUT_LOGPROBS_FIELD_NUMBER: _ClassVar[int]
|
194
|
+
INDEX_FIELD_NUMBER: _ClassVar[int]
|
195
|
+
output_ids: _containers.RepeatedScalarFieldContainer[int]
|
196
|
+
finish_reason: str
|
197
|
+
prompt_tokens: int
|
198
|
+
completion_tokens: int
|
199
|
+
cached_tokens: int
|
200
|
+
output_logprobs: OutputLogProbs
|
201
|
+
all_hidden_states: _containers.RepeatedCompositeFieldContainer[HiddenStates]
|
202
|
+
matched_token_id: int
|
203
|
+
matched_stop_str: str
|
204
|
+
input_logprobs: InputLogProbs
|
205
|
+
index: int
|
206
|
+
def __init__(self, output_ids: _Optional[_Iterable[int]] = ..., finish_reason: _Optional[str] = ..., prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., cached_tokens: _Optional[int] = ..., output_logprobs: _Optional[_Union[OutputLogProbs, _Mapping]] = ..., all_hidden_states: _Optional[_Iterable[_Union[HiddenStates, _Mapping]]] = ..., matched_token_id: _Optional[int] = ..., matched_stop_str: _Optional[str] = ..., input_logprobs: _Optional[_Union[InputLogProbs, _Mapping]] = ..., index: _Optional[int] = ...) -> None: ...
|
207
|
+
|
208
|
+
class GenerateError(_message.Message):
|
209
|
+
__slots__ = ("message", "http_status_code", "details")
|
210
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
211
|
+
HTTP_STATUS_CODE_FIELD_NUMBER: _ClassVar[int]
|
212
|
+
DETAILS_FIELD_NUMBER: _ClassVar[int]
|
213
|
+
message: str
|
214
|
+
http_status_code: str
|
215
|
+
details: str
|
216
|
+
def __init__(self, message: _Optional[str] = ..., http_status_code: _Optional[str] = ..., details: _Optional[str] = ...) -> None: ...
|
217
|
+
|
218
|
+
class OutputLogProbs(_message.Message):
|
219
|
+
__slots__ = ("token_logprobs", "token_ids", "top_logprobs")
|
220
|
+
TOKEN_LOGPROBS_FIELD_NUMBER: _ClassVar[int]
|
221
|
+
TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
|
222
|
+
TOP_LOGPROBS_FIELD_NUMBER: _ClassVar[int]
|
223
|
+
token_logprobs: _containers.RepeatedScalarFieldContainer[float]
|
224
|
+
token_ids: _containers.RepeatedScalarFieldContainer[int]
|
225
|
+
top_logprobs: _containers.RepeatedCompositeFieldContainer[TopLogProbs]
|
226
|
+
def __init__(self, token_logprobs: _Optional[_Iterable[float]] = ..., token_ids: _Optional[_Iterable[int]] = ..., top_logprobs: _Optional[_Iterable[_Union[TopLogProbs, _Mapping]]] = ...) -> None: ...
|
227
|
+
|
228
|
+
class InputLogProbs(_message.Message):
|
229
|
+
__slots__ = ("token_logprobs", "token_ids", "top_logprobs")
|
230
|
+
TOKEN_LOGPROBS_FIELD_NUMBER: _ClassVar[int]
|
231
|
+
TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
|
232
|
+
TOP_LOGPROBS_FIELD_NUMBER: _ClassVar[int]
|
233
|
+
token_logprobs: _containers.RepeatedCompositeFieldContainer[InputTokenLogProb]
|
234
|
+
token_ids: _containers.RepeatedScalarFieldContainer[int]
|
235
|
+
top_logprobs: _containers.RepeatedCompositeFieldContainer[TopLogProbs]
|
236
|
+
def __init__(self, token_logprobs: _Optional[_Iterable[_Union[InputTokenLogProb, _Mapping]]] = ..., token_ids: _Optional[_Iterable[int]] = ..., top_logprobs: _Optional[_Iterable[_Union[TopLogProbs, _Mapping]]] = ...) -> None: ...
|
237
|
+
|
238
|
+
class InputTokenLogProb(_message.Message):
|
239
|
+
__slots__ = ("value",)
|
240
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
241
|
+
value: float
|
242
|
+
def __init__(self, value: _Optional[float] = ...) -> None: ...
|
243
|
+
|
244
|
+
class TopLogProbs(_message.Message):
|
245
|
+
__slots__ = ("values", "token_ids")
|
246
|
+
VALUES_FIELD_NUMBER: _ClassVar[int]
|
247
|
+
TOKEN_IDS_FIELD_NUMBER: _ClassVar[int]
|
248
|
+
values: _containers.RepeatedScalarFieldContainer[float]
|
249
|
+
token_ids: _containers.RepeatedScalarFieldContainer[int]
|
250
|
+
def __init__(self, values: _Optional[_Iterable[float]] = ..., token_ids: _Optional[_Iterable[int]] = ...) -> None: ...
|
251
|
+
|
252
|
+
class HiddenStates(_message.Message):
|
253
|
+
__slots__ = ("values", "layer", "position")
|
254
|
+
VALUES_FIELD_NUMBER: _ClassVar[int]
|
255
|
+
LAYER_FIELD_NUMBER: _ClassVar[int]
|
256
|
+
POSITION_FIELD_NUMBER: _ClassVar[int]
|
257
|
+
values: _containers.RepeatedScalarFieldContainer[float]
|
258
|
+
layer: int
|
259
|
+
position: int
|
260
|
+
def __init__(self, values: _Optional[_Iterable[float]] = ..., layer: _Optional[int] = ..., position: _Optional[int] = ...) -> None: ...
|
261
|
+
|
262
|
+
class EmbedRequest(_message.Message):
|
263
|
+
__slots__ = ("request_id", "tokenized", "mm_inputs", "sampling_params", "log_metrics", "token_type_ids", "data_parallel_rank", "is_cross_encoder", "texts")
|
264
|
+
REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
|
265
|
+
TOKENIZED_FIELD_NUMBER: _ClassVar[int]
|
266
|
+
MM_INPUTS_FIELD_NUMBER: _ClassVar[int]
|
267
|
+
SAMPLING_PARAMS_FIELD_NUMBER: _ClassVar[int]
|
268
|
+
LOG_METRICS_FIELD_NUMBER: _ClassVar[int]
|
269
|
+
TOKEN_TYPE_IDS_FIELD_NUMBER: _ClassVar[int]
|
270
|
+
DATA_PARALLEL_RANK_FIELD_NUMBER: _ClassVar[int]
|
271
|
+
IS_CROSS_ENCODER_FIELD_NUMBER: _ClassVar[int]
|
272
|
+
TEXTS_FIELD_NUMBER: _ClassVar[int]
|
273
|
+
request_id: str
|
274
|
+
tokenized: TokenizedInput
|
275
|
+
mm_inputs: MultimodalInputs
|
276
|
+
sampling_params: SamplingParams
|
277
|
+
log_metrics: bool
|
278
|
+
token_type_ids: _containers.RepeatedScalarFieldContainer[int]
|
279
|
+
data_parallel_rank: int
|
280
|
+
is_cross_encoder: bool
|
281
|
+
texts: _containers.RepeatedScalarFieldContainer[str]
|
282
|
+
def __init__(self, request_id: _Optional[str] = ..., tokenized: _Optional[_Union[TokenizedInput, _Mapping]] = ..., mm_inputs: _Optional[_Union[MultimodalInputs, _Mapping]] = ..., sampling_params: _Optional[_Union[SamplingParams, _Mapping]] = ..., log_metrics: bool = ..., token_type_ids: _Optional[_Iterable[int]] = ..., data_parallel_rank: _Optional[int] = ..., is_cross_encoder: bool = ..., texts: _Optional[_Iterable[str]] = ...) -> None: ...
|
283
|
+
|
284
|
+
class EmbedResponse(_message.Message):
|
285
|
+
__slots__ = ("request_id", "complete", "error")
|
286
|
+
REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
|
287
|
+
COMPLETE_FIELD_NUMBER: _ClassVar[int]
|
288
|
+
ERROR_FIELD_NUMBER: _ClassVar[int]
|
289
|
+
request_id: str
|
290
|
+
complete: EmbedComplete
|
291
|
+
error: EmbedError
|
292
|
+
def __init__(self, request_id: _Optional[str] = ..., complete: _Optional[_Union[EmbedComplete, _Mapping]] = ..., error: _Optional[_Union[EmbedError, _Mapping]] = ...) -> None: ...
|
293
|
+
|
294
|
+
class EmbedComplete(_message.Message):
|
295
|
+
__slots__ = ("embedding", "prompt_tokens", "cached_tokens", "embedding_dim", "batch_embeddings")
|
296
|
+
EMBEDDING_FIELD_NUMBER: _ClassVar[int]
|
297
|
+
PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
298
|
+
CACHED_TOKENS_FIELD_NUMBER: _ClassVar[int]
|
299
|
+
EMBEDDING_DIM_FIELD_NUMBER: _ClassVar[int]
|
300
|
+
BATCH_EMBEDDINGS_FIELD_NUMBER: _ClassVar[int]
|
301
|
+
embedding: _containers.RepeatedScalarFieldContainer[float]
|
302
|
+
prompt_tokens: int
|
303
|
+
cached_tokens: int
|
304
|
+
embedding_dim: int
|
305
|
+
batch_embeddings: _containers.RepeatedCompositeFieldContainer[Embedding]
|
306
|
+
def __init__(self, embedding: _Optional[_Iterable[float]] = ..., prompt_tokens: _Optional[int] = ..., cached_tokens: _Optional[int] = ..., embedding_dim: _Optional[int] = ..., batch_embeddings: _Optional[_Iterable[_Union[Embedding, _Mapping]]] = ...) -> None: ...
|
307
|
+
|
308
|
+
class Embedding(_message.Message):
|
309
|
+
__slots__ = ("values", "index")
|
310
|
+
VALUES_FIELD_NUMBER: _ClassVar[int]
|
311
|
+
INDEX_FIELD_NUMBER: _ClassVar[int]
|
312
|
+
values: _containers.RepeatedScalarFieldContainer[float]
|
313
|
+
index: int
|
314
|
+
def __init__(self, values: _Optional[_Iterable[float]] = ..., index: _Optional[int] = ...) -> None: ...
|
315
|
+
|
316
|
+
class EmbedError(_message.Message):
|
317
|
+
__slots__ = ("message", "code", "details")
|
318
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
319
|
+
CODE_FIELD_NUMBER: _ClassVar[int]
|
320
|
+
DETAILS_FIELD_NUMBER: _ClassVar[int]
|
321
|
+
message: str
|
322
|
+
code: str
|
323
|
+
details: str
|
324
|
+
def __init__(self, message: _Optional[str] = ..., code: _Optional[str] = ..., details: _Optional[str] = ...) -> None: ...
|
325
|
+
|
326
|
+
class HealthCheckRequest(_message.Message):
|
327
|
+
__slots__ = ("tokenized",)
|
328
|
+
TOKENIZED_FIELD_NUMBER: _ClassVar[int]
|
329
|
+
tokenized: TokenizedInput
|
330
|
+
def __init__(self, tokenized: _Optional[_Union[TokenizedInput, _Mapping]] = ...) -> None: ...
|
331
|
+
|
332
|
+
class HealthCheckResponse(_message.Message):
|
333
|
+
__slots__ = ("healthy", "message")
|
334
|
+
HEALTHY_FIELD_NUMBER: _ClassVar[int]
|
335
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
336
|
+
healthy: bool
|
337
|
+
message: str
|
338
|
+
def __init__(self, healthy: bool = ..., message: _Optional[str] = ...) -> None: ...
|
339
|
+
|
340
|
+
class AbortRequest(_message.Message):
|
341
|
+
__slots__ = ("request_id", "reason")
|
342
|
+
REQUEST_ID_FIELD_NUMBER: _ClassVar[int]
|
343
|
+
REASON_FIELD_NUMBER: _ClassVar[int]
|
344
|
+
request_id: str
|
345
|
+
reason: str
|
346
|
+
def __init__(self, request_id: _Optional[str] = ..., reason: _Optional[str] = ...) -> None: ...
|
347
|
+
|
348
|
+
class AbortResponse(_message.Message):
|
349
|
+
__slots__ = ("success", "message")
|
350
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
351
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
352
|
+
success: bool
|
353
|
+
message: str
|
354
|
+
def __init__(self, success: bool = ..., message: _Optional[str] = ...) -> None: ...
|
355
|
+
|
356
|
+
class LoadLoRARequest(_message.Message):
|
357
|
+
__slots__ = ("adapter_id", "adapter_path", "rank")
|
358
|
+
ADAPTER_ID_FIELD_NUMBER: _ClassVar[int]
|
359
|
+
ADAPTER_PATH_FIELD_NUMBER: _ClassVar[int]
|
360
|
+
RANK_FIELD_NUMBER: _ClassVar[int]
|
361
|
+
adapter_id: str
|
362
|
+
adapter_path: str
|
363
|
+
rank: int
|
364
|
+
def __init__(self, adapter_id: _Optional[str] = ..., adapter_path: _Optional[str] = ..., rank: _Optional[int] = ...) -> None: ...
|
365
|
+
|
366
|
+
class LoadLoRAResponse(_message.Message):
|
367
|
+
__slots__ = ("success", "adapter_id", "message")
|
368
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
369
|
+
ADAPTER_ID_FIELD_NUMBER: _ClassVar[int]
|
370
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
371
|
+
success: bool
|
372
|
+
adapter_id: str
|
373
|
+
message: str
|
374
|
+
def __init__(self, success: bool = ..., adapter_id: _Optional[str] = ..., message: _Optional[str] = ...) -> None: ...
|
375
|
+
|
376
|
+
class UnloadLoRARequest(_message.Message):
|
377
|
+
__slots__ = ("adapter_id",)
|
378
|
+
ADAPTER_ID_FIELD_NUMBER: _ClassVar[int]
|
379
|
+
adapter_id: str
|
380
|
+
def __init__(self, adapter_id: _Optional[str] = ...) -> None: ...
|
381
|
+
|
382
|
+
class UnloadLoRAResponse(_message.Message):
|
383
|
+
__slots__ = ("success", "message")
|
384
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
385
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
386
|
+
success: bool
|
387
|
+
message: str
|
388
|
+
def __init__(self, success: bool = ..., message: _Optional[str] = ...) -> None: ...
|
389
|
+
|
390
|
+
class UpdateWeightsRequest(_message.Message):
|
391
|
+
__slots__ = ("disk_path", "tensor_data", "remote_url", "weight_name")
|
392
|
+
DISK_PATH_FIELD_NUMBER: _ClassVar[int]
|
393
|
+
TENSOR_DATA_FIELD_NUMBER: _ClassVar[int]
|
394
|
+
REMOTE_URL_FIELD_NUMBER: _ClassVar[int]
|
395
|
+
WEIGHT_NAME_FIELD_NUMBER: _ClassVar[int]
|
396
|
+
disk_path: str
|
397
|
+
tensor_data: bytes
|
398
|
+
remote_url: str
|
399
|
+
weight_name: str
|
400
|
+
def __init__(self, disk_path: _Optional[str] = ..., tensor_data: _Optional[bytes] = ..., remote_url: _Optional[str] = ..., weight_name: _Optional[str] = ...) -> None: ...
|
401
|
+
|
402
|
+
class UpdateWeightsResponse(_message.Message):
|
403
|
+
__slots__ = ("success", "message")
|
404
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
405
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
406
|
+
success: bool
|
407
|
+
message: str
|
408
|
+
def __init__(self, success: bool = ..., message: _Optional[str] = ...) -> None: ...
|
409
|
+
|
410
|
+
class GetInternalStateRequest(_message.Message):
|
411
|
+
__slots__ = ("state_keys",)
|
412
|
+
STATE_KEYS_FIELD_NUMBER: _ClassVar[int]
|
413
|
+
state_keys: _containers.RepeatedScalarFieldContainer[str]
|
414
|
+
def __init__(self, state_keys: _Optional[_Iterable[str]] = ...) -> None: ...
|
415
|
+
|
416
|
+
class GetInternalStateResponse(_message.Message):
|
417
|
+
__slots__ = ("state",)
|
418
|
+
STATE_FIELD_NUMBER: _ClassVar[int]
|
419
|
+
state: _struct_pb2.Struct
|
420
|
+
def __init__(self, state: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
421
|
+
|
422
|
+
class SetInternalStateRequest(_message.Message):
|
423
|
+
__slots__ = ("state",)
|
424
|
+
STATE_FIELD_NUMBER: _ClassVar[int]
|
425
|
+
state: _struct_pb2.Struct
|
426
|
+
def __init__(self, state: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
427
|
+
|
428
|
+
class SetInternalStateResponse(_message.Message):
|
429
|
+
__slots__ = ("success", "message")
|
430
|
+
SUCCESS_FIELD_NUMBER: _ClassVar[int]
|
431
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
432
|
+
success: bool
|
433
|
+
message: str
|
434
|
+
def __init__(self, success: bool = ..., message: _Optional[str] = ...) -> None: ...
|
@@ -0,0 +1,239 @@
|
|
1
|
+
# This file is auto-generated. Do not edit manually.
|
2
|
+
# Regenerate with: python compile_proto.py
|
3
|
+
|
4
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
5
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
6
|
+
import grpc
|
7
|
+
import warnings
|
8
|
+
|
9
|
+
from . import sglang_scheduler_pb2 as sglang__scheduler__pb2
|
10
|
+
|
11
|
+
GRPC_GENERATED_VERSION = '1.74.0'
|
12
|
+
GRPC_VERSION = grpc.__version__
|
13
|
+
_version_not_supported = False
|
14
|
+
|
15
|
+
try:
|
16
|
+
from grpc._utilities import first_version_is_lower
|
17
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
18
|
+
except ImportError:
|
19
|
+
_version_not_supported = True
|
20
|
+
|
21
|
+
if _version_not_supported:
|
22
|
+
raise RuntimeError(
|
23
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
24
|
+
+ f' but the generated code in sglang_scheduler_pb2_grpc.py depends on'
|
25
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
26
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
27
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
28
|
+
)
|
29
|
+
|
30
|
+
|
31
|
+
class SglangSchedulerStub(object):
|
32
|
+
"""Service definition for SGLang scheduler communication
|
33
|
+
This protocol bridges the Rust router and Python scheduler
|
34
|
+
"""
|
35
|
+
|
36
|
+
def __init__(self, channel):
|
37
|
+
"""Constructor.
|
38
|
+
|
39
|
+
Args:
|
40
|
+
channel: A grpc.Channel.
|
41
|
+
"""
|
42
|
+
self.Generate = channel.unary_stream(
|
43
|
+
'/sglang.grpc.scheduler.SglangScheduler/Generate',
|
44
|
+
request_serializer=sglang__scheduler__pb2.GenerateRequest.SerializeToString,
|
45
|
+
response_deserializer=sglang__scheduler__pb2.GenerateResponse.FromString,
|
46
|
+
_registered_method=True)
|
47
|
+
self.Embed = channel.unary_unary(
|
48
|
+
'/sglang.grpc.scheduler.SglangScheduler/Embed',
|
49
|
+
request_serializer=sglang__scheduler__pb2.EmbedRequest.SerializeToString,
|
50
|
+
response_deserializer=sglang__scheduler__pb2.EmbedResponse.FromString,
|
51
|
+
_registered_method=True)
|
52
|
+
self.HealthCheck = channel.unary_unary(
|
53
|
+
'/sglang.grpc.scheduler.SglangScheduler/HealthCheck',
|
54
|
+
request_serializer=sglang__scheduler__pb2.HealthCheckRequest.SerializeToString,
|
55
|
+
response_deserializer=sglang__scheduler__pb2.HealthCheckResponse.FromString,
|
56
|
+
_registered_method=True)
|
57
|
+
self.Abort = channel.unary_unary(
|
58
|
+
'/sglang.grpc.scheduler.SglangScheduler/Abort',
|
59
|
+
request_serializer=sglang__scheduler__pb2.AbortRequest.SerializeToString,
|
60
|
+
response_deserializer=sglang__scheduler__pb2.AbortResponse.FromString,
|
61
|
+
_registered_method=True)
|
62
|
+
|
63
|
+
|
64
|
+
class SglangSchedulerServicer(object):
|
65
|
+
"""Service definition for SGLang scheduler communication
|
66
|
+
This protocol bridges the Rust router and Python scheduler
|
67
|
+
"""
|
68
|
+
|
69
|
+
def Generate(self, request, context):
|
70
|
+
"""Submit a generation request (supports streaming)
|
71
|
+
"""
|
72
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
73
|
+
context.set_details('Method not implemented!')
|
74
|
+
raise NotImplementedError('Method not implemented!')
|
75
|
+
|
76
|
+
def Embed(self, request, context):
|
77
|
+
"""Submit an embedding request
|
78
|
+
"""
|
79
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
80
|
+
context.set_details('Method not implemented!')
|
81
|
+
raise NotImplementedError('Method not implemented!')
|
82
|
+
|
83
|
+
def HealthCheck(self, request, context):
|
84
|
+
"""Health check and metrics
|
85
|
+
"""
|
86
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
87
|
+
context.set_details('Method not implemented!')
|
88
|
+
raise NotImplementedError('Method not implemented!')
|
89
|
+
|
90
|
+
def Abort(self, request, context):
|
91
|
+
"""Abort a running request
|
92
|
+
"""
|
93
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
94
|
+
context.set_details('Method not implemented!')
|
95
|
+
raise NotImplementedError('Method not implemented!')
|
96
|
+
|
97
|
+
|
98
|
+
def add_SglangSchedulerServicer_to_server(servicer, server):
|
99
|
+
rpc_method_handlers = {
|
100
|
+
'Generate': grpc.unary_stream_rpc_method_handler(
|
101
|
+
servicer.Generate,
|
102
|
+
request_deserializer=sglang__scheduler__pb2.GenerateRequest.FromString,
|
103
|
+
response_serializer=sglang__scheduler__pb2.GenerateResponse.SerializeToString,
|
104
|
+
),
|
105
|
+
'Embed': grpc.unary_unary_rpc_method_handler(
|
106
|
+
servicer.Embed,
|
107
|
+
request_deserializer=sglang__scheduler__pb2.EmbedRequest.FromString,
|
108
|
+
response_serializer=sglang__scheduler__pb2.EmbedResponse.SerializeToString,
|
109
|
+
),
|
110
|
+
'HealthCheck': grpc.unary_unary_rpc_method_handler(
|
111
|
+
servicer.HealthCheck,
|
112
|
+
request_deserializer=sglang__scheduler__pb2.HealthCheckRequest.FromString,
|
113
|
+
response_serializer=sglang__scheduler__pb2.HealthCheckResponse.SerializeToString,
|
114
|
+
),
|
115
|
+
'Abort': grpc.unary_unary_rpc_method_handler(
|
116
|
+
servicer.Abort,
|
117
|
+
request_deserializer=sglang__scheduler__pb2.AbortRequest.FromString,
|
118
|
+
response_serializer=sglang__scheduler__pb2.AbortResponse.SerializeToString,
|
119
|
+
),
|
120
|
+
}
|
121
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
122
|
+
'sglang.grpc.scheduler.SglangScheduler', rpc_method_handlers)
|
123
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
124
|
+
server.add_registered_method_handlers('sglang.grpc.scheduler.SglangScheduler', rpc_method_handlers)
|
125
|
+
|
126
|
+
|
127
|
+
# This class is part of an EXPERIMENTAL API.
|
128
|
+
class SglangScheduler(object):
|
129
|
+
"""Service definition for SGLang scheduler communication
|
130
|
+
This protocol bridges the Rust router and Python scheduler
|
131
|
+
"""
|
132
|
+
|
133
|
+
@staticmethod
|
134
|
+
def Generate(request,
|
135
|
+
target,
|
136
|
+
options=(),
|
137
|
+
channel_credentials=None,
|
138
|
+
call_credentials=None,
|
139
|
+
insecure=False,
|
140
|
+
compression=None,
|
141
|
+
wait_for_ready=None,
|
142
|
+
timeout=None,
|
143
|
+
metadata=None):
|
144
|
+
return grpc.experimental.unary_stream(
|
145
|
+
request,
|
146
|
+
target,
|
147
|
+
'/sglang.grpc.scheduler.SglangScheduler/Generate',
|
148
|
+
sglang__scheduler__pb2.GenerateRequest.SerializeToString,
|
149
|
+
sglang__scheduler__pb2.GenerateResponse.FromString,
|
150
|
+
options,
|
151
|
+
channel_credentials,
|
152
|
+
insecure,
|
153
|
+
call_credentials,
|
154
|
+
compression,
|
155
|
+
wait_for_ready,
|
156
|
+
timeout,
|
157
|
+
metadata,
|
158
|
+
_registered_method=True)
|
159
|
+
|
160
|
+
@staticmethod
|
161
|
+
def Embed(request,
|
162
|
+
target,
|
163
|
+
options=(),
|
164
|
+
channel_credentials=None,
|
165
|
+
call_credentials=None,
|
166
|
+
insecure=False,
|
167
|
+
compression=None,
|
168
|
+
wait_for_ready=None,
|
169
|
+
timeout=None,
|
170
|
+
metadata=None):
|
171
|
+
return grpc.experimental.unary_unary(
|
172
|
+
request,
|
173
|
+
target,
|
174
|
+
'/sglang.grpc.scheduler.SglangScheduler/Embed',
|
175
|
+
sglang__scheduler__pb2.EmbedRequest.SerializeToString,
|
176
|
+
sglang__scheduler__pb2.EmbedResponse.FromString,
|
177
|
+
options,
|
178
|
+
channel_credentials,
|
179
|
+
insecure,
|
180
|
+
call_credentials,
|
181
|
+
compression,
|
182
|
+
wait_for_ready,
|
183
|
+
timeout,
|
184
|
+
metadata,
|
185
|
+
_registered_method=True)
|
186
|
+
|
187
|
+
@staticmethod
|
188
|
+
def HealthCheck(request,
|
189
|
+
target,
|
190
|
+
options=(),
|
191
|
+
channel_credentials=None,
|
192
|
+
call_credentials=None,
|
193
|
+
insecure=False,
|
194
|
+
compression=None,
|
195
|
+
wait_for_ready=None,
|
196
|
+
timeout=None,
|
197
|
+
metadata=None):
|
198
|
+
return grpc.experimental.unary_unary(
|
199
|
+
request,
|
200
|
+
target,
|
201
|
+
'/sglang.grpc.scheduler.SglangScheduler/HealthCheck',
|
202
|
+
sglang__scheduler__pb2.HealthCheckRequest.SerializeToString,
|
203
|
+
sglang__scheduler__pb2.HealthCheckResponse.FromString,
|
204
|
+
options,
|
205
|
+
channel_credentials,
|
206
|
+
insecure,
|
207
|
+
call_credentials,
|
208
|
+
compression,
|
209
|
+
wait_for_ready,
|
210
|
+
timeout,
|
211
|
+
metadata,
|
212
|
+
_registered_method=True)
|
213
|
+
|
214
|
+
@staticmethod
|
215
|
+
def Abort(request,
|
216
|
+
target,
|
217
|
+
options=(),
|
218
|
+
channel_credentials=None,
|
219
|
+
call_credentials=None,
|
220
|
+
insecure=False,
|
221
|
+
compression=None,
|
222
|
+
wait_for_ready=None,
|
223
|
+
timeout=None,
|
224
|
+
metadata=None):
|
225
|
+
return grpc.experimental.unary_unary(
|
226
|
+
request,
|
227
|
+
target,
|
228
|
+
'/sglang.grpc.scheduler.SglangScheduler/Abort',
|
229
|
+
sglang__scheduler__pb2.AbortRequest.SerializeToString,
|
230
|
+
sglang__scheduler__pb2.AbortResponse.FromString,
|
231
|
+
options,
|
232
|
+
channel_credentials,
|
233
|
+
insecure,
|
234
|
+
call_credentials,
|
235
|
+
compression,
|
236
|
+
wait_for_ready,
|
237
|
+
timeout,
|
238
|
+
metadata,
|
239
|
+
_registered_method=True)
|