Repository Analysis

sgl-project/sglang

SGLang is a high-performance serving framework for large language models and multimodal models.

18.2 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of sgl-project/sglang, a Python project with 32,626 GitHub stars. SynthScan v2.0 examined 2,378,739 lines of code across 7730 source files, recording 34962 pattern matches distributed across 25 syntactic categories. The overall adjusted score of 18.2 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

18.2
Adjusted Score
18.2
Raw Score
100%
Time Factor
2026-08-28
Last Push
32.6K
Stars
Python
Language
2.4M
Lines of Code
7.7K
Files
35.0K
Pattern Hits
2026-08-29
Scan Date
0.06
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 9HIGH 445MEDIUM 3205LOW 31303

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 34962 distinct pattern matches across 25 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers19974 hits · 19668 pts
SeverityFileLineSnippetContext
LOWbenchmark/kernels/attention/sm90_config_search.py183def find_feasible_bwd_configs(CODE
LOWbenchmark/kernels/attention/sm90_config_search.py327def find_feasible_fwd_configs(CODE
LOW…ing_window_attention_triton/bench_triton_swa_kernel.py11def extend_attention_fwd_torch(CODE
LOWbenchmark/kernels/all_gather/benchmark_aiter.py175def expected_logical_all_gather(CODE
LOWbenchmark/kernels/all_gather/benchmark_aiter.py230def install_aiter_aot_import_shims() -> None:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py122def cleanup_flashinfer_workspace(ipc_handles):CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py85def setup_flashinfer_workspace(CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py153 def get_trtllm_fused_allreduce_kwargs(self):CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py163def flashinfer_fused_allreduce_rmsnorm(CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py288def standard_allreduce_rmsnorm(CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py398def standard_allreduce_rmsnorm_native(CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py479def standard_allreduce_rmsnorm_native_compiled(CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py895def prepare_results_with_speedups(results_dict):CODE
LOW…uler_batch/benchmark_write_req_to_token_pool_triton.py12def write_req_to_token_pool_triton(CODE
LOW…uler_batch/benchmark_write_req_to_token_pool_triton.py49def write_req_to_token_pool_triton_optimize(CODE
LOW…uler_batch/benchmark_write_req_to_token_pool_triton.py91def write_req_to_token_pool_reference(CODE
LOW…uler_batch/benchmark_write_req_to_token_pool_triton.py114def test_write_req_to_token_pool():CODE
LOWbenchmark/kernels/fused_moe_triton/common_utils.py24def calculate_shard_intermediate_size(CODE
LOWbenchmark/kernels/fused_moe_triton/common_utils.py211def get_rocm_configs_compute_bound() -> List[Dict[str, int]]:CODE
LOWbenchmark/kernels/fused_moe_triton/common_utils.py234def get_configs_compute_bound() -> List[Dict[str, int]]:CODE
LOWbenchmark/kernels/deepseek/benchmark_q8kv8_kv_gather.py92def build_page_table_flattened(CODE
LOW…nels/deepseek/benchmark_deepgemm_fp8_gemm_blackwell.py231def get_benchmark_plot_friendly(tp_size):CODE
LOW…hmark/kernels/quantization/tuning_block_wise_kernel.py148def get_rocm_configs_compute_bound():CODE
LOW…hmark/kernels/quantization/tuning_block_wise_kernel.py171def get_configs_compute_bound():CODE
LOW…s/decoding_attention_triton/triton_flashinfer_cudnn.py98def decode_attention_flashinfer(dtype, head_num_q, head_num_kv):CODE
LOWbenchmark/mmmu/bench_sglang.py127async def process_sample_with_semaphore(CODE
LOWbenchmark/mmmu/eval_utils.py292def _parse_explicit_multi_choice_answer(response, all_choices):CODE
LOWbenchmark/mmmu/eval_utils.py303def parse_multi_choice_response(response, all_choices, index2ans):CODE
LOW…hmark/bench_pynccl_allocator/bench_segment_tracking.py56def bench_register_segments_with_comm(CODE
LOW…hmark/bench_pynccl_allocator/bench_segment_tracking.py114def bench_with_various_segment_counts(CODE
LOWbenchmark/ocr/eval_utils.py440def eval_math_formula_accuracy(test: dict, ocr_output: str) -> bool:CODE
LOWbenchmark/scheduler/bench_token_storage.py84def _batch_tensor_from_pyarrays(parts: list[array]) -> torch.Tensor:CODE
LOWbenchmark/scheduler/bench_token_storage.py256def microbench_torch_tensor_paths(CODE
LOWbenchmark/hicache/bench_mix.py299async def async_request_sglang_generate(CODE
LOWbenchmark/hicache/bench_warm_cache.py90def _create_bench_client_session() -> aiohttp.ClientSession:CODE
LOWbenchmark/hicache/bench_warm_cache.py97async def async_request_sglang_generate(CODE
LOWbenchmark/hicache/bench_warm_cache.py413def maybe_write_summary_jsonl(CODE
LOWbenchmark/hicache/bench_warm_cache.py472async def benchmark_shared_prefix_pct(CODE
LOWbenchmark/hicache/bench_serving.py71async def async_request_openai_completions(CODE
LOWbenchmark/hicache/data_processing.py150def sample_ultrachat_requests(CODE
LOWbenchmark/hicache/data_processing.py434def sample_generated_shared_prefix_requests(CODE
LOWbenchmark/hicache/bench_hicache_write_back.py69def _validate_mha_correctness(CODE
LOWbenchmark/hicache/bench_hicache_write_back.py88def _validate_mla_correctness(CODE
LOWbenchmark/prefill_only/bench_score.py65def create_score_request_builder():CODE
LOWbenchmark/prefill_only/bench_score.py80 def generate_text_with_token_count_local(num_toks):CODE
LOWbenchmark/prefill_only/bench_score.py120def build_warmup_score_request() -> dict:CODE
LOWbenchmark/prefill_only/util.py46def generate_text_with_token_count(CODE
LOWbenchmark/prefill_only/util.py106def prepare_all_requests_parallel(CODE
LOWbenchmark/prefill_only/util.py398async def perform_global_warmup_and_freeze(CODE
LOWbenchmark/prefill_only/bench_embeddings.py100def validate_embeddings_response(response_data: dict) -> bool:CODE
LOWbenchmark/prefill_only/bench_embeddings.py110def build_warmup_embeddings_request() -> dict:CODE
LOWbenchmark/asr/bench_sglang.py55def run_asr_transcription_sync(client, model_name, y, sr, language=None):CODE
LOWbenchmark/asr/bench_sglang.py75def run_asr_transcription_stream_sync(CODE
LOWbenchmark/lora/lora_bench.py48async def async_request_openai_completions(CODE
LOW…ark/bench_linear_attention/bench_cutedsl_kda_decode.py157def run_prefill_then_decode_baseline(inp):CODE
LOW…ark/bench_linear_attention/bench_cutedsl_kda_decode.py193def run_prefill_then_decode_cutedsl(inp):CODE
LOW…l/sgl-router/tests/scripts/generate_parity_fixtures.py63def load_tokenizer_with_fallback(primary, fallback, slug):CODE
LOW…sgl-router/tests/e2e/k8s_integration/test_lifecycle.py54 def test_router_routes_after_scale_up(self, router_url):CODE
LOW…sgl-router/tests/e2e/k8s_integration/test_lifecycle.py68 def test_router_recovers_after_scale_to_zero_and_back(self, router_url):CODE
LOW…sgl-router/tests/e2e/k8s_integration/test_lifecycle.py88 def test_router_rediscovers_workers_after_restart(self, k8s_cluster):CODE
19914 more matches not shown…
Decorative Section Separators2682 hits · 8632 pts
SeverityFileLineSnippetContext
MEDIUMbenchmark/kernels/attention/sm90_config_search.py62# ============================================================================COMMENT
MEDIUMbenchmark/kernels/attention/sm90_config_search.py64# ============================================================================COMMENT
MEDIUMbenchmark/kernels/attention/sm90_config_search.py267# ============================================================================COMMENT
MEDIUMbenchmark/kernels/attention/sm90_config_search.py269# ============================================================================COMMENT
MEDIUMbenchmark/kernels/attention/sm90_config_search.py377# ============================================================================COMMENT
MEDIUMbenchmark/kernels/attention/sm90_config_search.py379# ============================================================================COMMENT
MEDIUMbenchmark/kernels/deepseek/benchmark_q8kv8_kv_gather.py170 # ------------------------------------------------------------------COMMENT
MEDIUMbenchmark/kernels/deepseek/benchmark_q8kv8_kv_gather.py172 # ------------------------------------------------------------------COMMENT
MEDIUMbenchmark/kernels/deepseek/benchmark_q8kv8_kv_gather.py201 # ------------------------------------------------------------------COMMENT
MEDIUMbenchmark/kernels/deepseek/benchmark_q8kv8_kv_gather.py203 # ------------------------------------------------------------------COMMENT
MEDIUM…hmark/kernels/quantization/tuning_block_wise_kernel.py13# ==============================================================================COMMENT
MEDIUMbenchmark/kernels/lora_csgmv/tune_lora_csgmv.py128# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/kernels/lora_csgmv/tune_lora_csgmv.py130# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/kernels/lora_csgmv/tune_lora_csgmv.py181# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/kernels/lora_csgmv/tune_lora_csgmv.py183# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/kernels/lora_csgmv/tune_lora_csgmv.py333# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/kernels/lora_csgmv/tune_lora_csgmv.py335# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/kernels/lora_csgmv/tune_lora_csgmv.py390# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/kernels/lora_csgmv/tune_lora_csgmv.py392# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py367# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py369# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py372# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py374# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py54# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py56# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py67# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py69# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py86# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py88# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py214# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py216# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py263# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py265# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py310# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py312# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py565# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py567# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py625# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/bench_sglang.py627# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/generate_report.py30# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/generate_report.py32# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/generate_report.py75# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/generate_report.py77# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/generate_report.py273# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/generate_report.py275# ---------------------------------------------------------------------------COMMENT
MEDIUMbenchmark/ocr/generate_report.py322# ---------------------------------------------------------------------------STRING
MEDIUMbenchmark/ocr/generate_report.py324# ---------------------------------------------------------------------------STRING
MEDIUMbenchmark/ocr/eval_utils.py22# ── Unicode normalization ─────────────────────────────────────────────────────COMMENT
MEDIUMbenchmark/ocr/eval_utils.py50# ── Matching helpers ──────────────────────────────────────────────────────────COMMENT
MEDIUMbenchmark/ocr/eval_utils.py96# ── olmOCR-bench test evaluators ─────────────────────────────────────────────COMMENT
MEDIUMbenchmark/ocr/eval_utils.py190# ── Table parsing helpers ─────────────────────────────────────────────────────COMMENT
MEDIUMbenchmark/ocr/eval_utils.py291 # ── 1. Structured tables (HTML <tr>/<td> or Markdown) ────────────────────COMMENT
MEDIUMbenchmark/ocr/eval_utils.py342 # ── 2. Flat <table>…</table> fallback (DeepSeek-OCR-2 format) ────────────COMMENT
MEDIUMbenchmark/ocr/eval_utils.py429# Math formula evaluation ─────────────────────────────────────────────────────COMMENT
MEDIUMbenchmark/ocr/eval_utils.py467# ── Main dispatcher ───────────────────────────────────────────────────────────COMMENT
MEDIUMbenchmark/ocr/eval_utils.py510# ── Aggregation & reporting ───────────────────────────────────────────────────COMMENT
MEDIUMbenchmark/ocr/eval_utils.py602# ── Normalized Edit Distance (OmniDocBench-style text quality metric) ─────────COMMENT
MEDIUMbenchmark/lora/lora_bench.py13# ==============================================================================COMMENT
MEDIUM…ark/bench_linear_attention/bench_kda_flashinfer_mtp.py50# ---------------------------------------------------------------------------COMMENT
MEDIUM…ark/bench_linear_attention/bench_kda_flashinfer_mtp.py52# ---------------------------------------------------------------------------COMMENT
2622 more matches not shown…
Unused Imports3258 hits · 3042 pts
SeverityFileLineSnippetContext
LOW…nchmark/kernels/attention/bench_flash_attention_fp8.py13CODE
LOW…chmark/kernels/attention/bench_gdn_replayssm_decode.py23CODE
LOWbenchmark/kernels/all_gather/benchmark_aiter.py16CODE
LOW…ls/deepseek/benchmark_cute_dsl_fp8_paged_mqa_logits.py3CODE
LOWbenchmark/scheduler/bench_token_storage.py25CODE
LOWbenchmark/hicache/perf.py1CODE
LOWbenchmark/hicache/bench_hicache_write_back.py1CODE
LOWbenchmark/unified_memory/bench_peer_aware_eviction.py22CODE
LOWbenchmark/bench_linear_attention/bench_gdn_qkv_split.py1CODE
LOW…router/tests/scripts/generate_kv_events_hash_parity.py48CODE
LOW…perimental/sgl-router/tests/e2e/test_tokenize_smoke.py5CODE
LOWexperimental/sgl-router/tests/e2e/conftest.py21CODE
LOWexperimental/sgl-router/tests/e2e/test_chat_smoke.py5CODE
LOWexperimental/sgl-router/tests/e2e/test_chat_smoke.py8CODE
LOWexperimental/sgl-router/tests/e2e/infra/gateway.py25CODE
LOWexperimental/sgl-router/tests/e2e/infra/model_specs.py16CODE
LOWexperimental/sgl-router/tests/e2e/infra/model_pool.py19CODE
LOW…al/sgl-router/tests/e2e/k8s_integration/fake_worker.py10CODE
LOW…sgl-router/tests/e2e/k8s_integration/test_lifecycle.py14CODE
LOW…sgl-router/tests/e2e/k8s_integration/test_lifecycle.py16CODE
LOW…sgl-router/tests/e2e/k8s_integration/test_lifecycle.py19CODE
LOW…sgl-router/tests/e2e/k8s_integration/test_lifecycle.py20CODE
LOW…ental/sgl-router/tests/e2e/k8s_integration/conftest.py12CODE
LOW…sgl-router/tests/e2e/k8s_integration/test_discovery.py8CODE
LOW…sgl-router/tests/e2e/k8s_integration/test_discovery.py11CODE
LOW…sgl-router/tests/e2e/k8s_integration/test_discovery.py12CODE
LOW…uter/tests/e2e/k8s_integration/test_cross_namespace.py15CODE
LOW…uter/tests/e2e/k8s_integration/test_cross_namespace.py18CODE
LOW…outer/tests/e2e/k8s_integration/test_reconciliation.py16CODE
LOW…outer/tests/e2e/k8s_integration/test_reconciliation.py18CODE
LOW…l-router/tests/e2e/chat_completions/test_validation.py14CODE
LOW…r/tests/e2e/chat_completions/test_load_based_policy.py6CODE
LOW…ts/e2e/chat_completions/test_two_router_convergence.py17CODE
LOWtools/expert_pack/build.py2CODE
LOWtools/expert_pack/prepare_deepseek_pack.py4CODE
LOWtools/expert_pack/prepare_kimi_pack.py5CODE
LOWtools/expert_pack/kimi_ggml.py5CODE
LOWtools/expert_pack/format.py2CODE
LOWtools/expert_pack/validate.py2CODE
LOWtools/expert_pack/prepare_kimi_manifest.py5CODE
LOWtest/manual/test_ray_engine.py25CODE
LOWtest/manual/quant/test_block_fp8.py693CODE
LOWtest/manual/kernels/test_hisparse_prefetch.py36CODE
LOWtest/manual/layers/moe/bench_mxfp4_sm90_kernels.py21CODE
LOWtest/manual/kv_canary/test_self_e2e_baseline_dsv4.py1CODE
LOWtest/manual/dsv4/test_wo_a_fp8_sm90.py13CODE
LOWtest/registered/kernels/test_kernel_inventory.py3CODE
LOWtest/registered/kernels/test_jit_cache.py8CODE
LOW…d/kernels/benchmark/attention/bench_online_c128_mtp.py3CODE
LOW…/kernels/benchmark/attention/bench_dsv4_fp4_indexer.py1CODE
LOW…hmark/attention/bench_sparse_mla_q8kv8_prefill_sm90.py1CODE
LOW…registered/kernels/benchmark/kv_canary/bench_verify.py1CODE
LOW…t/registered/kernels/benchmark/kv_canary/bench_plan.py1CODE
LOW…/registered/kernels/benchmark/kv_canary/bench_write.py1CODE
LOW…els/benchmark/kv_canary/bench_scatter_req_token_ids.py1CODE
LOW…red/kernels/benchmark/layernorm/bench_fused_eh_norm.py1CODE
LOW…red/kernels/benchmark/gemm/bench_fp8_blockwise_gemm.py1CODE
LOW…ered/kernels/benchmark/speculative/bench_spec_topk1.py3CODE
LOW…s/benchmark/communication/bench_symm_mem_all_gather.py19CODE
LOW…red/kernels/benchmark/communication/bench_tp_qknorm.py13CODE
3198 more matches not shown…
Excessive Try-Catch Wrapping1895 hits · 2163 pts
SeverityFileLineSnippetContext
LOWbenchmark/bench_adaptive_speculative.py70 except Exception as e:CODE
LOW…nchmark/kernels/attention/bench_flash_attention_fp8.py363 except Exception as e:CODE
LOW…nchmark/kernels/attention/bench_flash_attention_fp8.py445 except Exception as e:CODE
LOWbenchmark/kernels/all_gather/benchmark_aiter.py365 except Exception:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py117 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py130 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py47except Exception: # pragma: no cover - fallback on non-supported platformsCODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py651 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py665 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py684 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py701 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py721 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py738 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py763 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py788 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py812 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py829 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py855 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py883 except Exception as e:CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py1084 except Exception as e:CODE
LOWbenchmark/kernels/all_reduce/benchmark_aiter.py227 except Exception as e:CODE
LOWbenchmark/kernels/all_reduce/benchmark_aiter.py237 except Exception as e:CODE
LOWbenchmark/kernels/all_reduce/benchmark_aiter.py253 except Exception as e:CODE
LOWbenchmark/kernels/all_reduce/benchmark_aiter.py265 except Exception as e:CODE
LOWbenchmark/kernels/all_reduce/benchmark_aiter.py305 except Exception:CODE
LOWbenchmark/kernels/all_reduce/benchmark_all_reduce.py245 except Exception as e:CODE
LOWbenchmark/kernels/all_reduce/benchmark_all_reduce.py255 except Exception as e:CODE
LOWbenchmark/kernels/all_reduce/benchmark_all_reduce.py274 except Exception as e:CODE
LOWbenchmark/kernels/all_reduce/benchmark_all_reduce.py284 except Exception as e:CODE
LOWbenchmark/kernels/all_reduce/benchmark_all_reduce.py324 except Exception:CODE
LOWbenchmark/kernels/deepseek/benchmark_q8kv8_q_prep.py335 except Exception as e:CODE
LOWbenchmark/kernels/deepseek/benchmark_q8kv8_q_prep.py383 except Exception as e:CODE
LOWbenchmark/kernels/lora_csgmv/tune_lora_csgmv.py228 except Exception:CODE
LOWbenchmark/kernels/lora_csgmv/tune_lora_csgmv.py305 except Exception:CODE
LOWbenchmark/mmmu/bench_sglang.py64 except Exception:CODE
LOWbenchmark/mmmu/bench_hf.py35 except Exception as first_exception:CODE
LOWbenchmark/mmmu/bench_hf.py60 except Exception as second_exception:CODE
LOWbenchmark/mmmu/eval_utils.py195 except Exception as exc:CODE
MEDIUMbenchmark/mmmu/eval_utils.py514 print(f"Error to extract answer from: {pred_i}")CODE
MEDIUM…hmark/bench_pynccl_allocator/bench_segment_tracking.py195 print("Error: CUDA is not available. This benchmark requires a GPU.")CODE
LOWbenchmark/ocr/bench_sglang.py363 except Exception:CODE
LOWbenchmark/ocr/bench_sglang.py449 except Exception as exc:CODE
LOWbenchmark/ocr/bench_sglang.py460 except Exception as exc:CODE
LOWbenchmark/ocr/bench_sglang.py686 except Exception as exc:CODE
LOWbenchmark/ocr/eval_utils.py503 except Exception as exc:CODE
LOWbenchmark/hicache/bench_mix.py362 except Exception as e:CODE
LOWbenchmark/hicache/bench_mix.py423 except Exception as e:CODE
MEDIUMbenchmark/hicache/bench_mix.py479 print(f"Error processing response for client {user_data}: {e}")CODE
MEDIUMbenchmark/hicache/bench_mix.py417def handle_request(self, user_data):CODE
LOWbenchmark/hicache/bench_warm_cache.py169 except Exception as exc:CODE
LOWbenchmark/hicache/bench_serving.py194 except Exception:CODE
LOWbenchmark/hicache/bench_serving.py214 except Exception:CODE
LOWbenchmark/hicache/bench_serving.py273 except Exception as e:CODE
MEDIUMbenchmark/hicache/bench_serving.py632 print(f"Error running benchmark for request rate: {request_rate}")CODE
LOWbenchmark/hicache/bench_serving.py739 except Exception as e:CODE
LOWbenchmark/hicache/bench_buffer_mode.py136 except Exception:CODE
LOWbenchmark/hicache/bench_buffer_mode.py242 except Exception:CODE
MEDIUMbenchmark/hicache/bench_buffer_mode.py133def scrape_metrics(base_url):CODE
MEDIUMbenchmark/hicache/bench_multiturn.py180 print(f"Error writing to JSONL file: {e}")CODE
LOWbenchmark/hicache/bench_multiturn.py395 except Exception as e:CODE
1835 more matches not shown…
Deep Nesting2147 hits · 1860 pts
SeverityFileLineSnippetContext
LOWbenchmark/kernels/attention/fa4_benchmark_utils.py215CODE
LOWbenchmark/kernels/attention/sm90_config_search.py183CODE
LOWbenchmark/kernels/attention/sm90_config_search.py327CODE
LOW…nchmark/kernels/attention/bench_flash_attention_fp8.py244CODE
LOWbenchmark/kernels/all_gather/benchmark_aiter.py290CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py606CODE
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py895CODE
LOW…kernels/all_reduce/benchmark_fused_ar_rms_quant_amd.py223CODE
LOW…hmark/kernels/all_reduce/benchmark_fused_ar_rms_amd.py367CODE
LOW…/fused_moe_triton/benchmark_torch_compile_fused_moe.py16CODE
LOW…ernels/fused_moe_triton/tuning_fused_moe_triton_sep.py632CODE
LOWbenchmark/kernels/fused_moe_triton/common_utils.py33CODE
LOWbenchmark/kernels/fused_moe_triton/common_utils.py211CODE
LOWbenchmark/kernels/fused_moe_triton/common_utils.py234CODE
LOWbenchmark/kernels/deepseek/benchmark_q8kv8_q_prep.py272CODE
LOW…ls/deepseek/benchmark_cute_dsl_fp8_paged_mqa_logits.py89CODE
LOW…hmark/kernels/quantization/tuning_block_wise_kernel.py148CODE
LOW…hmark/kernels/quantization/tuning_block_wise_kernel.py171CODE
LOWbenchmark/kernels/lora_csgmv/tune_lora_csgmv.py133CODE
LOWbenchmark/kernels/lora_csgmv/tune_lora_csgmv.py151CODE
LOWbenchmark/kernels/deepep/deepep_utils.py157CODE
LOWbenchmark/kernels/deepep/tuning_deepep.py30CODE
LOW…s/decoding_attention_triton/triton_flashinfer_cudnn.py159CODE
LOWbenchmark/mmmu/eval_utils.py154CODE
LOWbenchmark/mmmu/eval_utils.py303CODE
LOWbenchmark/mmmu/eval_utils.py423CODE
LOWbenchmark/mmmu/eval_utils.py528CODE
LOWbenchmark/mmmu/eval_utils.py430CODE
LOWbenchmark/ocr/bench_sglang.py430CODE
LOWbenchmark/ocr/generate_report.py148CODE
LOWbenchmark/ocr/eval_utils.py263CODE
LOWbenchmark/ocr/eval_utils.py390CODE
LOWbenchmark/hicache/bench_mix.py299CODE
LOWbenchmark/hicache/nextqa.py9CODE
LOWbenchmark/hicache/bench_warm_cache.py97CODE
LOWbenchmark/hicache/bench_serving.py71CODE
LOWbenchmark/hicache/bench_serving.py286CODE
LOWbenchmark/hicache/data_processing.py37CODE
LOWbenchmark/hicache/data_processing.py198CODE
LOWbenchmark/hicache/data_processing.py267CODE
LOWbenchmark/hicache/data_processing.py520CODE
LOWbenchmark/hicache/bench_buffer_mode.py369CODE
LOWbenchmark/hicache/bench_multiturn.py435CODE
LOWbenchmark/hicache/bench_multiturn.py555CODE
LOWbenchmark/prefill_only/util.py106CODE
LOWbenchmark/prefill_only/util.py284CODE
LOWbenchmark/asr/bench_sglang.py75CODE
LOWbenchmark/lora/lora_bench.py48CODE
LOW…ark/bench_linear_attention/bench_kda_flashinfer_mtp.py203CODE
LOWbenchmark/bench_linear_attention/bench_gdn_decode.py359CODE
LOWbenchmark/bench_linear_attention/bench_gdn_prefill.py520CODE
LOWexperimental/sgl-router/tests/e2e/infra/gateway.py237CODE
LOWexperimental/sgl-router/tests/e2e/infra/gateway.py354CODE
LOWexperimental/sgl-router/tests/e2e/infra/model_pool.py95CODE
LOW…outer/tests/e2e/k8s_integration/test_reconciliation.py85CODE
LOW…l-router/tests/e2e/chat_completions/test_validation.py62CODE
LOW…ts/e2e/chat_completions/test_two_router_convergence.py223CODE
LOWtools/expert_pack/build.py228CODE
LOWtools/expert_pack/kimi_ggml.py380CODE
LOWtools/expert_pack/validate.py64CODE
2087 more matches not shown…
Cross-File Repetition366 hits · 1830 pts
SeverityFileLineSnippetContext
HIGH…hmark/kernels/quantization/tuning_block_wise_kernel.py0this function performs matrix multiplication with block-wise quantization. it takes two input tensors `a` and `b` with sSTRING
HIGHpython/sglang/kernels/ops/quantization/int8_kernel.py0this function performs matrix multiplication with block-wise quantization. it takes two input tensors `a` and `b` with sSTRING
HIGHpython/sglang/kernels/ops/quantization/fp8_kernel.py0this function performs matrix multiplication with block-wise quantization. it takes two input tensors `a` and `b` with sSTRING
HIGH…ph/test_piecewise_cuda_graph_support_1_gpu_archived.py0archived test classes split out of test/registered/4-gpu-models/test_qwen35_models.py. originally registered with `regisSTRING
HIGHtest/manual/quant/test_nvfp4_gemm_archived.py0archived test classes split out of test/registered/4-gpu-models/test_qwen35_models.py. originally registered with `regisSTRING
HIGHtest/manual/quant/test_awq_archived.py0archived test classes split out of test/registered/4-gpu-models/test_qwen35_models.py. originally registered with `regisSTRING
HIGHtest/manual/distributed/test_dp_attention_archived.py0archived test classes split out of test/registered/4-gpu-models/test_qwen35_models.py. originally registered with `regisSTRING
HIGH…/manual/models/test_nvidia_nemotron_3_nano_archived.py0archived test classes split out of test/registered/4-gpu-models/test_qwen35_models.py. originally registered with `regisSTRING
HIGHtest/manual/mla/test_mla_flashinfer_archived.py0archived test classes split out of test/registered/4-gpu-models/test_qwen35_models.py. originally registered with `regisSTRING
HIGHtest/manual/mla/test_flashmla_archived.py0archived test classes split out of test/registered/4-gpu-models/test_qwen35_models.py. originally registered with `regisSTRING
HIGHtest/manual/mla/test_mla_int8_deepseek_v3_archived.py0archived test classes split out of test/registered/4-gpu-models/test_qwen35_models.py. originally registered with `regisSTRING
HIGH…al/4-gpu-models/test_qwen3_next_models_mtp_archived.py0archived test classes split out of test/registered/4-gpu-models/test_qwen35_models.py. originally registered with `regisSTRING
HIGHtest/manual/4-gpu-models/test_qwen35_models_archived.py0archived test classes split out of test/registered/4-gpu-models/test_qwen35_models.py. originally registered with `regisSTRING
HIGHtest/manual/quant/test_block_fp8.py0this function performs matrix multiplication with block-wise quantization using native torch. it takes two input tensorsSTRING
HIGHtest/manual/quant/test_block_fp8_deep_gemm_blackwell.py0this function performs matrix multiplication with block-wise quantization using native torch. it takes two input tensorsSTRING
HIGHtest/registered/quant/test_block_int8.py0this function performs matrix multiplication with block-wise quantization using native torch. it takes two input tensorsSTRING
HIGHtest/manual/nightly/test_vlms_vit_cuda_graph.py0evaluate a vlm on the mmmu validation set with lmms-eval. only `model_version` (checkpoint) and `chat_template` vary; weSTRING
HIGHtest/manual/nightly/test_vlms_vit_flashinfer_cudnn.py0evaluate a vlm on the mmmu validation set with lmms-eval. only `model_version` (checkpoint) and `chat_template` vary; weSTRING
HIGHtest/manual/nightly/test_vlms_piecewise_cuda_graph.py0evaluate a vlm on the mmmu validation set with lmms-eval. only `model_version` (checkpoint) and `chat_template` vary; weSTRING
HIGHpython/sglang/test/kits/mmmu_vlm_kit.py0evaluate a vlm on the mmmu validation set with lmms-eval. only `model_version` (checkpoint) and `chat_template` vary; weSTRING
HIGHtest/manual/nightly/test_vlms_vit_cuda_graph.py0common method to run vlm mmmu benchmark test. args: model: model to test output_path: path for output logs test_name: opSTRING
HIGHtest/manual/nightly/test_vlms_vit_flashinfer_cudnn.py0common method to run vlm mmmu benchmark test. args: model: model to test output_path: path for output logs test_name: opSTRING
HIGHtest/manual/nightly/test_vlms_piecewise_cuda_graph.py0common method to run vlm mmmu benchmark test. args: model: model to test output_path: path for output logs test_name: opSTRING
HIGHpython/sglang/test/kits/mmmu_vlm_kit.py0common method to run vlm mmmu benchmark test. args: model: model to test output_path: path for output logs test_name: opSTRING
HIGHtest/manual/models/test_nvidia_nemotron_nano_v2_vl.py0`--limit=0.1`: 10 percent of each task - this is fine for testing since the nominal result isn't interesting - this run STRING
HIGHtest/registered/models_e2e/test_ministral3_models.py0`--limit=0.1`: 10 percent of each task - this is fine for testing since the nominal result isn't interesting - this run STRING
HIGHtest/registered/models_e2e/test_ministral4_models.py0`--limit=0.1`: 10 percent of each task - this is fine for testing since the nominal result isn't interesting - this run STRING
HIGHtest/registered/quant/test_int8_kernel.py0matrix multiplication function that supports per-token input quantization and per-column weight quantizationSTRING
HIGH…t/registered/moe/test_triton_moe_channel_fp8_kernel.py0matrix multiplication function that supports per-token input quantization and per-column weight quantizationSTRING
HIGHpython/sglang/test/cpu_test_utils.py0matrix multiplication function that supports per-token input quantization and per-column weight quantizationSTRING
HIGHtest/registered/quant/test_int8_kernel.py0this function performs fused moe with per-column int8 quantization using native torch.STRING
HIGH…t/registered/moe/test_triton_moe_channel_fp8_kernel.py0this function performs fused moe with per-column int8 quantization using native torch.STRING
HIGHpython/sglang/test/cpu_test_utils.py0this function performs fused moe with per-column int8 quantization using native torch.STRING
HIGH…stered/kernels/ops/attention/test_flash_attention_4.py0arguments: hidden_states: (total_nnz, ...), where total_nnz = number of tokens in selected in attention_mask. indices: (STRING
HIGHpython/sglang/kernels/aot/tests/test_flash_attention.py0arguments: hidden_states: (total_nnz, ...), where total_nnz = number of tokens in selected in attention_mask. indices: (STRING
HIGH…timodal_gen/runtime/layers/attention/backends/vmoba.py0arguments: hidden_states: (total_nnz, ...), where total_nnz = number of tokens in selected in attention_mask. indices: (STRING
HIGHtest/registered/kernels/ops/attention/test_pos_enc.py0args: x: [num_tokens, num_heads, head_size] or [num_tokens, head_size] cos: [num_tokens, head_size // 2] sin: [num_tokenSTRING
HIGH…nels/aot/python/sgl_kernel/testing/rotary_embedding.py0args: x: [num_tokens, num_heads, head_size] or [num_tokens, head_size] cos: [num_tokens, head_size // 2] sin: [num_tokenSTRING
HIGHpython/sglang/srt/layers/rotary_embedding/utils.py0args: x: [num_tokens, num_heads, head_size] or [num_tokens, head_size] cos: [num_tokens, head_size // 2] sin: [num_tokenSTRING
HIGH…ultimodal_gen/runtime/layers/rotary_embedding/utils.py0args: x: [num_tokens, num_heads, head_size] or [num_tokens, head_size] cos: [num_tokens, head_size // 2] sin: [num_tokenSTRING
HIGH…it/mem_cache/unified_tree_core_inspection_interface.py0delete childless tombstone ancestors until a live or locked node is reached.STRING
HIGH…gistered/unit/mem_cache/unified_tree_core_inspector.py0delete childless tombstone ancestors until a live or locked node is reached.STRING
HIGH…glang/srt/mem_cache/unified_cache/unified_tree_core.py0delete childless tombstone ancestors until a live or locked node is reached.STRING
HIGHtest/registered/cpu/test_qwen3.py0derives `query`, `key` and `value` tensors from `mixed_qkvzba`.STRING
HIGHpython/sglang/srt/models/qwen3_5.py0derives `query`, `key` and `value` tensors from `mixed_qkvzba`.STRING
HIGHpython/sglang/srt/models/qwen3_next.py0derives `query`, `key` and `value` tensors from `mixed_qkvzba`.STRING
HIGH…t/registered/openai_server/basic/test_openai_server.py0extract the name, size, price, and color from this product description as a json object: <description> the smarthome minSTRING
HIGH…ateway/e2e_test/chat_completions/test_openai_server.py0extract the name, size, price, and color from this product description as a json object: <description> the smarthome minSTRING
HIGHexamples/runtime/openai_chat_with_response_prefill.py0extract the name, size, price, and color from this product description as a json object: <description> the smarthome minSTRING
HIGH…i_server/function_call/test_openai_function_calling.py0test: whether the function call format returned by the ai is correct. when returning a tool call, message.content shouldSTRING
HIGH…ered/npu/interface/test_npu_openai_function_calling.py0test: whether the function call format returned by the ai is correct. when returning a tool call, message.content shouldSTRING
HIGH…way/e2e_test/chat_completions/test_function_calling.py0test: whether the function call format returned by the ai is correct. when returning a tool call, message.content shouldSTRING
HIGH…i_server/function_call/test_openai_function_calling.py0test: whether the function name can be correctly recognized in streaming mode. - expect a function call to be found, andSTRING
HIGH…ered/npu/interface/test_npu_openai_function_calling.py0test: whether the function name can be correctly recognized in streaming mode. - expect a function call to be found, andSTRING
HIGH…way/e2e_test/chat_completions/test_function_calling.py0test: whether the function name can be correctly recognized in streaming mode. - expect a function call to be found, andSTRING
HIGH…i_server/function_call/test_openai_function_calling.py0test: whether the function call arguments returned in streaming mode can be correctly concatenated into valid json. - thSTRING
HIGH…ered/npu/interface/test_npu_openai_function_calling.py0test: whether the function call arguments returned in streaming mode can be correctly concatenated into valid json. - thSTRING
HIGH…way/e2e_test/chat_completions/test_function_calling.py0test: whether the function call arguments returned in streaming mode can be correctly concatenated into valid json. - thSTRING
HIGH…i_server/function_call/test_openai_function_calling.py0test: whether the strict mode of function calling works as expected. - when strict mode is enabled, the ai should not reSTRING
HIGH…ered/npu/interface/test_npu_openai_function_calling.py0test: whether the strict mode of function calling works as expected. - when strict mode is enabled, the ai should not reSTRING
306 more matches not shown…
Modern Structural Boilerplate1289 hits · 1317 pts
SeverityFileLineSnippetContext
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py54logger = logging.getLogger(__name__)CODE
LOWbenchmark/hicache/bench_mix.py20logger = logging.getLogger(__name__)CODE
LOWbenchmark/prefill_only/bench_embeddings.py35logger = logging.getLogger(__name__)CODE
LOWexperimental/sgl-router/tests/e2e/conftest.py37logger = logging.getLogger(__name__)CODE
LOWexperimental/sgl-router/tests/e2e/infra/gateway.py39logger = logging.getLogger(__name__)CODE
LOWexperimental/sgl-router/tests/e2e/infra/model_pool.py34logger = logging.getLogger(__name__)CODE
LOW…ental/sgl-router/tests/e2e/k8s_integration/conftest.py22logger = logging.getLogger(__name__)CODE
LOWtest/manual/ascend/disaggregation_utils.py18logger = logging.getLogger(__name__)CODE
LOW…d/unit/hardware_backend/mlx/test_attention_patching.py84def _set_runner_decode_context_defaults(runner) -> None:CODE
LOW…d/unit/hardware_backend/mlx/test_attention_patching.py91def _set_dummy_server_args_for_auxiliary_state_tests() -> None:CODE
LOW…it/mem_cache/unified_tree_core_inspection_interface.py202 def update_duplicate_tracking(self, node_id: NodeId) -> None:CODE
LOW…gistered/unit/mem_cache/unified_tree_core_inspector.py194 def update_duplicate_tracking(self, node_id: NodeId) -> None:CODE
LOW…nit/lora/test_experimental_sgl_marlin_multi_prefill.py22def _set_mapping(mapping: torch.Tensor, num_slots: int, offset: int) -> None:CODE
LOWtest/registered/xpu/test_xpu_flux2_dev.py33logger = logging.getLogger(__name__)CODE
LOWtest/registered/xpu/test_xpu_zimage_turbo.py33logger = logging.getLogger(__name__)CODE
LOWtest/registered/npu/interface/test_npu_api_encode.py21logger = logging.getLogger(__name__)CODE
LOW…gistered/npu/basic_function/quant/test_npu_gguf_moe.py21logger = logging.getLogger(__name__)CODE
LOW…gistered/npu/basic_function/quant/test_npu_gptq_moe.py23logger = logging.getLogger(__name__)CODE
LOW…red/npu/basic_function/quant/test_npu_autoround_moe.py22logger = logging.getLogger(__name__)CODE
LOW…t/registered/npu/basic_function/quant/test_npu_gguf.py19logger = logging.getLogger(__name__)CODE
LOW…d/npu/basic_function/quant/test_npu_autoround_dense.py21logger = logging.getLogger(__name__)CODE
LOW…istered/npu/reward_models/test_npu_gemma_2_27b_v0_2.py12logger = logging.getLogger(__name__)CODE
LOWtest/registered/observability/test_tracing.py46logger = logging.getLogger(__name__)CODE
LOW…egistered/observability/test_tracing_disaggregation.py34logger = logging.getLogger(__name__)CODE
LOWtest/registered/vlm/test_vision_chunked_prefill.py37logger = logging.getLogger(__name__)CODE
LOWtest/registered/amd/test_zimage_turbo.py24logger = logging.getLogger(__name__)CODE
LOWtest/registered/amd/test_wan22_fp8_mla.py26logger = logging.getLogger(__name__)CODE
LOWtest/registered/rl/test_return_routed_experts.py36logger = logging.getLogger(__name__)CODE
LOWtest/registered/rl/test_weight_version_spans.py122 def _update_weights_from_disk(self, **fields) -> None:CODE
LOWtest/registered/rl/test_return_indexer_topk.py32logger = logging.getLogger(__name__)CODE
LOWpython/sglang/__init__.py70__all__ = [CODE
LOWpython/sglang/utils.py32logger = logging.getLogger(__name__)CODE
LOWpython/sglang/_platform_stubs.py234def set_device(device: Any) -> None: # noqa: ARG001CODE
LOWpython/sglang/benchmark/dspark_sps_profiler.py23logger = logging.getLogger(__name__)CODE
LOWpython/sglang/benchmark/dspark_sps_profiler.py836def set_forced_budget_frac(*, base_url: str, frac: Optional[float]) -> None:CODE
LOWpython/sglang/benchmark/dspark_sts_fit.py16logger = logging.getLogger(__name__)CODE
LOWpython/sglang/benchmark/datasets/__init__.py49__all__ = [CODE
LOWpython/sglang/kernels/kernel_api_logging.py66def _setup_logger() -> None:CODE
LOWpython/sglang/kernels/__init__.py54__all__ = [CODE
LOWpython/sglang/kernels/fused_op.py98logger = logging.getLogger(__name__)CODE
LOWpython/sglang/kernels/fused_op.py235def set_fused_op_backend(backend: Optional[KernelBackend]) -> None:CODE
LOWpython/sglang/kernels/jit/benchmark/marker.py35__all__ = [CODE
LOWpython/sglang/kernels/jit/utils/arch.py22logger = logging.getLogger(__name__)CODE
LOWpython/sglang/kernels/jit/utils/__init__.py19__all__ = [CODE
LOWpython/sglang/kernels/jit/utils/compile/ninja.py32logger = logging.getLogger(__name__)CODE
LOWpython/sglang/kernels/jit/utils/compile/cache.py65logger = logging.getLogger(__name__)CODE
LOWpython/sglang/kernels/jit/utils/compile/__init__.py33__all__ = [CODE
LOWpython/sglang/kernels/jit/utils/compile/loader.py36logger = logging.getLogger(__name__)CODE
LOWpython/sglang/kernels/jit/utils/compile/toolchain.py27logger = logging.getLogger(__name__)CODE
LOWpython/sglang/kernels/jit/minicpm_sala/__init__.py3__all__ = ["get_block_table"]CODE
LOWpython/sglang/kernels/ops/attention/flash_mla_sm120.py25logger = logging.getLogger(__name__)CODE
LOW…glang/kernels/ops/attention/fused_store_index_cache.py27logger = logging.getLogger(__name__)CODE
LOWpython/sglang/kernels/ops/attention/decode_attention.py35logger = logging.getLogger(__name__)CODE
LOW…on/sglang/kernels/ops/attention/fused_metadata_copy.py20logger = logging.getLogger(__name__)CODE
LOWpython/sglang/kernels/ops/attention/__init__.py47__all__ = []CODE
LOWpython/sglang/kernels/ops/attention/cutedsl_kda.py26logger = logging.getLogger(__name__)CODE
LOW…hon/sglang/kernels/ops/attention/flash_attention_v3.py12logger = logging.getLogger(__name__)CODE
LOWpython/sglang/kernels/ops/attention/deepseek_v4_rope.py10logger = logging.getLogger(__name__)CODE
LOWpython/sglang/kernels/ops/attention/deepseek_v4_rope.py263def set_batched_rope(enabled: bool = True) -> None:CODE
LOW…sglang/kernels/ops/attention/flash_mla_sm120_triton.py28logger = logging.getLogger(__name__)CODE
1229 more matches not shown…
Over-Commented Block1335 hits · 1262 pts
SeverityFileLineSnippetContext
LOW…nchmark/kernels/attention/bench_flash_attention_fp8.py1# Benchmark FP8 attention for FA4 (CuTe-DSL) on SM100.COMMENT
LOW…hmark/kernels/quantization/tuning_block_wise_kernel.py1# Copyright 2025 SGLang TeamCOMMENT
LOWbenchmark/lora/lora_bench.py1# Copyright 2023-2024 SGLang TeamCOMMENT
LOW…ental/sgl-router/tests/proxy/pd_bootstrap_injection.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOW…perimental/sgl-router/tests/proxy/graceful_shutdown.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOW…mental/sgl-router/tests/proxy/cache_aware_input_ids.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOW…perimental/sgl-router/tests/proxy/pd_pool_isolation.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOWexperimental/sgl-router/tests/proxy/chat_routing.rs841 .await;COMMENT
LOWexperimental/sgl-router/tests/proxy/sticky_input_ids.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOWexperimental/sgl-router/tests/proxy/common/streaming.rs21 use http_body_util::BodyExt;COMMENT
LOW…imental/sgl-router/tests/component/tokenizer/parity.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOW…sgl-router/tests/component/policies/cache_aware_zmq.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOW…/tests/component/policies/kv_events_two_subscribers.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOW…/tests/component/policies/kv_events_two_subscribers.rs141 elapsed < Duration::from_millis(100),COMMENT
LOW…/tests/component/policies/kv_events_tree_concurrent.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOW…uter/tests/component/policies/kv_events_hash_parity.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOW…sgl-router/tests/component/workers/concurrent_state.rs81 let snapshot = r.workers_for(&model);COMMENT
LOWexperimental/sgl-router/tests/e2e/conftest.py41# Mirrors SMG's e2e_test/conftest.py sys.path setup.COMMENT
LOWexperimental/sgl-router/tests/e2e/requirements.txt1httpx==0.27.2COMMENT
LOWexperimental/sgl-router/sgl-kv-indexer/src/bridge.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOWexperimental/sgl-router/sgl-kv-indexer/src/service.rs21/// prefix query is exempt from the hash bound; see [`validate_hashes`].COMMENT
LOWexperimental/sgl-router/benches/tree_lookup.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOWexperimental/sgl-router/src/main.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOWexperimental/sgl-router/src/proxy/sse.rs21///COMMENT
LOWexperimental/sgl-router/src/proxy/sse.rs41/// The opaque `Box<dyn Send + 'static>` accepts any drop-only payload — mostCOMMENT
LOWexperimental/sgl-router/src/config/types.rs81 #[value(name = "power_of_two")]COMMENT
LOWexperimental/sgl-router/src/config/types.rs141pub struct ModelConfig {COMMENT
LOWexperimental/sgl-router/src/config/types.rs161#[derive(Debug, Clone)]COMMENT
LOWexperimental/sgl-router/src/config/types.rs221pub struct StickyConfig {COMMENT
LOWexperimental/sgl-router/src/config/types.rs281/// from `/server_info` (see [`crate::workers::introspect`]).COMMENT
LOWexperimental/sgl-router/src/config/types.rs301/// --prefill-selector app=sglang,role=prefillCOMMENT
LOWexperimental/sgl-router/src/config/types.rs321}COMMENT
LOWexperimental/sgl-router/src/config/types.rs381/// `true` for every label set, which is the "matches everything"COMMENT
LOWexperimental/sgl-router/src/config/types.rs461 decode_selector: Option<&str>,COMMENT
LOWexperimental/sgl-router/src/config/cli.rs21const DEFAULT_KV_INDEXER_QUERY_MAX_INFLIGHT: usize = sgl_kv_indexer::DEFAULT_QUERY_MAX_INFLIGHT;COMMENT
LOWexperimental/sgl-router/src/config/cli.rs41 pub port: u16,COMMENT
LOWexperimental/sgl-router/src/config/cli.rs61 /// Circuit-breaker cool-down in seconds. Only meaningful withCOMMENT
LOWexperimental/sgl-router/src/config/cli.rs81 /// `--kv-indexer-endpoint`; defaults to 100.COMMENT
LOWexperimental/sgl-router/src/config/cli.rs101 /// many seconds. Defaults to 600.COMMENT
LOWexperimental/sgl-router/src/config/cli.rs121 #[arg(long)]COMMENT
LOWexperimental/sgl-router/src/config/cli.rs141 #[arg(long, default_value_t = default_stale_request_timeout_secs())]COMMENT
LOWexperimental/sgl-router/src/tokenizer/chat_template.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOWexperimental/sgl-router/src/tokenizer/chat_template.rs81COMMENT
LOWexperimental/sgl-router/src/tokenizer/chat_template.rs101 .context("compile chat template from tokenizer_config.json")?;COMMENT
LOWexperimental/sgl-router/src/tokenizer/adapter.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOWexperimental/sgl-router/src/tokenizer/dsv4.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOWexperimental/sgl-router/src/tokenizer/dsv4.rs21//! system content at the front of the prompt, so a tools-carrying requestCOMMENT
LOWexperimental/sgl-router/src/tokenizer/mod.rs281 /// `😀` (`\xF0\x9F\x98\x80`) encodes to its raw byte token ids:COMMENT
LOWexperimental/sgl-router/src/tokenizer/mod.rs301 vec![240, 159, 152, 128],COMMENT
LOWexperimental/sgl-router/src/health/circuit_breaker.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOWexperimental/sgl-router/src/health/circuit_breaker.rs81 /// probe slot. Calling `allow()` for filtering would leak probe slotsCOMMENT
LOWexperimental/sgl-router/src/health/circuit_breaker.rs101 /// Single-lock snapshot of `(admit, state_code)` for the `/metrics`COMMENT
LOWexperimental/sgl-router/src/discovery/types.rs41/// new worker becomes available, and [`DiscoveryEvent::Removed`] when itCOMMENT
LOWexperimental/sgl-router/src/discovery/types.rs61}COMMENT
LOWexperimental/sgl-router/src/discovery/k8s.rs81///COMMENT
LOWexperimental/sgl-router/src/discovery/k8s.rs141 });COMMENT
LOWexperimental/sgl-router/src/discovery/k8s.rs221 Ok(())COMMENT
LOWexperimental/sgl-router/src/discovery/k8s.rs781 /// plumbing is verified, not just "some prefill registered"),COMMENT
LOWexperimental/sgl-router/src/discovery/static_urls.rs1// SPDX-FileCopyrightText: Copyright (c) 2026 The SGLang AuthorsCOMMENT
LOWexperimental/sgl-router/src/server/error.rs21 /// build error). `source` captures the full anyhow chain for server-sideCOMMENT
1275 more matches not shown…
AI Structural Patterns684 hits · 639 pts
SeverityFileLineSnippetContext
LOW…chmark/kernels/deepseek/benchmark_deepgemm_fp8_gemm.py156CODE
LOW…chmark/kernels/deepseek/benchmark_deepgemm_fp8_gemm.py175CODE
LOW…nels/deepseek/benchmark_deepgemm_fp8_gemm_blackwell.py95CODE
LOW…nels/deepseek/benchmark_deepgemm_fp8_gemm_blackwell.py109CODE
LOWbenchmark/hicache/bench_serving.py684CODE
LOWbenchmark/fla/benchmark_layernorm_gated.py15CODE
LOWbenchmark/lora/lora_bench.py350CODE
LOWtest/manual/openai_server/features/test_cache_report.py68CODE
LOWtest/manual/openai_server/features/test_cache_report.py80CODE
LOWtest/manual/openai_server/features/test_cache_report.py91CODE
LOW…t/manual/entrypoints/http_server/test_abort_request.py78CODE
LOW…stered/kernels/ops/attention/test_flash_attention_4.py408CODE
LOW…/kernels/ops/attention/test_flash_attention_4_sm120.py187CODE
LOW…tered/kernels/ops/attention/test_flash_mla_backends.py248CODE
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py73CODE
LOW…/registered/kernels/ops/kv_canary/test_pipeline_e2e.py183CODE
LOWtest/registered/kernels/ops/diffusion/test_norm.py388CODE
LOWtest/registered/attention/test_verify_shared_kv.py62CODE
LOWtest/registered/attention/test_verify_splitkv.py85CODE
LOWtest/registered/unit/test_model_overrides.py340CODE
LOW…gistered/unit/model_executor/test_pool_configurator.py58CODE
LOW…t/registered/unit/sampling/test_sampling_batch_info.py546CODE
LOWtest/registered/unit/mem_cache/test_registry.py32CODE
LOW…stered/unit/mem_cache/test_mooncake_group_semantics.py199CODE
LOW…stered/unit/mem_cache/test_mooncake_group_semantics.py236CODE
LOW…egistered/unit/mem_cache/test_hicache_file_lru_unit.py43CODE
LOW…egistered/unit/mem_cache/test_hicache_file_lru_unit.py76CODE
LOW…tered/unit/mem_cache/test_unified_radix_cache_bench.py684CODE
LOW…ed/unit/mem_cache/test_unified_radix_cache_unittest.py4164CODE
LOWtest/registered/kv_canary/test_self_unit_violation.py25CODE
LOWtest/registered/cpu/test_moe.py40CODE
LOW…t/registered/openai_server/basic/test_openai_server.py619CODE
LOW…t/registered/openai_server/basic/test_openai_server.py655CODE
LOW…/openai_server/validation/test_large_max_new_tokens.py84CODE
LOW…t/registered/debug_utils/comparator/test_entrypoint.py2705CODE
LOW…g_utils/comparator/tensor_comparator/test_formatter.py301CODE
LOWtest/registered/perf/test_bench_serving_1gpu_part1.py263CODE
LOWtest/registered/bench_fn/test_benchmark_datasets_api.py1043CODE
LOWtest/registered/rl/test_update_weights_from_disk.py138CODE
LOWtest/registered/rl/test_update_weights_from_disk.py146CODE
LOWtest/registered/rl/test_update_weights_from_disk.py154CODE
LOWtest/registered/rl/test_update_weights_from_tensor.py226CODE
LOWtest/registered/rl/test_update_weights_from_tensor.py234CODE
LOWtest/registered/rl/test_update_weights_from_tensor.py247CODE
LOWpython/sglang/benchmark/serving.py1337CODE
LOWpython/sglang/benchmark/one_batch_server.py528CODE
LOWpython/sglang/kernels/jit/benchmark/marker.py442CODE
LOWpython/sglang/kernels/jit/utils/compile/loader.py47CODE
LOW…hon/sglang/kernels/ops/attention/flash_attention_v4.py90CODE
LOW…hon/sglang/kernels/ops/attention/flash_attention_v4.py222CODE
LOWpython/sglang/kernels/ops/attention/decode_attention.py540CODE
LOWpython/sglang/kernels/ops/attention/decode_attention.py776CODE
LOWpython/sglang/kernels/ops/attention/decode_attention.py1103CODE
LOWpython/sglang/kernels/ops/attention/decode_attention.py1163CODE
LOW…/kernels/ops/attention/cutedsl_fp8_paged_mqa_logits.py201CODE
LOWpython/sglang/kernels/ops/attention/verify_mla.py725CODE
LOWpython/sglang/kernels/ops/attention/extend_attention.py761CODE
LOWpython/sglang/kernels/ops/attention/extend_attention.py1279CODE
LOWpython/sglang/kernels/ops/attention/verify_splitkv.py743CODE
LOW…lang/kernels/ops/attention/flash_attention_v4_sm120.py77CODE
624 more matches not shown…
Structural Annotation Overuse355 hits · 619 pts
SeverityFileLineSnippetContext
LOWbenchmark/bench_linear_attention/bench_gdn_decode.py104 # Step 1: split (same as forward_decode)COMMENT
LOWbenchmark/bench_linear_attention/bench_gdn_decode.py107 # Step 2: view + reshape (same as forward_decode)COMMENT
LOWbenchmark/bench_linear_attention/bench_gdn_decode.py112 # Step 3: fused gating + recurrent updateCOMMENT
LOW…mark/bench_linear_attention/bench_fused_gate_cumsum.py79 # Step 1: gate activation using torch opsCOMMENT
LOW…mark/bench_linear_attention/bench_fused_gate_cumsum.py87 # Step 2: chunk-local cumsumCOMMENT
LOW…rimental/sgl-router/tests/e2e/k8s_integration/setup.sh38# Step 1: Create kind cluster (idempotent)COMMENT
LOW…rimental/sgl-router/tests/e2e/k8s_integration/setup.sh50# Step 2: Build Docker images (unless SKIP_DOCKER_BUILD=1)COMMENT
LOW…rimental/sgl-router/tests/e2e/k8s_integration/setup.sh75# Step 3: Load images into kindCOMMENT
LOW…rimental/sgl-router/tests/e2e/k8s_integration/setup.sh82# Step 4: Apply namespace and RBACCOMMENT
LOW…rimental/sgl-router/tests/e2e/k8s_integration/setup.sh89# Step 5: Deploy 3 fake-worker replicas behind a ServiceCOMMENT
LOW…rimental/sgl-router/tests/e2e/k8s_integration/setup.sh144# Step 6: Deploy sgl-router. It is configured entirely via CLI flags inCOMMENT
LOWtest/manual/test_tokenizer_manager.py341 # Step 1: Detect formatCOMMENT
LOWtest/manual/test_tokenizer_manager.py347 # Step 2: Prepare inputCOMMENT
LOWtest/manual/test_tokenizer_manager.py353 # Step 3: Extract results (simulated tokenizer output)COMMENT
LOWtest/manual/test_tokenizer_manager.py372 # Step 1: Detect formatCOMMENT
LOWtest/manual/test_tokenizer_manager.py378 # Step 2: Prepare inputCOMMENT
LOWtest/manual/test_tokenizer_manager.py384 # Step 3: Extract results (simulated tokenizer output for cross-encoder)COMMENT
LOWtest/manual/test_tokenizer_manager.py401 # Step 1: Detect formatCOMMENT
LOWtest/manual/test_tokenizer_manager.py407 # Step 2: Prepare inputCOMMENT
LOWtest/manual/test_tokenizer_manager.py413 # Step 3: Extract results (simulated tokenizer output)COMMENT
LOWtest/manual/dsv4/test_fused_compress_attn_hip.py312 # Step 1: write current tokens to state (same for both paths)COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py234 # Step 1: write a chain from seed slot=7 → newly written slot=2. Then run verify with prev=7 andCOMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py876 # Step 1: build one RealKvSource with read_bytes=16 and a fixed byte pattern at slot 0.COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py916 # Step 3: run write kernel on slot 0 with the given mode.COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py926 # Step 4: assert stored real_kv_hash equals the hand-computed hex literal.COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py256 # Step 2: verify slot[2] with prev=7 — expects no violation.COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py390 # Step 1: compute the expected stored prev_hash sequence in pure Python via splitmix64.COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py407 # Step 2: verify every slot's stored 4 fields match the hardcoded expected sequence.COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py898 # Step 2: verify hand-computed fold matches the hex literal.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py235 # Step 1: stamp slot 5 such that stored.prev_hash already equals splitmix64(consts.CANARY_CHAIN_ANCHOR).COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py239 # Step 2: a single-entry plan with prev_slot_idx = -1 should record no violation.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py273 # Step 1: compute the expected stored prev_hash sequence in pure Python via splitmix64.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py283 # Step 2: stamp each slot manually with the hardcoded expected prev_hash.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py308 # Step 4: also independently confirm the *stored* prev_hash at each slot matches the hardcoded sequence.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py826 # Step 1: build one RealKvSource with read_bytes=16 and a fixed byte pattern at slot 1.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py864 # Step 2: verify hand-computed fold matches the hex literal.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py867 # Step 3: stamp slot 1 with a chain-head entry whose real_kv_hash equals the expected value.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py875 # Step 4: 1-entry verify plan; no violation because stored matches recomputed.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py297 # Step 3: verify the 5-step chain — no violation expected and the ref vs CUDA state byte-equal.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py887 # Step 5: mutate one byte in the source so the recomputed hash diverges from stored.COMMENT
LOWtest/registered/kernels/ops/kv_canary/test_plan_hand.py117 # Step 1: build a one-req batch with no prefix and 5 extend tokens.COMMENT
LOWtest/registered/kernels/ops/kv_canary/test_plan_hand.py957 # Step 1: pin (prefix, extend) per req.COMMENT
LOWtest/registered/kernels/ops/kv_canary/test_plan_hand.py132 # Step 2: prefix=0 → no verify entries; seed = -1 because prefix==0.COMMENT
LOWtest/registered/kernels/ops/kv_canary/test_plan_hand.py976 # Step 2: hand-compute expected write_offsets (exclusive cumsum of extends) and verify_num_valid.COMMENT
LOW…/registered/kernels/ops/kv_canary/test_pipeline_e2e.py598 # Step 1: pre-pollute canary_buf slots [0..n_slots) with wrong prev_hash so verify fires n_slots violations.COMMENT
LOW…/registered/kernels/ops/kv_canary/test_pipeline_e2e.py613 # Step 2: run real pipeline (plan + no write + verify); overflow ring capacity=4 with all n_slots violations.COMMENT
LOW…/registered/kernels/ops/kv_canary/test_pipeline_e2e.py684 # Step 3: write_index byte-equal; ring contents relaxed (atomic order not guaranteed under overflow).COMMENT
LOWtest/registered/kernels/ops/kvcache/test_hisparse.py357 # Step 1: touch tokens [4, 2], so LRU becomes [0, 3, 1, 2].COMMENT
LOWtest/registered/kernels/ops/kvcache/test_hisparse.py358 # Step 2: query token 6, which is a miss.COMMENT
LOW…gistered/kernels/ops/quantization/test_hadamard_jit.py207 # Step 1: apply H_N (standard power-of-2 Hadamard) along the N dimensionCOMMENT
LOW…gistered/kernels/ops/quantization/test_hadamard_jit.py211 # Step 2: apply H_M (special ±1 matrix) along the M dimensionCOMMENT
LOWtest/registered/unit/managers/test_hisparse_unit.py457 # Step 1: load the first TOP_K positions from host (no newest token —COMMENT
LOWtest/registered/unit/managers/test_hisparse_unit.py466 # Step 2: half overlap (hit) + half new (miss).COMMENT
LOWtest/registered/unit/parser/test_reasoning_parser.py993 # Step 1: Send partial end tag when not in reasoning modeCOMMENT
LOWtest/registered/unit/parser/test_reasoning_parser.py999 # Step 2: Send normal text that doesn't complete the end tagCOMMENT
LOW…egistered/unit/mem_cache/test_decode_radix_lock_ref.py209 # Step 2: cache_unfinished_req (dec old lock, inc new lock)COMMENT
LOW…egistered/unit/mem_cache/test_decode_radix_lock_ref.py212 # Step 3: cache_finished_req with is_insert=True (dec lock)COMMENT
LOW…egistered/unit/mem_cache/test_decode_radix_lock_ref.py258 # Step 2: cache_unfinished_req (dec root=no-op, inc new leaf)COMMENT
LOW…egistered/unit/mem_cache/test_decode_radix_lock_ref.py261 # Step 3: cache_finished_req (dec leaf)COMMENT
LOW…egistered/unit/mem_cache/test_decode_radix_lock_ref.py193 # Step 1: inc_lock_ref (pop_preallocated locks the matched node)COMMENT
295 more matches not shown…
Verbosity Indicators297 hits · 531 pts
SeverityFileLineSnippetContext
LOWbenchmark/bench_linear_attention/bench_gdn_decode.py104 # Step 1: split (same as forward_decode)COMMENT
LOWbenchmark/bench_linear_attention/bench_gdn_decode.py107 # Step 2: view + reshape (same as forward_decode)COMMENT
LOWbenchmark/bench_linear_attention/bench_gdn_decode.py112 # Step 3: fused gating + recurrent updateCOMMENT
LOW…mark/bench_linear_attention/bench_fused_gate_cumsum.py79 # Step 1: gate activation using torch opsCOMMENT
LOW…mark/bench_linear_attention/bench_fused_gate_cumsum.py87 # Step 2: chunk-local cumsumCOMMENT
LOW…rimental/sgl-router/tests/e2e/k8s_integration/setup.sh38# Step 1: Create kind cluster (idempotent)COMMENT
LOW…rimental/sgl-router/tests/e2e/k8s_integration/setup.sh50# Step 2: Build Docker images (unless SKIP_DOCKER_BUILD=1)COMMENT
LOW…rimental/sgl-router/tests/e2e/k8s_integration/setup.sh75# Step 3: Load images into kindCOMMENT
LOW…rimental/sgl-router/tests/e2e/k8s_integration/setup.sh82# Step 4: Apply namespace and RBACCOMMENT
LOW…rimental/sgl-router/tests/e2e/k8s_integration/setup.sh89# Step 5: Deploy 3 fake-worker replicas behind a ServiceCOMMENT
LOW…rimental/sgl-router/tests/e2e/k8s_integration/setup.sh144# Step 6: Deploy sgl-router. It is configured entirely via CLI flags inCOMMENT
LOWtest/manual/test_tokenizer_manager.py341 # Step 1: Detect formatCOMMENT
LOWtest/manual/test_tokenizer_manager.py347 # Step 2: Prepare inputCOMMENT
LOWtest/manual/test_tokenizer_manager.py353 # Step 3: Extract results (simulated tokenizer output)COMMENT
LOWtest/manual/test_tokenizer_manager.py372 # Step 1: Detect formatCOMMENT
LOWtest/manual/test_tokenizer_manager.py378 # Step 2: Prepare inputCOMMENT
LOWtest/manual/test_tokenizer_manager.py384 # Step 3: Extract results (simulated tokenizer output for cross-encoder)COMMENT
LOWtest/manual/test_tokenizer_manager.py401 # Step 1: Detect formatCOMMENT
LOWtest/manual/test_tokenizer_manager.py407 # Step 2: Prepare inputCOMMENT
LOWtest/manual/test_tokenizer_manager.py413 # Step 3: Extract results (simulated tokenizer output)COMMENT
LOWtest/manual/dsv4/test_fused_compress_attn_hip.py312 # Step 1: write current tokens to state (same for both paths)COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py234 # Step 1: write a chain from seed slot=7 → newly written slot=2. Then run verify with prev=7 andCOMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py876 # Step 1: build one RealKvSource with read_bytes=16 and a fixed byte pattern at slot 0.COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py916 # Step 3: run write kernel on slot 0 with the given mode.COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py926 # Step 4: assert stored real_kv_hash equals the hand-computed hex literal.COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py256 # Step 2: verify slot[2] with prev=7 — expects no violation.COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py390 # Step 1: compute the expected stored prev_hash sequence in pure Python via splitmix64.COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py407 # Step 2: verify every slot's stored 4 fields match the hardcoded expected sequence.COMMENT
LOW…st/registered/kernels/ops/kv_canary/test_write_hand.py898 # Step 2: verify hand-computed fold matches the hex literal.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py235 # Step 1: stamp slot 5 such that stored.prev_hash already equals splitmix64(consts.CANARY_CHAIN_ANCHOR).COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py239 # Step 2: a single-entry plan with prev_slot_idx = -1 should record no violation.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py273 # Step 1: compute the expected stored prev_hash sequence in pure Python via splitmix64.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py283 # Step 2: stamp each slot manually with the hardcoded expected prev_hash.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py308 # Step 4: also independently confirm the *stored* prev_hash at each slot matches the hardcoded sequence.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py826 # Step 1: build one RealKvSource with read_bytes=16 and a fixed byte pattern at slot 1.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py864 # Step 2: verify hand-computed fold matches the hex literal.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py867 # Step 3: stamp slot 1 with a chain-head entry whose real_kv_hash equals the expected value.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py875 # Step 4: 1-entry verify plan; no violation because stored matches recomputed.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py297 # Step 3: verify the 5-step chain — no violation expected and the ref vs CUDA state byte-equal.COMMENT
LOW…t/registered/kernels/ops/kv_canary/test_verify_hand.py887 # Step 5: mutate one byte in the source so the recomputed hash diverges from stored.COMMENT
LOWtest/registered/kernels/ops/kv_canary/test_plan_hand.py117 # Step 1: build a one-req batch with no prefix and 5 extend tokens.COMMENT
LOWtest/registered/kernels/ops/kv_canary/test_plan_hand.py957 # Step 1: pin (prefix, extend) per req.COMMENT
LOWtest/registered/kernels/ops/kv_canary/test_plan_hand.py132 # Step 2: prefix=0 → no verify entries; seed = -1 because prefix==0.COMMENT
LOWtest/registered/kernels/ops/kv_canary/test_plan_hand.py976 # Step 2: hand-compute expected write_offsets (exclusive cumsum of extends) and verify_num_valid.COMMENT
LOW…/registered/kernels/ops/kv_canary/test_pipeline_e2e.py598 # Step 1: pre-pollute canary_buf slots [0..n_slots) with wrong prev_hash so verify fires n_slots violations.COMMENT
LOW…/registered/kernels/ops/kv_canary/test_pipeline_e2e.py613 # Step 2: run real pipeline (plan + no write + verify); overflow ring capacity=4 with all n_slots violations.COMMENT
LOW…/registered/kernels/ops/kv_canary/test_pipeline_e2e.py684 # Step 3: write_index byte-equal; ring contents relaxed (atomic order not guaranteed under overflow).COMMENT
LOWtest/registered/kernels/ops/kvcache/test_hisparse.py357 # Step 1: touch tokens [4, 2], so LRU becomes [0, 3, 1, 2].COMMENT
LOWtest/registered/kernels/ops/kvcache/test_hisparse.py358 # Step 2: query token 6, which is a miss.COMMENT
LOW…gistered/kernels/ops/quantization/test_hadamard_jit.py207 # Step 1: apply H_N (standard power-of-2 Hadamard) along the N dimensionCOMMENT
LOW…gistered/kernels/ops/quantization/test_hadamard_jit.py211 # Step 2: apply H_M (special ±1 matrix) along the M dimensionCOMMENT
LOWtest/registered/unit/managers/test_hisparse_unit.py457 # Step 1: load the first TOP_K positions from host (no newest token —COMMENT
LOWtest/registered/unit/managers/test_hisparse_unit.py466 # Step 2: half overlap (hit) + half new (miss).COMMENT
LOWtest/registered/unit/parser/test_reasoning_parser.py993 # Step 1: Send partial end tag when not in reasoning modeCOMMENT
LOWtest/registered/unit/parser/test_reasoning_parser.py999 # Step 2: Send normal text that doesn't complete the end tagCOMMENT
LOW…egistered/unit/mem_cache/test_decode_radix_lock_ref.py209 # Step 2: cache_unfinished_req (dec old lock, inc new lock)COMMENT
LOW…egistered/unit/mem_cache/test_decode_radix_lock_ref.py212 # Step 3: cache_finished_req with is_insert=True (dec lock)COMMENT
LOW…egistered/unit/mem_cache/test_decode_radix_lock_ref.py258 # Step 2: cache_unfinished_req (dec root=no-op, inc new leaf)COMMENT
LOW…egistered/unit/mem_cache/test_decode_radix_lock_ref.py261 # Step 3: cache_finished_req (dec leaf)COMMENT
LOW…egistered/unit/mem_cache/test_decode_radix_lock_ref.py193 # Step 1: inc_lock_ref (pop_preallocated locks the matched node)COMMENT
237 more matches not shown…
Self-Referential Comments128 hits · 394 pts
SeverityFileLineSnippetContext
MEDIUMbenchmark/mmmu/data_utils.py157 # Create a JSON object with the filename as the key and caption as the valueCOMMENT
MEDIUMbenchmark/hicache/bench_mix.py24# Create a lock for thread-safe debug log writingCOMMENT
MEDIUMbenchmark/prefill_only/bench_score.py157 # Create the request builder function with shared tokenizerCOMMENT
MEDIUMbenchmark/prefill_only/util.py173 # Create the full request list by cycling through unique requestsCOMMENT
MEDIUMexperimental/sgl-router/tests/e2e/infra/gateway.py43# This file is at `experimental/sgl-router/tests/e2e/infra/gateway.py`,COMMENT
MEDIUMtest/manual/test_weight_validation.py75 # Create a minimal valid safetensors fileCOMMENT
MEDIUMtest/manual/test_weight_validation.py166 # Create a broken symlink for the index fileCOMMENT
MEDIUMtest/manual/test_modelopt_fp8kvcache.py15 # Create a ModelOptFp8Config objectCOMMENT
MEDIUMtest/manual/test_config_integration.py27 # Create a temporary config fileCOMMENT
MEDIUMtest/manual/test_config_integration.py82 # Create a temporary config fileCOMMENT
MEDIUMtest/manual/test_config_integration.py113 # Create a temporary config fileCOMMENT
MEDIUMtest/manual/test_async_dynamic_batch_tokenizer.py54 # Create a proper BatchEncoding-like object that supports dict operationsCOMMENT
MEDIUMtest/manual/test_async_dynamic_batch_tokenizer.py193 # Create a new async tokenizer with a failing tokenizerCOMMENT
MEDIUMtest/manual/attention/test_flashattn_backend.py66 # Create a large enough req_to_token_pool to fit the test usage.COMMENT
MEDIUMtest/manual/attention/test_flashattn_mla_backend.py55 # Create a proper req_to_token_pool with the req_to_token attributeCOMMENT
MEDIUM…ual/lang_frontend/test_separate_reasoning_execution.py72 # Create a mock backend to avoid AttributeError in __del__COMMENT
MEDIUM…ual/lang_frontend/test_separate_reasoning_execution.py75 # Create a StreamExecutor with necessary setupCOMMENT
MEDIUM…ual/lang_frontend/test_separate_reasoning_execution.py106 # Create a gen expression and a separate_reasoning expressionCOMMENT
MEDIUMtest/manual/debug_utils/run_with_retry.py37 # Create a TestFile with a reasonable estimated timeCOMMENT
MEDIUMtest/manual/eval/test_longbench_v2_eval.py73 # Create a temporary JSON file with sample dataCOMMENT
MEDIUMtest/registered/quant/test_quant_config_parsing.py23 # Create a raw instanceCOMMENT
MEDIUM…t/registered/kernels/ops/attention/test_dsa_indexer.py77 # Create a simple page table for testingCOMMENT
MEDIUM…t/registered/kernels/ops/attention/test_dsa_indexer.py93 # Create a simple page table for testing with page size 1COMMENT
MEDIUM…st/registered/attention/test_wave_attention_kernels.py186 # Define the varying parameter valuesCOMMENT
MEDIUM…/registered/attention/test_triton_attention_kernels.py316 # Define the varying parameter valuesCOMMENT
MEDIUM…egistered/attention/test_normal_decode_set_metadata.py145 # Create a simple SWA KV pool for testingCOMMENT
MEDIUM…egistered/attention/test_normal_decode_set_metadata.py166 # Create a minimal mock that inherits from SWAKVPool to pass isinstance checkCOMMENT
MEDIUMtest/registered/unit/distributed/test_parallel_state.py134 # Create a mock group objectCOMMENT
MEDIUMtest/registered/unit/distributed/test_parallel_state.py234 # Create a mock group objectCOMMENT
MEDIUM…stered/unit/function_call/test_function_call_parser.py942 # Create a concrete implementation of BaseFormatDetector for testingCOMMENT
MEDIUM…tered/unit/mem_cache/test_radix_cache_slru_accuracy.py50 # Create a cache with the memory poolsCOMMENT
MEDIUM…ed/unit/mem_cache/test_unified_radix_cache_unittest.py2457 # Create a chain: root -> A -> B -> C (3 levels)COMMENT
MEDIUM…t/registered/unit/model_loader/test_modelopt_loader.py90 # Create a basic model config with unified quantization flagCOMMENT
MEDIUM…egistered/unit/entrypoints/openai/test_serving_chat.py1268 # Create a mock conversation object that will be returned by generate_chat_convCOMMENT
MEDIUM…egistered/unit/entrypoints/openai/test_serving_chat.py2276 # Create a mock conversation objectCOMMENT
MEDIUMtest/registered/cpu/test_mamba.py24 """This function is intended to align with the l2norm implementation in the FLA library."""STRING
MEDIUM…t/registered/openai_server/basic/test_openai_server.py595 # This class is a Chat gate; Completion already has its own Rust matrix.COMMENT
MEDIUM…registered/hicache/test_hicache_storage_3fs_backend.py26 # Create a temporary JSON config file for HF3FSCOMMENT
MEDIUMtest/registered/rl/test_update_weights_from_tensor.py134 # Create a small set of parameters for testingCOMMENT
MEDIUMtest/registered/rl/test_update_weights_from_tensor.py148 # Create a flattened bucketCOMMENT
MEDIUMtest/registered/rl/test_update_weights_from_tensor.py155 # Create the dict format expected by _update_weights_from_flattened_bucketCOMMENT
MEDIUMtest/registered/rl/test_update_weights_from_tensor.py165 # Create a list where each rank contains the same serialized dataCOMMENT
MEDIUMpython/sglang/benchmark/serving.py1407 # Create a temporary DatasetRow object for warmupCOMMENT
MEDIUMpython/sglang/benchmark/serving.py1423 # Create the test input onceCOMMENT
MEDIUMpython/sglang/benchmark/serving.py2564 # Create a mutually exclusive group for profiling URLsCOMMENT
MEDIUMpython/sglang/kernels/ops/attention/deepseek_v4_rope.py12# This module is imported during model-registry discovery. Keep it free ofCOMMENT
MEDIUM…sglang/kernels/ops/attention/dsa/index_buf_accessor.py656 # Define the token range within the block and the K dimension range handled by the thread.COMMENT
MEDIUMpython/sglang/kernels/ops/attention/fla/kda.py4# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUMpython/sglang/kernels/ops/layernorm/mhc.py22# This module is imported during model-registry discovery. Do not import the realCOMMENT
MEDIUM…nels/ops/quantization/nvfp4_gemm_swiglu_nvfp4_quant.py115 """This class implements batched matrix multiplication (C = A x SFA x B x SFB) with support for various data typesSTRING
MEDIUMpython/sglang/kernels/ops/quantization/awq_triton.py152 # Create the necessary shifts to use to unpack.COMMENT
MEDIUM…thon/sglang/kernels/ops/speculative/ngram_embedding.py135 # Create an empty tensor for ignore_tokensCOMMENT
MEDIUM…els/aot/benchmark/bench_amd_deterministic_allreduce.py127 # Create a gloo group for custom AR (it requires non-NCCL backend)COMMENT
MEDIUMpython/sglang/test/cpu_test_utils.py478 # Create a new tensor with alternating valuesCOMMENT
MEDIUMpython/sglang/test/cpu_test_utils.py501 # Create a tensor with the E2M1 valuesCOMMENT
MEDIUM…/sglang/srt/layers/attention/flashattention_backend.py3259 # Create a modified version for local attention that only processes the last tokenCOMMENT
MEDIUM…/sglang/srt/layers/attention/flashattention_backend.py3638 # Create a block_table for the local attention blocksCOMMENT
MEDIUMpython/sglang/srt/layers/quantization/fp8.py565 # Create the weightCOMMENT
MEDIUMpython/sglang/srt/layers/quantization/mxfp4_tensor.py90 # Create a new tensor with alternating valuesCOMMENT
MEDIUMpython/sglang/srt/layers/quantization/mxfp4_tensor.py113 # Create a tensor with the E2M1 valuesCOMMENT
68 more matches not shown…
Redundant / Tautological Comments257 hits · 390 pts
SeverityFileLineSnippetContext
LOW…shinfer_allreduce_fusion/benchmark_fused_collective.py1160 # Check if running with torchrun (required for collective operations)STRING
LOWbenchmark/prefill_only/util.py163 # Check if we have any valid requestsCOMMENT
LOWbenchmark/boolq/bench_sglang.py89 # Print resultsCOMMENT
LOWbenchmark/gsm8k/bench_sglang.py143 # Print resultsCOMMENT
LOWbenchmark/mmlu/bench_sglang.py179 # Print resultsCOMMENT
LOWtest/manual/test_schedule_policy.py89 # Check if FCFS keeps the original orderCOMMENT
LOWtest/manual/test_schedule_policy.py114 # Check if priority enabled fcfs ordering is applied.COMMENT
LOWtest/manual/test_schedule_policy.py140 # Check if priority enabled fcfs ordering is applied.COMMENT
LOWtest/manual/test_schedule_policy.py162 # Check if priority enabled fcfs ordering is applied.COMMENT
LOWtest/manual/test_schedule_policy.py186 # Check if priority enabled fcfs ordering is applied.COMMENT
LOWtest/manual/test_schedule_policy.py212 # Check if priority enabled fcfs ordering is applied.COMMENT
LOW…nual/kv_transfer/test_mooncake_transfer_engine_init.py201 # Check if mooncake should be usedCOMMENT
LOWtest/registered/kernels/ops/attention/test_pos_enc.py479 # Print resultsCOMMENT
LOW…mmunication/test_amd_deterministic_custom_allreduce.py93 # Check if inputs fit in bufferCOMMENT
LOW…tered/unit/mem_cache/test_radix_cache_slru_accuracy.py102 # Check if the frequently accessed key-value is still presentCOMMENT
LOW…tered/unit/mem_cache/test_radix_cache_slru_accuracy.py108 # Check if the first low-frequency key-value has been evictedCOMMENT
LOW…tered/unit/mem_cache/test_radix_cache_slru_accuracy.py120 # Check if the tensor is empty, which indicates the key was not found (evicted)COMMENT
LOW…registered/unit/model_loader/test_presharded_loader.py283 # Write the file with stored_keys mapped to tensor content.COMMENT
LOW…t/registered/unit/model_loader/test_modelopt_export.py27# Check if modelopt is availableCOMMENT
LOW…d/unit/batch_invariant_ops/test_batch_invariant_ops.py53 # Check if results are identicalCOMMENT
LOW…d/unit/batch_invariant_ops/test_batch_invariant_ops.py178 # Check if results are identicalCOMMENT
LOW…registered/disaggregation/test_disaggregation_basic.py220 # Check if servers are still healthyCOMMENT
LOW…t/registered/openai_server/basic/test_openai_server.py92 # Check if ignore_eos resulted in more tokens or exactly max_tokensCOMMENT
LOW…red/npu/interface/test_npu_openai_server_ignore_eos.py84 # Check if ignore_eos resulted in more tokens or exactly max_tokensCOMMENT
LOW…pu/basic_function/offloading/test_npu_offload_modes.py70 # Check if server is running (basic functionality test)COMMENT
LOWtest/registered/observability/test_tracing.py77 # Check if it's a RequestStageConfig (has stage_name and level attributes)COMMENT
LOW…stered/amd/disaggregation/test_disaggregation_basic.py324 # Check if servers are still healthyCOMMENT
LOW…t/registered/amd/accuracy/mi30x/test_gsm8k_eval_amd.py286 # Print resultsCOMMENT
LOW…gistered/amd/accuracy/mi30x/test_vlms_mmmu_eval_amd.py255 # Print resultsCOMMENT
LOW…/registered/rl/test_update_weights_from_distributed.py643 # Check if the weights of lm_head are tied with embed_tokens.COMMENT
LOWpython/sglang/utils.py401 # Check if the cache file already existsCOMMENT
LOWpython/sglang/benchmark/serving.py1446 # Check if at least one warmup request succeededCOMMENT
LOWpython/sglang/benchmark/one_batch.py733 # Print output textsCOMMENT
LOWpython/sglang/benchmark/utils.py100 # Check if the cache file already existsCOMMENT
LOWpython/sglang/benchmark/one_batch_server.py803 # Print resultsCOMMENT
LOWpython/sglang/kernels/ops/attention/metadata.py653 # Check if we should use the specialized fast path for page_size=1, no SWACOMMENT
LOWpython/sglang/kernels/ops/attention/extend_attention.py1146 # Check if we can skip this tileCOMMENT
LOWpython/sglang/kernels/ops/attention/pad.py295 # Check if we're in CUDA graph mode (buffers are pre-allocated)COMMENT
LOW…n/nsa_triton_decode/triton_mla_kernels_decode_fused.py2888 # Check if buffer ops should be disabledCOMMENT
LOW…ang/kernels/ops/attention/flash_attn/cute/flash_fwd.py171 # Check if block size setting is out of shared memory capacityCOMMENT
LOW…ang/kernels/ops/attention/flash_attn/cute/flash_fwd.py186 # Check if twice the block size is divisible by the number of threadsCOMMENT
LOWpython/sglang/kernels/ops/gemm/embedding_lora_a.py56 # Check if this token is within the segmentCOMMENT
LOWpython/sglang/kernels/ops/gemm/embedding_lora_a.py70 # Check if this is an extra tokenCOMMENT
LOW…nels/ops/quantization/nvfp4_gemm_swiglu_nvfp4_quant.py490 # Check if input data types are compatible with MMA instructionCOMMENT
LOWpython/sglang/kernels/ops/speculative/spec_tree.py223 # Check if we've reached end of sibling listCOMMENT
LOWpython/sglang/kernels/ops/moe/inkling_moe.py988 # Set grid_m to the max number of M blocks and skip padding-only blocksCOMMENT
LOW…els/aot/benchmark/bench_amd_deterministic_allreduce.py243 # Check if input size fits in bufferCOMMENT
LOW…hon/sglang/kernels/aot/python/sgl_kernel/load_utils.py36 # Check if it's a compiled extension (including complex names like .abi3.so, .cpython-312.so)COMMENT
LOWpython/sglang/test/few_shot_gsm8k_engine.py135 # Print resultsCOMMENT
LOWpython/sglang/test/send_one.py240 # Print resultsCOMMENT
LOWpython/sglang/test/runners.py506 # Check if the text is empty or only whitespace.COMMENT
LOWpython/sglang/test/runners.py799 # Check if the text is empty or only whitespace.COMMENT
LOWpython/sglang/test/few_shot_gsm8k.py138 # Print resultsCOMMENT
LOWpython/sglang/test/ascend/e2e/run_npu_e2e_test.py380 # Check if current line matches expected patternCOMMENT
LOWpython/sglang/test/ascend/e2e/run_npu_e2e_test.py467 # Check if pattern was successfully matchedCOMMENT
LOWpython/sglang/test/ci/ci_utils.py280 # Check if we should retryCOMMENT
LOW…/sglang/test/server_fixtures/disaggregation_fixture.py311 # Check if port is activeCOMMENT
LOWpython/sglang/srt/environ.py1292 # Set True to dequantize the FP4 experts to FP8 at runtimeCOMMENT
LOWpython/sglang/srt/dllm/mixin/scheduler.py313 # Check if batch is fullCOMMENT
LOWpython/sglang/srt/disaggregation/decode.py2330 # Check if request was aborted due to corruptionCOMMENT
197 more matches not shown…
Cross-Language Confusion46 hits · 244 pts
SeverityFileLineSnippetContext
HIGHbenchmark/hicache/bench_mix.py465 self.user_generator.push(CODE
HIGHexperimental/sgl-router/tests/e2e/infra/gateway.py335 "Build it first: `cd experimental/sgl-router && cargo build --release` "CODE
HIGHtest/srt/models/test_inkling_per_expert_sync.py10 - w13 row layout: Inkling-interleaved vs contiguous [gate || up]STRING
HIGHtest/manual/models/test_qwen3_asr.py630 f"first commit's previous_item_id must be JSON null, got {committed_1!r}",CODE
HIGHtest/manual/debug_utils/test_log_parser.py16 """[{"line":"(SGLangEngine pid=35555) [2025-10-31 03:45:20 TP0] Decode batch [51341], #running-req: 317, #toSTRING
HIGH…stered/unit/function_call/test_function_call_parser.py2739[true, null, {"enabled": false}]CODE
HIGH…nels/ops/quantization/nvfp4_gemm_swiglu_nvfp4_quant.py2552 :param c_sf_ptr: Pointer to scale factor tensor for C (can be null)STRING
HIGH…nels/ops/quantization/nvfp4_gemm_swiglu_nvfp4_quant.py2556 :param norm_const_ptr: Pointer to normalization constant for SFC generation (can be null)STRING
HIGH…tion_unittest/runner_modes/cuda_graph_decode_runner.py413 # capture, which makes the capture-time output undefined; onlyCOMMENT
HIGHpython/sglang/srt/layers/quantization/humming.py460 # explicit null) instead of silently quantizing with the defaults.COMMENT
HIGHpython/sglang/srt/managers/scheduler.py4687 f"dspark_force_budget_frac must be in (0, 1] or null, got {v}."CODE
HIGHpython/sglang/srt/function_call/utils.py357 return "string" # If only null, default to stringCODE
HIGHpython/sglang/srt/function_call/mimo_detector.py147 <parameter=command>pwd && ls</parameter>STRING
HIGHpython/sglang/srt/utils/field_validators.py66 raise ValueError(f"must be list or null; got {type(v).__name__}")CODE
HIGHpython/sglang/srt/utils/hf_transformers/tokenizer.py376 # When the config omits the key or has null, use the v4 default so thatCOMMENT
HIGHpython/sglang/srt/models/inkling.py1378 when the config stores w13 interleaved, contiguous [gate || up] underSTRING
HIGHpython/sglang/srt/models/inkling_common/util.py16 """Use the contiguous ``[gate || up]`` layout required by LoRA slicing."""STRING
HIGHpython/sglang/srt/models/inkling_common/util.py59 """Return whether BF16 weights require TRT-LLM's ``[up || gate]`` layout."""STRING
HIGHpython/sglang/srt/entrypoints/http_server.py543 {"error": {"message": "...", "type": "...", "param": null, "code": <status>}}STRING
HIGH…ltimodal_gen/test/unit/realtime/test_realtime_webui.py103 assert "decodeQueue.push(" in app_jsCODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py16 queue.push("camera_actions", [["w"], ["d"]])CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py28 queue.push(CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py205 queue.push("camera_actions", [])CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py265 queue.push(ControlStateTransition(payload=["w"], seq_id=7))CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py266 queue.push(ControlStateTransition(payload=[], seq_id=8))CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py277 queue.push(ControlStateTransition(payload=["w"], seq_id=7))CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py287 queue.push(ControlStateTransition(payload=["w"], seq_id=7))CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py288 queue.push(ControlStateTransition(payload=["w", "d"], seq_id=8))CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py289 queue.push(ControlStateTransition(payload=["d"], seq_id=9))CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py46 queue.push(CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py70 queue.push("camera_actions", [["w"], ["a"], ["s"]])CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py87 queue.push("camera_actions", [["w"]])CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py104 queue.push("camera_actions", [["w"]])CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py122 queue.push("camera_actions", [[]])CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py139 queue.push(CODE
HIGH…en/test/unit/realtime/test_realtime_control_signals.py174 queue.push("camera_actions", [["w"], ["w"], ["w"], ["w"]])CODE
HIGH…ultimodal_gen/runtime/pipelines/minimax_h3_pipeline.py45 # scheduler intentionally absent: model_index carries scheduler=null;COMMENT
HIGH…ang/multimodal_gen/runtime/pipelines/ltx_2_pipeline.py400 # model_index.json records absent optional components as [null, null].COMMENT
HIGH…ang/multimodal_gen/runtime/realtime/control_signals.py190 self.push(CODE
HIGH…ang/multimodal_gen/runtime/realtime/control_signals.py351 self._signals.push(self.kind, script, event_id=event_id)CODE
HIGH…ang/multimodal_gen/runtime/realtime/control_signals.py422 self.push(transition)CODE
HIGH…ai/realtime/adapters/lingbot_world_realtime_adapter.py57 self.prompt_queue.push("prompt", prompt, event_id=event_id)CODE
HIGH…rify/scripts/mechanical_refactor_reproduction_utils.py48 exec_command(f"git add -A && git commit -m {shlex.quote(message)}", cwd=cwd)CODE
HIGH…scripts/tests/reproduction_utils/test_infra_helpers.py69 "shell $HOME && rm -rf / ; metacharacters",CODE
HIGHscripts/ci/test_list_stage_models.py193 f.write('{"deny": null, "by_file": null}')CODE
HIGHscripts/ci/utils/runner_utilization_report.py290 equal to `created_at` (not null). The previous code required both aSTRING
AI Slop Vocabulary85 hits · 220 pts
SeverityFileLineSnippetContext
MEDIUMdocker/k8s-sglang-distributed-sts.yaml58 privileged: true # to leverage RDMA/InfiniBand device, co-work with HostNetwork=trueCODE
MEDIUM…t/manual/layers/attention/dsa/test_act_quant_triton.py269 # Run comprehensive benchmarkCOMMENT
MEDIUMtest/manual/layers/moe/bench_mxfp4_sm90_kernels.py277# Timing harnessCOMMENT
MEDIUMtest/manual/4-gpu-models/test_qwen35_models_archived.py17# This eval harness applies the chat_template, which is critical for qwen3.5COMMENT
MEDIUMtest/manual/4-gpu-models/test_qwen35_fp4_triton.py5# This eval harness applies the chat_template, which is critical for qwen3.5COMMENT
MEDIUMtest/manual/eval/validate_longbench_v2_standalone.py212 """Generate comprehensive validation report."""STRING
MEDIUM…/registered/8-gpu-models/test_inkling_nvfp4_nightly.py104 # The harness pins a tight pool; this checkpoint needs room forCOMMENT
MEDIUM…ered/kernels/ops/attention/test_minimax_decode_topk.py38 """Per-row sorted-desc multiset of the scores the kernel selected (tie-robust)."""STRING
MEDIUM…ered/kernels/ops/attention/test_minimax_decode_topk.py111 # tie-robust: the multiset of selected scores must match torch.topk'sCOMMENT
MEDIUM…t/registered/kernels/ops/kv_canary/test_verify_fuzz.py110 # harness exercises the chain-check-skip branch (added for SWA-evicted ancestor handling).COMMENT
MEDIUM…st/registered/kernels/ops/moe/test_moe_topk_softmax.py124 # Tie-robust index check: the probability at each returned index must equalCOMMENT
MEDIUM…tered/attention/unittests/dense/test_flex_attention.py60 # from logical positions, so it's robust to all non-tidy layouts.COMMENT
MEDIUMtest/registered/attention/unittests/dense/test_fa3.py42 # FlashAttention kernels are most stable in this harness with FA-friendly dims.COMMENT
MEDIUMtest/registered/attention/unittests/dense/test_fa4.py38 # FlashAttention kernels are most stable in this harness with FA-friendly dims.COMMENT
MEDIUM…egistered/attention/unittests/swa/test_torch_native.py100 # arithmetic, so it's robust to all non-tidy layouts.COMMENT
MEDIUM…unit/lora/test_experimental_sgl_marlin_runtime_unit.py135# Runtime-flow harnessCOMMENT
MEDIUM…/registered/chunked_prefill/test_scripted_core_1gpu.py82 # output_ids are no longer observable through the harness. That case'sCOMMENT
MEDIUMtest/registered/models_e2e/test_inkling.py213 # Sized to the 20480-token pool the harness pins: large enough toCOMMENT
MEDIUMtest/registered/models_e2e/test_inkling_small_nvfp4.py239# The multi-turn branching harness, unlike the single-turn helpers above, replaysCOMMENT
MEDIUMtest/registered/hicache/test_qwen35_hicache.py15# This eval harness applies the chat_template, which is critical for qwen3.5COMMENT
MEDIUMtest/registered/observability/test_tracing.py582 # Only run trace_level_3 — the most comprehensive check.COMMENT
MEDIUMtest/registered/vlm/test_vision_openai_server_a.py42# coordinate, so the check is robust to normalized-vs-pixel conventions.COMMENT
MEDIUM…t/registered/page_major/test_page_major_qwen_hybrid.py33 # Measured in this harness: baseline (no page-major) and page-major bothCOMMENT
LOWtest/registered/debug_utils/test_dumper.py3345 # code can simply call `from sglang.srt.debug_utils.dumper import dumper`COMMENT
MEDIUM…on/sglang/kernels/ops/attention/dsa/tilelang_kernel.py1086 # to better utilize FP8 dynamic range, then apply the inverse scale after GEMM.COMMENT
MEDIUM…on/sglang/kernels/ops/attention/fa4_sm120/flash_fwd.py342 # N128 is robust before the compact-SM steady state. N256'sCOMMENT
MEDIUM…rnels/ops/attention/flash_attn/cute/flash_fwd_sm100.py1443 # CLC buffers placed here to utilize padding before sO's 1024-byte alignment.COMMENT
LOW…ernels/ops/attention/flash_attn/cute/flash_fwd_sm90.py1961 # 2 elements. So we just call ptx directly.COMMENT
LOW…ernels/ops/attention/flash_attn/cute/flash_fwd_sm90.py2055 # 2 elements. So we just call ptx directly.COMMENT
LOWpython/sglang/kernels/ops/mamba/causal_conv1d_triton.py156 # first chunk and does not have prior-token, so just set to 0COMMENT
MEDIUMpython/sglang/kernels/aot/csrc/cpu/decode.cpp1429 // use smaller BLOCK_H when batches is small to utilize all coresCOMMENT
MEDIUMpython/sglang/test/simple_eval_common.py278 # The harness passes the OpenAI base (`.../v1`); `/generate` lives at root.COMMENT
MEDIUMpython/sglang/test/kernels/utils.py47 # single test exceeds half the harness budget, so a hung collectiveCOMMENT
MEDIUM…tion_unittest/runner_modes/speculative_draft_runner.py181 # in EagleDraftWorker.__init__, which the harness skips), so build themCOMMENT
MEDIUM…tion_unittest/runner_modes/speculative_draft_runner.py199 # canary_manager); for the harness that's the fixture runner.COMMENT
MEDIUM…attention_unittest/attention_methods/dsv4_attention.py1300 # In runner-harness flows the reference is called BEFORECOMMENT
LOWpython/sglang/srt/disaggregation/nixl/conn.py199 ), # hacky just add it into the message that will be sentCODE
MEDIUMpython/sglang/srt/disaggregation/common/conn.py1412 # Enable higher PP ranks to be bootstrapped earlier to make PP PD requests bootstrap more robustCOMMENT
LOW…/sglang/srt/layers/attention/flashattention_backend.py3572 # then we can simply use a cdiv for the rest.COMMENT
MEDIUMpython/sglang/srt/layers/quantization/fp8.py318 # Keep both "model." and non-"model." variants for robust prefix matching.COMMENT
MEDIUMpython/sglang/srt/layers/quantization/fp8.py456 # For GPUs that lack FP8 hardware support, we can leverage the MarlinCOMMENT
MEDIUMpython/sglang/srt/layers/quantization/fp8_utils.py974 # TODO: add more robust shape check hereCOMMENT
MEDIUM…hon/sglang/srt/layers/quantization/marlin_utils_fp8.py69 # For GPUs that lack FP8 hardware support, we can leverage theCOMMENT
LOW…srt/layers/quantization/mxfp4_flashinfer_trtllm_moe.py381 # in-place. Otherwise `routed` is already scale-final and we just addCOMMENT
MEDIUMpython/sglang/srt/layers/moe/moe_runner/humming.py227 # Neighboring nodes are required to utilize distinct workspaces.COMMENT
LOWpython/sglang/srt/managers/io_struct.py1008 lora_id: Optional[str] = None # None means just use the base modelCODE
LOWpython/sglang/srt/managers/io_struct.py1333 lora_id: Optional[str] = None # None means just use the base modelCODE
LOWpython/sglang/srt/managers/scheduler_pp_mixin.py465 # otherwise, just pass along previous consensusCOMMENT
LOWpython/sglang/srt/managers/scheduler.py4954 # In-place pause: just set the flag and return immediately.COMMENT
LOWpython/sglang/srt/function_call/qwen3_coder_detector.py45 # Base class already initializes _buffer, we just use it directlyCOMMENT
MEDIUMpython/sglang/srt/function_call/inkling_detector.py310 # the harness sees a structured tool_call, returns a tool error, andCOMMENT
MEDIUMpython/sglang/srt/models/inkling_common/kernels/comm.py800 # JIT module / bench harness as alternatives.COMMENT
LOWpython/sglang/srt/parser/harmony_parser.py492 # If no emit, just return the held contentCOMMENT
LOWpython/sglang/srt/mem_cache/hiradix_cache.py1620 # unknown prefetch stop policy, just return TrueCOMMENT
MEDIUMpython/sglang/multimodal_gen/test/test_utils.py1591 """Probe whether a remote GT file exists, robust to transient failures."""STRING
MEDIUM…ultimodal_gen/test/unit/sana_wm/test_realtime_chain.py186 # Tick 2: horizon exhausted -> seamless continuation, uniform chunk fromCOMMENT
MEDIUM…/sglang/multimodal_gen/test/server/testcase_configs.py283 # Realtime video consistency harness. When set, server tests useCOMMENT
LOWpython/sglang/multimodal_gen/test/server/gpu_cases.py73# To test different models, simply add more DiffusionCase entriesCOMMENT
MEDIUMpython/sglang/multimodal_gen/test/server/gpu_cases.py1284 # Enabled with small test-harness stub fixes (see this PR's test edits).COMMENT
MEDIUM…_gen/test/single_test_file/component_accuracy/hooks.py26# These are harness defaults for synthetic accuracy inputs.COMMENT
25 more matches not shown…
Docstring Block Structure31 hits · 155 pts
SeverityFileLineSnippetContext
HIGHpython/sglang/kernels/ops/attention/fla/chunk.py146 Args: q (torch.Tensor): queries of shape `[B, T, H, K]` if `head_first=False` else `[B, H, T, KSTRING
HIGH…on/sglang/kernels/ops/attention/fla/fused_recurrent.py765 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
HIGHpython/sglang/kernels/ops/quantization/fp8_kernel.py1735 Quantize input tensor to FP8 (8-bit floating point) format. Args: input (torch.Tensor): Input tensor to be quantizSTRING
HIGHpython/sglang/test/ascend/test_ascend_utils.py550Start the service and obtain the inference results. Parameters: model: Model name num_prompts: TotaSTRING
HIGHpython/sglang/srt/layers/model_parallel.py32 Locally shards a full tensor based on indicated sharding arrangement, and returns a DTensor containing the locaSTRING
HIGH…thon/sglang/srt/layers/attention/flashinfer_backend.py567Process multi-item scoring tensors for FlashInfer attention. This method handles sequences containing multiple STRING
HIGHpython/sglang/srt/layers/moe/cutlass_moe.py53Performs Fused MoE computation using CUTLASS-like kernels with FP8 weights and activations. This function implementSTRING
HIGHpython/sglang/srt/function_call/utils.py264 Get consolidated $defs from all tools, validating for conflicts. Args: tools: List of tools to processSTRING
HIGHpython/sglang/srt/utils/network.py139Bind a TCP socket on the first available address family (IPv4/IPv6). Iterates over address families returned by _geSTRING
HIGHpython/sglang/srt/utils/network.py335 Automatically detect the local IP address using multiple fallback strategies. This function attempts to obtainSTRING
HIGHpython/sglang/srt/utils/server_args_config_parser.py53 Merge configuration file arguments with command-line arguments. Configuration arguments are inserted aSTRING
HIGHpython/sglang/srt/utils/server_args_config_parser.py102 Parse YAML configuration file and convert to argument list. Args: file_path: Path to the YSTRING
HIGHpython/sglang/srt/utils/nvtx_pytorch_hooks.py46Descends iterators that contains Tensors and prints the Tensor Recursive function that descends iterator type aSTRING
HIGHpython/sglang/srt/utils/nvtx_pytorch_hooks.py74Extract the static parameters from LLM and VLM relevant layer types Args: module_obj(class): ModuleSTRING
HIGHpython/sglang/srt/utils/nvtx_pytorch_hooks.py198Callback function that ends the NVTX marker Records the module name and tensor information Called afterSTRING
HIGHpython/sglang/srt/utils/nvtx_pytorch_hooks.py218Creates an NVTX marker with the module name in it. This function is called before the module executes STRING
HIGHpython/sglang/srt/utils/nvtx_pytorch_hooks.py256User level function that activates all the hooks The user needs to call this method from the network source codSTRING
HIGHpython/sglang/srt/models/minicpmo.py137 In streaming audio generation, determine which `text` positions the TTS model can attend to when generating each chSTRING
HIGHpython/sglang/srt/models/minicpmo.py616Merge `input_ids` and `lm_spk_emb_last_hidden_states` to `inputs_embeds`. Args: input_ids (torch.TeSTRING
HIGHpython/sglang/srt/multimodal/processors/qwen_vl.py163calculate the number of frames for video used for model inputs. Args: ele (dict): a dict contains the confiSTRING
HIGHpython/sglang/srt/multimodal/processors/ernie45_vl.py130calculate the number of frames for video used for model inputs. Args: ele (dict): a dict contains the confiSTRING
HIGHpython/sglang/srt/mem_cache/storage/backend_factory.py73Create a storage backend instance. Args: backend_name: Name of the backend to create stoSTRING
HIGHpython/sglang/srt/speculative/dflash_utils.py356Select target layer indices used to build DFlash context features. Args: num_target_layers: Number of transSTRING
HIGHpython/sglang/srt/speculative/dflash_utils.py779Compute DFlash accept lengths and bonus tokens (greedy verify rule). Args: candidates: Token ids proposed bSTRING
HIGH…/runtime/managers/memory_managers/layerwise_offload.py1237Update consolidated CPU buffers with new weights. When layerwise offload (--dit-layerwise-offload) is enabled, STRING
HIGH…ang/multimodal_gen/runtime/utils/nvtx_pytorch_hooks.py97Walk ``model`` and attach forward pre/post hooks to every module. Args: model: Root module to instrSTRING
HIGH…ng/multimodal_gen/runtime/models/encoders/qwen2_5vl.py672 Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation:STRING
HIGH…imodal_gen/runtime/pipelines_core/stages/validators.py345 Add a validation check for a field. Args: field_name: Name of the field being checked STRING
HIGHsgl-model-gateway/e2e_test/infra/run_eval.py64Run an evaluation and return metrics. Args: args: Configuration object with attributes: - base_STRING
HIGHsgl-model-gateway/e2e_test/infra/model_pool.py727Get a model instance by model_id, mode, and worker_type. If the model is not running, it will be launched on-deSTRING
HIGHsgl-model-gateway/e2e_test/responses/test_basic_crud.py24Wait for background task to complete. Args: client: OpenAI client response_id: Response ID to poll STRING
Hallucination Indicators9 hits · 90 pts
SeverityFileLineSnippetContext
CRITICALpython/sglang/kernels/ops/attention/fla/utils.py231 return triton.runtime.driver.active.utils.get_device_properties(tensor_idx)[CODE
CRITICALpython/sglang/kernels/ops/attention/fla/utils.py286 triton.runtime.driver.active.utils.get_device_properties(i)[CODE
CRITICAL…tention_unittest/attention_methods/mamba2_attention.py553 self.mixer.norm.weight.data = self.mixer.norm.weight.data.float()CODE
CRITICAL…ng/test/scripted_runtime/context/lock_ref_exhauster.py43 stack = list(self.scheduler.tree_cache.root_node.children.values())CODE
CRITICALpython/sglang/test/scripted_runtime/context/radix.py56 stack = list(ctx.scheduler.tree_cache.root_node.children.values())CODE
CRITICALpython/sglang/srt/models/glm4_moe.py480 ) and self.shared_experts.gate_up_proj.quant_method.quant_config.get_name() in {CODE
CRITICALpython/sglang/srt/models/deepseek_v2.py789 ) and self.shared_experts.gate_up_proj.quant_method.quant_config.get_name() in {CODE
CRITICALpython/sglang/srt/mem_cache/buffer_mode/pipeline.py547 entry = self._cache.cache_controller.mem_pool_host.entry_map.get(transfer.name)CODE
CRITICAL…l_gen/runtime/pipelines_core/composed_pipeline_base.py127 task_name = self.server_args.pipeline_config.task_type.name.lower()CODE
Modern AI Meta-Vocabulary26 hits · 80 pts
SeverityFileLineSnippetContext
MEDIUM…t/manual/prefill_only/test_encoder_embedding_models.py12# Encoder embedding model tests (CUDA only)COMMENT
MEDIUM…t/registered/kernels/ops/kv_canary/test_verify_hand.py64# Shared per-test scaffolding helpers.COMMENT
MEDIUMtest/registered/pp/test_pp_gemma4.py57 # Gemma4 is instruction-tuned and doesn't follow few-shot completionCOMMENT
MEDIUM…red/disaggregation/test_disaggregation_different_tp.py610 # Small enough that the shared gsm8k few-shot prefix (~900 tokens) spansCOMMENT
MEDIUMtest/registered/eval/test_text_models_gsm8k_eval.py29 # sgl-eval (zero-shot chat, \boxed{}, math_verify grading). Thresholds areCOMMENT
MEDIUMpython/sglang/benchmark/datasets/agentic_trace.py13# ~220-token average assistant reply of OpenHands-style agentic traces.COMMENT
MEDIUMpython/sglang/kernels/ops/attention/flash_attention.py31 window_size=(-1, -1), # -1 means infinite context windowCODE
MEDIUM…hon/sglang/kernels/ops/attention/flash_attention_v3.py124 window_size=(-1, -1), # -1 means infinite context windowCODE
MEDIUM…hon/sglang/kernels/aot/python/sgl_kernel/flash_attn.py58 window_size=(-1, -1), # -1 means infinite context windowCODE
MEDIUMpython/sglang/test/run_eval.py336 # Only the nightly correctness eval opts into sgl-eval (zero-shotCOMMENT
MEDIUMpython/sglang/test/simple_eval_mixed_prefix_gsm8k.py64 # The evaluation data should not include the few-shot examples to prevent data leakage.COMMENT
MEDIUMpython/sglang/srt/managers/multi_tokenizer_mixin.py478 # read SHM only. Drain it event-driven via the socket's fd instead ofCOMMENT
MEDIUMpython/sglang/srt/managers/detokenizer_manager.py220 # If it is embedding model, no detokenization is needed.COMMENT
MEDIUMpython/sglang/srt/models/locate_anything.py358 # <box>: a closed <box>...</box> in a few-shot / multi-turn prompt isCOMMENT
MEDIUMpython/sglang/srt/parser/reasoning_parser.py1092 # detect_and_parse; without it the trailing reasoning trace is dropped.COMMENT
MEDIUMpython/sglang/srt/parser/conversation.py87 # The number of few shot examplesCOMMENT
MEDIUM.claude/skills/large-class-style/SKILL.md29### 1.3 Allowed: orchestrationCOMMENT
MEDIUM.claude/skills/large-class-style/SKILL.md41# model_runner.py — orchestration only.COMMENT
MEDIUM…-verify/scripts/mechanical_refactor_proof_generator.py801 # are exactly the relocated symbols (the prep commit inlined them, scaffolding included, asCOMMENT
MEDIUM…-verify/scripts/mechanical_refactor_proof_generator.py1155 # A move source the commit deletes (its defs all relocated, leaving only scaffolding) isCOMMENT
MEDIUMdocs/src/snippets/configs/poolside/laguna-m1.jsx157 // agentic coding, repeated long contexts. "Enable" emits --enable-hierarchical-cache (+host L2);COMMENT
MEDIUM…les/frontend_language/usage/openai_chat_speculative.py150 # expect answer with same format as in the few shotCOMMENT
MEDIUMexamples/runtime/chain_of_verification.py98 # `content` and the chain-of-thought in `reasoning_content`. In someCOMMENT
MEDIUMscripts/ci_monitor/ci_auto_bisect.py1060# Main orchestrationCOMMENT
MEDIUMscripts/ci/utils/ci_coverage_report.py314 # adding scaffolding for an unused backend would widen every row with aCOMMENT
MEDIUM…-model-gateway/e2e_test/embeddings/test_correctness.py151 # Get model path from MODEL_SPECS for the embedding modelCOMMENT
Dead Code28 hits · 56 pts
SeverityFileLineSnippetContext
MEDIUM…ed/unit/managers/test_tokenizer_manager_rid_cleanup.py584CODE
MEDIUM…ed/unit/managers/test_tokenizer_manager_rid_cleanup.py503CODE
MEDIUM…ed/unit/managers/test_tokenizer_manager_rid_cleanup.py531CODE
MEDIUM…egistered/unit/scripted_runtime/test_scheduler_hook.py20CODE
MEDIUM…egistered/unit/scripted_runtime/test_scheduler_hook.py25CODE
MEDIUM…/registered/unit/entrypoints/anthropic/test_serving.py1254CODE
MEDIUM…egistered/unit/entrypoints/openai/test_serving_chat.py2439CODE
MEDIUMpython/sglang/srt/entrypoints/http_server.py2071CODE
MEDIUMpython/sglang/srt/entrypoints/openai/serving_base.py146CODE
MEDIUMpython/sglang/srt/entrypoints/openai/serving_base.py149CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py961CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py962CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py963CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py966CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py967CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py969CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py971CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py974CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py975CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py977CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py987CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py1002CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py1012CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py1013CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py1014CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py1042CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py1043CODE
MEDIUM…ang/multimodal_gen/runtime/models/dits/hunyuanvideo.py1045CODE
Slop Phrases19 hits · 45 pts
SeverityFileLineSnippetContext
MEDIUM…manual/openai_server/function_call/test_tool_choice.py845# # Start the local OpenAI Server. If necessary, you can add other parameters such as --enable-tools.COMMENT
MEDIUM…i_server/function_call/test_openai_function_calling.py44 # Start the local OpenAI Server. If necessary, you can add other parameters such as --enable-tools.COMMENT
MEDIUM…i_server/function_call/test_openai_function_calling.py978# # Start the local OpenAI Server. If necessary, you can add other parameters such as --enable-tools.COMMENT
MEDIUM…ered/npu/interface/test_npu_openai_function_calling.py53 # Start the local OpenAI Server. If necessary, you can add other parameters such as --enable-tools.COMMENT
MEDIUM…hon/sglang/kernels/ops/attention/flash_attention_v3.py92 # That means if you use A100/A*0/L20/L40/L40s/4090 you can use fa3.COMMENT
MEDIUM…hon/sglang/kernels/aot/python/sgl_kernel/flash_attn.py24 # That means if you use A100/A*0/L20/L40/L40s/4090 you can use fa3.COMMENT
MEDIUMpython/sglang/kernels/aot/tests/test_flash_attention.py28 # That means if you use A100/A*0/L20/L40/L40s/4090 you can use fa3.COMMENT
LOWpython/sglang/test/runners.py497 # make sure to disable compileCOMMENT
LOWpython/sglang/srt/models/hunyuan.py776 # make sure to leave KV cache scale factors in a known good (dummy) stateCOMMENT
LOWpython/sglang/srt/models/apertus.py378 # make sure to leave KV cache scale factors in a known good (dummy) stateCOMMENT
LOWpython/sglang/srt/models/mimo_v2.py1118 # make sure to leave KV cache scale factors in a known good (dummy) stateCOMMENT
MEDIUMpython/sglang/srt/models/inkling.py1066 # (BCG) setup treats Inkling as a language model: model_runner'sCOMMENT
LOWpython/sglang/srt/models/llama.py469 # make sure to leave KV cache scale factors in a known good (dummy) stateCOMMENT
LOWpython/sglang/srt/models/glm4.py393 # make sure to leave KV cache scale factors in a known good (dummy) stateCOMMENT
LOWpython/sglang/srt/models/qwen2.py450 # make sure to leave KV cache scale factors in a known good (dummy) stateCOMMENT
LOW…glang/multimodal_gen/runtime/models/vaes/hunyuanvae.py273 # If you are encountering an error here, make sure to try running encoding/decoding withCOMMENT
MEDIUM…ntend_language/quick_start/local_example_llava_next.py55 # Or you can use the 72B modelCOMMENT
MEDIUM…ntend_language/quick_start/local_example_llava_next.py62 # Or you can use API modelsCOMMENT
MEDIUM…-gateway/examples/wasm/wasm-guest-ratelimit/src/lib.rs37// This is a simplified example for demonstration purposesCOMMENT
Fake / Example Data21 hits · 24 pts
SeverityFileLineSnippetContext
LOW…l/sgl-router/tests/scripts/generate_parity_fixtures.py41 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod "CODE
LOW…l/sgl-router/tests/scripts/generate_parity_fixtures.py41 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod "CODE
LOWtest/registered/unit/models/test_kimi_k25.py201 with pytest.raises(ValueError, match="placeholder"):CODE
LOW…st/registered/unit/multimodal/rust/qwen/test_driver.py80 self.assert_rejected(ids, images, "placeholder")CODE
LOW…registered/unit/model_loader/test_presharded_loader.py733 fake_key = ("_test_meta_rope_cleanup_sentinel",)CODE
LOW…registered/unit/model_loader/test_presharded_loader.py736 _ROPE_DICT[fake_key] = fake_moduleCODE
LOW…registered/unit/model_loader/test_presharded_loader.py756 self.assertNotIn(fake_key, _ROPE_DICT)CODE
LOWpython/sglang/test/kits/ebnf_constrained_kit.py62 self.__class__.ebnf_grammar = 'root ::= "user@example.com"'CODE
LOWpython/sglang/srt/batch_overlap/two_batch_overlap.py857 # (MAX_LEN) count and would undo the idle-rank dummy-token mask.COMMENT
LOWpython/sglang/srt/compilation/backend.py233 if node.op in ("output", "placeholder"):CODE
LOWrust/sglang-mm/src/driver.rs278 assert!(err.contains("placeholder"));CODE
LOW…-model-gateway/tests/security/auth_integration_test.rs174 let claims = create_claims("admin@example.com", vec!["admin"]);CODE
LOW…-model-gateway/tests/security/auth_integration_test.rs187 assert_eq!(validated.subject, "admin@example.com");CODE
LOW…-model-gateway/tests/security/auth_integration_test.rs213 let claims = create_claims("user@example.com", vec!["user", "viewer"]);CODE
LOW…-model-gateway/tests/security/auth_integration_test.rs221 assert_eq!(validated.subject, "user@example.com");CODE
LOW…-model-gateway/tests/security/auth_integration_test.rs252 sub: "user@example.com".to_string(),CODE
LOW…-model-gateway/tests/security/auth_integration_test.rs301 sub: "user@example.com".to_string(),CODE
LOW…-model-gateway/tests/security/auth_integration_test.rs338 let claims = create_claims("user@example.com", vec!["admin"]);CODE
LOW…-model-gateway/tests/security/auth_integration_test.rs590 let claims = create_claims("user@example.com", vec!["admin"]);CODE
LOW…-model-gateway/tests/security/auth_integration_test.rs713 let claims = create_claims("user@example.com", vec!["admin"]);CODE
LOWsgl-model-gateway/e2e_test/benchmarks/conftest.py38 "dummy-token",CODE
Overly Generic Function Names17 hits · 20 pts
SeverityFileLineSnippetContext
LOWbenchmark/hicache/bench_mix.py417 async def handle_request(self, user_data):CODE
LOWbenchmark/hicache/bench_multiturn.py388 async def handle_request(self, item):CODE
LOWpython/sglang/srt/debug_utils/dumper.py1371 def handle_request(self, *, method: str, body: dict[str, Any]) -> list[dict]:CODE
LOWpython/sglang/srt/entrypoints/openai/serving_base.py73 async def handle_request(CODE
LOW…/scripts/tests/proof_generator/test_script_and_diff.py137 "def keep():\n return 0\n\n\ndef helper(x):\n return x + 1\n"CODE
LOW…/scripts/tests/proof_generator/test_script_and_diff.py160 "def helper(x):\n"CODE
LOW…rify/scripts/tests/proof_generator/test_infer_moves.py49 "def keep():\n return 0\n\n\ndef helper(x):\n return x + 1\n"CODE
LOW…rify/scripts/tests/proof_generator/test_infer_moves.py72 "def helper(x):\n"CODE
LOW…ipts/tests/reproduction_utils/test_extract_function.py180 signature=" def helper(self):",CODE
LOW…ipts/tests/reproduction_utils/test_extract_function.py190 assert " def helper(self):\n val = compute_thing()\n" in outCODE
LOW…y/scripts/tests/reproduction_utils/test_move_symbol.py84 "class Old:\n @staticmethod\n def helper(x):\n return x * 2\n"CODE
LOW…y/scripts/tests/reproduction_utils/test_move_symbol.py91 assert "def helper(x):\n return x * 2\n" in (tmp_path / "dst.py").read_text()CODE
LOW…y/scripts/tests/reproduction_utils/test_move_symbol.py292 " def helper(y):\n"CODE
LOW…y/scripts/tests/reproduction_utils/test_move_symbol.py302 assert " @staticmethod\n def helper(y):\n" in dst_outCODE
LOW…y/scripts/tests/reproduction_utils/test_move_symbol.py421 (tmp_path / "src.py").write_text("def helper(x):\n return x\n")CODE
LOW…y/scripts/tests/reproduction_utils/test_move_symbol.py427 assert " def helper(x):\n return x\n" in (tmp_path / "dst.py").read_text()CODE
LOW…y/scripts/tests/reproduction_utils/test_move_symbol.py347 (tmp_path / "src.py").write_text("def helper(x):\n return x + 1\n")CODE
Synthetic Comment Markers2 hits · 15 pts
SeverityFileLineSnippetContext
HIGHtest/manual/attention/test_trtllm_mla_backend.py1236 # Reshape as requestedCOMMENT
HIGH…ang/multimodal_gen/runtime/utils/hf_diffusers_utils.py593 # Special handling for stop token <|eom_id|> generated by llama 3 tool use.COMMENT
Example Usage Blocks7 hits · 9 pts
SeverityFileLineSnippetContext
LOW…rimental/sgl-router/tests/e2e/k8s_integration/setup.sh6# Usage:COMMENT
LOWscripts/build_sgl_deepep.sh4# Usage:COMMENT
LOWscripts/killall_sglang.sh8# Usage:COMMENT
LOWscripts/playground/launch_pr_babysitters.sh4# Usage:COMMENT
LOWscripts/ci/musa/rename_wheels_musa.sh10# Usage:COMMENT
LOWsgl-model-gateway/e2e_test/k8s_integration/setup.sh8# Usage:COMMENT
LOW…ngs/golang/examples/oai_server/scripts/analyze_tpot.sh6# Usage:COMMENT
TODO Padding4 hits · 6 pts
SeverityFileLineSnippetContext
LOWtest/manual/test_expert_distribution.py20 # TODO: Add tests for DeepEP gatherer (currently our CI cannot run that)COMMENT
LOWpython/sglang/kernels/aot/csrc/cpu/common.h369 // TODO: implement reverse order of [MB / cache_blocks_mb, NB, cache_blocks_mb]COMMENT
LOWpython/sglang/kernels/aot/python/sgl_kernel/top_k.py12 # TODO: implement faster cuda kernels for large vocab sizesCOMMENT
LOWpython/sglang/srt/layers/moe/fused_moe_triton/layer.py1577 # TODO: consider using symmetric memoryCOMMENT