Repository Analysis

ModelTC/LightLLM

LightLLM is a Python-based LLM (Large Language Model) inference and serving framework, notable for its lightweight design, easy scalability, and high-speed performance.

19.1 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of ModelTC/LightLLM, a Python project with 4,251 GitHub stars. SynthScan v2.0 examined 176,849 lines of code across 1711 source files, recording 2868 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 19.1 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).

19.1
Adjusted Score
19.1
Raw Score
100%
Time Factor
2026-08-29
Last Push
4.3K
Stars
Python
Language
176.8K
Lines of Code
1.7K
Files
2.9K
Pattern Hits
2026-08-29
Scan Date
0.02
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

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

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 8HIGH 25MEDIUM 129LOW 2706

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 2868 distinct pattern matches across 21 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 Identifiers1255 hits · 1301 pts
SeverityFileLineSnippetContext
LOWtest/benchmark/static_inference/static_benchmark.py246 def _materialize_context_for_decode(self, case: BenchmarkCase):CODE
LOWtest/benchmark/static_inference/static_benchmark.py514 def _materialize_cached_prefix(self, req_idx: torch.Tensor, cached_len: int):CODE
LOWtest/benchmark/static_inference/static_benchmark.py689 def _merge_overlap_model_outputs(output0: ModelOutput, output1: ModelOutput) -> ModelOutput:CODE
LOWtest/benchmark/static_inference/static_benchmark.py720 def _build_mtp_decode_index_tensors(self, req_idx: torch.Tensor, step_width: int):CODE
LOWtest/benchmark/static_inference/static_benchmark.py851def prefill_step_tokens_per_req(uncached_len: int, chunked_prefill_size: Optional[int]) -> int:CODE
LOWtest/benchmark/static_inference/static_benchmark.py881def prefill_batch_size_from_batch_max_tokens(CODE
LOWtest/benchmark/static_inference/static_benchmark.py976def decode_profile_batch_divisor(args: SimpleNamespace, case: BenchmarkCase) -> int:CODE
LOWtest/benchmark/static_inference/static_benchmark.py982def resolve_profile_decode_cases(CODE
LOWtest/benchmark/static_inference/static_benchmark.py1017def resolve_batch_max_prefill_cases(CODE
LOWtest/benchmark/static_inference/static_benchmark.py1559def add_static_benchmark_args(parser: argparse.ArgumentParser):CODE
LOWtest/benchmark/service/benchmark_multiturn.py174def gen_session_initial_prompt(CODE
LOWtest/benchmark/service/benchmark_multiturn.py622def run_full_concurrency_level(CODE
LOWtest/benchmark/service/benchmark_multiturn.py691def run_pooled_concurrency_level(CODE
LOWtest/benchmark/service/benchmark_qps.py57def gen_random_input_text_with_seed(tokenizer, input_len, seed) -> str:CODE
LOWtest/benchmark/service/benchmark_qps.py170async def async_post_stream_lightllm(url, prompt, max_new_tokens, session):CODE
LOWtest/test_pd_selector/test_pd_master_metrics.py26def test_pd_master_exports_node_load_with_role_and_endpoint_labels():CODE
LOWtest/test_pd_selector/test_pd_master_metrics.py70def test_metric_server_copies_rpyc_label_proxy_before_updating_gauge():CODE
LOWtest/test_pd_selector/test_pd_master_metrics.py105def test_pd_master_stage_waiting_gauge_is_balanced_for_every_exit(stage, outcome):CODE
LOWtest/test_pd_selector/test_pd_master_multi_choice.py24def test_pd_master_expands_n_into_concurrent_single_choice_requests():CODE
LOWtest/test_pd_selector/test_pd_master_multi_choice.py103def test_pd_master_n_one_uses_the_same_choice_merge_path():CODE
LOWtest/test_pd_selector/test_pd_master_multi_choice.py146def test_pd_master_multi_choice_failure_closes_other_generators():CODE
LOWtest/test_pd_selector/test_pd_master_multi_choice.py175def test_pd_master_multi_choice_cancellation_is_not_treated_as_success():CODE
LOWtest/test_pd_selector/test_pd_master_multi_choice.py190def test_pd_master_closing_merged_stream_closes_choice_generators():CODE
LOWtest/test_pd_selector/test_pd_master_multi_choice.py211def test_pd_master_releases_prefill_load_when_generation_fails():CODE
LOWtest/test_pd_selector/test_pd_master_multi_choice.py222 async def failing_wait_to_token_package(*_args, **_kwargs):CODE
LOWtest/test_pd_selector/test_pd_master_multi_choice.py246def test_pd_master_accounts_each_split_prefill_on_the_same_node():CODE
LOWtest/test_pd_selector/test_pd_master_multi_choice.py303def test_pd_master_releases_prefill_load_when_stream_is_closed():CODE
LOWtest/utils/test_tensor_buffer_manager.py13def test_allocate_different_shapes_and_dtypes_from_one_buffer():CODE
LOWtest/utils/test_tensor_buffer_manager.py31def test_non_byte_backing_tensor_is_used_as_byte_storage():CODE
LOWtest/utils/test_tensor_buffer_manager.py40def test_released_block_is_reused():CODE
LOWtest/utils/test_tensor_buffer_manager.py51def test_adjacent_free_blocks_are_merged():CODE
LOWtest/utils/test_tensor_buffer_manager.py68def test_release_rejects_unknown_and_already_released_tensors():CODE
LOWtest/utils/test_tensor_buffer_manager.py79def test_stale_tensor_cannot_release_reused_address():CODE
LOWtest/utils/test_tensor_buffer_manager.py92def test_allocation_reports_fragmentation_on_failure():CODE
LOWtest/utils/test_tensor_buffer_manager.py106def test_invalid_buffer_is_rejected():CODE
LOWtest/utils/test_tensor_buffer_manager.py117def test_unaligned_buffer_prefix_is_skipped():CODE
LOWtest/utils/test_tensor_buffer_manager.py126def test_empty_tensor_does_not_consume_buffer_space():CODE
LOWtest/test_api/test_seed_validation.py16def test_api_request_seed_range(request_type, request_data):CODE
LOWtest/test_api/test_seed_validation.py34def test_sampling_params_normalizes_and_accepts_seed(seed, expected_seed):CODE
LOWtest/test_api/test_seed_validation.py45def test_sampling_params_rejects_out_of_range_seed(seed):CODE
LOWtest/test_api/test_rl_endpoints.py170def update_weights_from_disk_via_tensor_api(CODE
LOWtest/test_api/test_openai_api.py214 def completions_with_multiple_prompts(self, prompts: List[str], **kwargs) -> Dict[str, Any]:CODE
LOWtest/test_api/test_openai_api.py231 def completions_with_logprobs(self, prompt: str, logprobs: int = 5, **kwargs) -> Dict[str, Any]:CODE
LOWtest/test_api/test_openai_api.py267 def completions_with_echo_and_logprobs(CODE
LOWtest/test_api/test_openai_api.py288 def completions_logprobs_structure_test(self, prompt: str, **kwargs) -> Dict[str, Any]:CODE
LOWtest/test_api/test_openai_api.py344 def completions_with_multiple_token_arrays(self, token_arrays: List[List[int]], **kwargs) -> Dict[str, Any]:CODE
LOWtest/test_api/test_openai_api.py502def test_stream_function_call():CODE
LOWtest/test_api/test_openai_api.py666def test_multiple_token_arrays():CODE
LOWtest/test_api/test_openai_api.py686def test_structured_generation():CODE
LOWtest/test_api/test_anthropic_extra_body.py434def test_url_pdf_document_block_is_rejected_explicitly():CODE
LOWtest/test_api/test_anthropic_extra_body.py442def test_tool_result_url_pdf_document_block_is_rejected_explicitly():CODE
LOWtest/test_api/test_anthropic_extra_body.py449def test_tool_result_pdf_document_block_becomes_text_not_pdf_image_url(monkeypatch):CODE
LOWtest/test_api/test_anthropic_extra_body.py653def test_pdf_cache_does_not_store_empty_results():CODE
LOWtest/test_api/test_anthropic_extra_body.py663def test_anthropic_messages_impl_runs_translation_in_thread(monkeypatch):CODE
LOWtest/test_api/test_anthropic_extra_body.py673 async def fake_chat_completions_impl(_request, _raw_request):CODE
LOWtest/test_api/test_anthropic_extra_body.py121def test_extra_body_chat_template_kwargs_forwarded():CODE
LOWtest/test_api/test_anthropic_extra_body.py131def test_native_thinking_parameter_is_forwarded():CODE
LOWtest/test_api/test_anthropic_extra_body.py142def test_replayed_thinking_is_preserved_through_request_validation():CODE
LOWtest/test_api/test_anthropic_extra_body.py164def test_extra_body_multiple_fields_forwarded():CODE
LOWtest/test_api/test_anthropic_extra_body.py179def test_top_level_openai_field_beats_extra_body_duplicate():CODE
1195 more matches not shown…
Unused Imports844 hits · 815 pts
SeverityFileLineSnippetContext
LOWtest/benchmark/static_inference/profile_demo.py2CODE
LOWtest/benchmark/static_inference/profile_demo.py3CODE
LOWtest/benchmark/static_inference/test_vit.py1CODE
LOWtest/benchmark/static_inference/test_vit.py2CODE
LOWtest/benchmark/static_inference/test_vit.py4CODE
LOWtest/benchmark/static_inference/test_vit.py38CODE
LOWtest/benchmark/service/benchmark_client.py3CODE
LOWtest/benchmark/service/benchmark_qps.py3CODE
LOWtest/benchmark/service/benchmark_qps.py4CODE
LOWtest/benchmark/service/benchmark_qps.py9CODE
LOWtest/benchmark/service/benchmark_qps.py11CODE
LOWtest/benchmark/service/benchmark_mcq.py18CODE
LOWtest/benchmark/service/benchmark_mcq.py29CODE
LOWtest/benchmark/service/benchmark_sharegpt.py28CODE
LOWtest/cpu_cache_kernel/test_speed.py19CODE
LOWtest/test_pd_selector/test_pd_master_multi_choice.py1CODE
LOWtest/format_out/test_xgrammar_constraint.py1CODE
LOWtest/format_out/qabot.py23CODE
LOWtest/format_out/qabot.py24CODE
LOWtest/test_api/test_rl_endpoints.py44CODE
LOWtest/test_api/test_openai_api.py11CODE
LOWtest/test_api/test_openai_api.py12CODE
LOWtest/test_api/test_stream_fc.py24CODE
LOWtest/test_api/test_stream_fc.py24CODE
LOWtest/test_api/test_multimodal_api.py2CODE
LOWtest/test_api/test_abort_request.py43CODE
LOWtest/performance/audio_test.py1CODE
LOWtest/performance/multimodal_test.py3CODE
LOWtest/performance/multimodal_test.py4CODE
LOWtest/performance/multimodal_test.py9CODE
LOWtest/performance/multimodal_test.py11CODE
LOWtest/kernel/moe_sum_reduce_tuning_bf16.py8CODE
LOWtest/kernel/llama_gqa_diverse_decode_stage1_tuning.py2CODE
LOWtest/kernel/deepseekv3_rotary_emb_tuning.py3CODE
LOWtest/kernel/deepseekv3_rotary_emb_tuning.py9CODE
LOWtest/kernel/deepseekv3_fp8_block_gemm_tuning.py5CODE
LOWtest/kernel/llama_gqa_diverse_decode_stage2_tuning.py4CODE
LOWtest/kernel/llama_gqa_decode_vsm_tuning.py2CODE
LOWtest/acc/test_vlm_models.py1CODE
LOWtest/acc/test_vlm_models.py2CODE
LOWtest/acc/test_vlm_models.py3CODE
LOWtest/acc/test_vlm_models.py5CODE
LOWtest/acc/test_vlm_models.py7CODE
LOWtest/acc/test_vlm_models.py8CODE
LOWtest/acc/test_vlm_models.py9CODE
LOWtest/acc/bfcl/eval_bfcl.py33CODE
LOWtest/acc/bfcl/eval_bfcl.py36CODE
LOWunit_tests/server/core/objs/test_shm_array.py5CODE
LOWunit_tests/server/core/objs/test_atomic_array_lock.py4CODE
LOWunit_tests/server/core/objs/test_req.py3CODE
LOWunit_tests/server/core/objs/test_req.py3CODE
LOWunit_tests/utils/test_custom_kernel_utils.py2CODE
LOWunit_tests/models/qwen3-vl/test_deepstack_emb.py2CODE
LOWunit_tests/models/qwen3-vl/test_deepstack_emb.py3CODE
LOWunit_tests/models/qwen3-vl/test_deepstack_emb.py4CODE
LOWunit_tests/models/deepseek2/test_rope_repeat.py2CODE
LOWunit_tests/models/qwen2_vl/test_rotary_pos_emb.py1CODE
LOWunit_tests/common/kv_trans_kernel/test_nixl_kv_trans.py1CODE
LOWunit_tests/common/fused_moe/test_grouped_topk.py4CODE
LOW…tests/common/fused_moe/test_grouped_fused_moe_speed.py4CODE
784 more matches not shown…
Decorative Section Separators78 hits · 294 pts
SeverityFileLineSnippetContext
MEDIUMtest/cpu_cache_kernel/test_speed.py21# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/cpu_cache_kernel/test_speed.py24# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/cpu_cache_kernel/test_speed.py39# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/cpu_cache_kernel/test_speed.py41# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/cpu_cache_kernel/test_speed.py63# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/cpu_cache_kernel/test_speed.py65# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/cpu_cache_kernel/test_speed.py79# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/cpu_cache_kernel/test_speed.py81# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/cpu_cache_kernel/test_speed.py153# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/cpu_cache_kernel/test_speed.py155# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/cpu_cache_kernel/test_speed.py178# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/cpu_cache_kernel/test_speed.py180# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/cpu_cache_kernel/test_speed.py227# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/cpu_cache_kernel/test_speed.py229# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/test_api/test_stream_fc.py28# ──────────────────────────────────────────────COMMENT
MEDIUMtest/test_api/test_stream_fc.py30# ──────────────────────────────────────────────COMMENT
MEDIUMtest/test_api/test_stream_fc.py86# ──────────────────────────────────────────────COMMENT
MEDIUMtest/test_api/test_stream_fc.py88# ──────────────────────────────────────────────COMMENT
MEDIUMtest/test_api/test_stream_fc.py160# ──────────────────────────────────────────────COMMENT
MEDIUMtest/test_api/test_stream_fc.py162# ──────────────────────────────────────────────COMMENT
MEDIUMtest/test_api/test_stream_fc.py594# ──────────────────────────────────────────────COMMENT
MEDIUMtest/test_api/test_stream_fc.py596# ──────────────────────────────────────────────COMMENT
MEDIUM…del/triton_kernel/linear_att/test_causal_conv1d_mtp.py510# =============================================================================COMMENT
MEDIUM…del/triton_kernel/linear_att/test_causal_conv1d_mtp.py512# =============================================================================COMMENT
MEDIUMlightllm/server/io_struct.py24# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/io_struct.py26# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/io_struct.py40# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/io_struct.py42# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/api_anthropic.py86# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/api_anthropic.py88# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/api_anthropic.py867# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/api_anthropic.py869# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/api_anthropic.py1255# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/api_anthropic.py1257# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/api_anthropic.py697# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/api_anthropic.py699# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/api_anthropic.py1208# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/api_anthropic.py1210# ---------------------------------------------------------------------------COMMENT
MEDIUMlightllm/server/router/multinode_tp_helper.py22 # ==================================================================COMMENT
MEDIUMlightllm/server/router/multinode_tp_helper.py24 # ==================================================================COMMENT
MEDIUMlightllm/server/router/multinode_tp_helper.py58 # ==================================================================COMMENT
MEDIUMlightllm/server/router/multinode_tp_helper.py60 # ==================================================================COMMENT
MEDIUMlightllm/server/router/multinode_tp_helper.py124 # ==================================================================COMMENT
MEDIUMlightllm/server/router/multinode_tp_helper.py126 # ==================================================================COMMENT
MEDIUMlightllm/server/router/multinode_tp_helper.py147 # ==================================================================COMMENT
MEDIUMlightllm/server/router/multinode_tp_helper.py149 # ==================================================================COMMENT
MEDIUM…er/model_infer/mode_backend/pd/base_kv_move_manager.py56 # ==================================================================================COMMENT
MEDIUM…er/model_infer/mode_backend/pd/base_kv_move_manager.py58 # ==================================================================================COMMENT
MEDIUM…er/model_infer/mode_backend/pd/base_kv_move_manager.py63 # ==================================================================================COMMENT
MEDIUM…er/model_infer/mode_backend/pd/base_kv_move_manager.py65 # ==================================================================================COMMENT
MEDIUM…er/model_infer/mode_backend/pd/base_kv_move_manager.py94 # ==================================================================================COMMENT
MEDIUM…er/model_infer/mode_backend/pd/base_kv_move_manager.py96 # ==================================================================================COMMENT
MEDIUM…er/model_infer/mode_backend/pd/base_kv_move_manager.py103 # ==================================================================================COMMENT
MEDIUM…er/model_infer/mode_backend/pd/base_kv_move_manager.py105 # ==================================================================================COMMENT
MEDIUM…ackend/pd/prefill_node_impl/prefill_kv_move_manager.py54 # ==================================================================================COMMENT
MEDIUM…ackend/pd/prefill_node_impl/prefill_kv_move_manager.py56 # ==================================================================================COMMENT
MEDIUM…_backend/pd/decode_node_impl/decode_kv_move_manager.py74 # ==================================================================================COMMENT
MEDIUM…_backend/pd/decode_node_impl/decode_kv_move_manager.py76 # ==================================================================================COMMENT
MEDIUM…de_backend/pd/decode_node_impl/decode_trans_process.py56 # -------------------------------------------------------------------------COMMENT
MEDIUM…de_backend/pd/decode_node_impl/decode_trans_process.py74 # -------------------------------------------------------------------------COMMENT
18 more matches not shown…
Excessive Try-Catch Wrapping234 hits · 254 pts
SeverityFileLineSnippetContext
LOWtest/compare_with_previous_commit.py59 except Exception:CODE
LOWtest/compare_with_previous_commit.py80 except Exception as e:CODE
LOWtest/benchmark/bench_agents.py150 except Exception as e: # keep the run alive; record failure count onlyCODE
LOWtest/benchmark/static_inference/static_benchmark.py1327 except Exception:CODE
LOWtest/benchmark/static_inference/static_benchmark.py1333 except Exception:CODE
LOWtest/benchmark/service/benchmark_multiturn.py124 except Exception as exc:CODE
LOWtest/benchmark/service/benchmark_multiturn.py306 except Exception:CODE
LOWtest/benchmark/service/benchmark_multiturn.py347 except Exception as e:CODE
LOWtest/benchmark/service/benchmark_qps.py155 except Exception:CODE
LOWtest/benchmark/service/benchmark_qps.py161 except Exception as e:CODE
LOWtest/benchmark/service/benchmark_qps.py165 except Exception as e:CODE
LOWtest/benchmark/service/benchmark_qps.py203 except Exception:CODE
LOWtest/benchmark/service/benchmark_qps.py209 except Exception as e:CODE
LOWtest/benchmark/service/benchmark_qps.py213 except Exception as e:CODE
LOWtest/benchmark/service/benchmark_qps.py284 except Exception as e:CODE
LOWtest/benchmark/service/benchmark_qps.py317 except Exception as e:CODE
MEDIUMtest/benchmark/service/benchmark_qps.py122def async_post_stream_openai(url, prompt, max_new_tokens, session):CODE
MEDIUMtest/benchmark/service/benchmark_qps.py170def async_post_stream_lightllm(url, prompt, max_new_tokens, session):CODE
LOWtest/benchmark/service/benchmark_prompt_cache.py72 except Exception as e:CODE
LOWtest/benchmark/service/benchmark_sharegpt.py129 except Exception:CODE
LOWtest/format_out/gomoku_game.py158 except Exception as e:CODE
LOWtest/format_out/gomoku_game.py184 except Exception as e:CODE
LOWtest/test_api/test_rl_endpoints.py112 except Exception:CODE
LOWtest/test_api/test_abort_chaos.py53 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py373 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py389 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py401 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py419 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py498 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py555 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py572 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py593 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py616 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py638 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py662 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py682 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py748 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py767 except Exception as e:CODE
LOWtest/test_api/test_openai_api.py793 except Exception as e:CODE
LOWtest/test_api/test_stream_fc.py644 except Exception as e:CODE
LOWtest/test_api/test_abort_request.py123 except Exception:CODE
LOWtest/test_api/test_abort_request.py145 except Exception as e:CODE
LOWtest/test_api/test_abort_request.py150 except Exception as e:CODE
LOWtest/test_api/test_abort_request.py408 except Exception as e:CODE
LOWtest/performance/audio_test.py226 except Exception as e:CODE
LOWtest/performance/audio_test.py282 except Exception as e:CODE
LOWtest/performance/multimodal_test.py164 except Exception as e:CODE
LOWtest/performance/multimodal_test.py209 except Exception as e:CODE
LOWtest/performance/multimodal_test.py294 except Exception as e:CODE
LOWtest/kernel/moe_sum_reduce_tuning_bf16.py95 except Exception as ex:CODE
LOWtest/kernel/llama_gqa_diverse_decode_stage1_tuning.py168 except Exception as ex:CODE
LOWtest/kernel/deepseekv3_rotary_emb_tuning.py104 except Exception as ex:CODE
LOWtest/kernel/deepseekv2_gqa_decode_tuning.py159 except Exception as ex:CODE
LOWtest/kernel/deepseekv3_fp8_block_gemm_tuning.py101 except Exception as ex:CODE
LOWtest/kernel/llama_gqa_diverse_decode_stage2_tuning.py137 except Exception as ex:CODE
LOWtest/kernel/llama_gqa_decode_vsm_tuning.py134 except Exception as ex:CODE
LOWtest/acc/bfcl/eval_bfcl.py114 except Exception as e:CODE
MEDIUMtest/acc/bfcl/eval_bfcl.py115 print(f"Error downloading {filename}: {e}")CODE
LOWtest/acc/bfcl/eval_bfcl.py462 except Exception as e:CODE
LOWtest/acc/bfcl/eval_bfcl.py555 except Exception as e:CODE
174 more matches not shown…
Deep Nesting196 hits · 180 pts
SeverityFileLineSnippetContext
LOWtest/benchmark/bench_agents.py94CODE
LOWtest/benchmark/static_inference/static_benchmark.py1181CODE
LOWtest/benchmark/service/benchmark_multiturn.py233CODE
LOWtest/benchmark/service/benchmark_multiturn.py536CODE
LOWtest/benchmark/service/benchmark_multiturn.py691CODE
LOWtest/benchmark/service/benchmark_qps.py122CODE
LOWtest/benchmark/service/benchmark_qps.py170CODE
LOWtest/benchmark/service/benchmark_qps.py250CODE
LOWtest/benchmark/service/benchmark_prompt_cache.py37CODE
LOWtest/benchmark/kernel/benchmark_fused_moe_triton.py12CODE
LOWtest/format_out/gomoku_game.py49CODE
LOWtest/format_out/qabot.py4CODE
LOWtest/test_api/test_rl_endpoints.py170CODE
LOWtest/test_api/test_openai_api.py406CODE
LOWtest/test_api/test_openai_api.py502CODE
LOWtest/test_api/test_openai_api.py752CODE
LOWtest/test_api/test_openai_api.py41CODE
LOWtest/test_api/test_openai_api.py99CODE
LOWtest/test_api/test_openai_api.py148CODE
LOWtest/test_api/test_anthropic_extra_body.py785CODE
LOWtest/test_api/test_stream_fc.py91CODE
LOWtest/test_api/test_stream_fc.py435CODE
LOWtest/test_api/test_abort_request.py84CODE
LOWtest/performance/audio_test.py180CODE
LOWtest/performance/audio_test.py193CODE
LOWtest/performance/audio_test.py239CODE
LOWtest/performance/multimodal_test.py245CODE
LOWtest/kernel/moe_sum_reduce_tuning_bf16.py127CODE
LOWtest/kernel/llama_gqa_diverse_decode_stage1_tuning.py181CODE
LOWtest/kernel/llama_gqa_diverse_decode_stage1_tuning.py214CODE
LOWtest/kernel/deepseekv3_rotary_emb_tuning.py130CODE
LOWtest/kernel/deepseekv2_gqa_decode_tuning.py167CODE
LOWtest/kernel/deepseekv2_gqa_decode_tuning.py206CODE
LOWtest/kernel/deepseekv3_fp8_block_gemm_tuning.py137CODE
LOWtest/kernel/llama_gqa_diverse_decode_stage2_tuning.py147CODE
LOWtest/kernel/llama_gqa_diverse_decode_stage2_tuning.py179CODE
LOWtest/kernel/llama_gqa_decode_vsm_tuning.py147CODE
LOWtest/kernel/llama_gqa_decode_vsm_tuning.py187CODE
LOWtest/acc/bfcl/eval_bfcl.py119CODE
LOWtest/acc/bfcl/eval_bfcl.py142CODE
LOWtest/acc/bfcl/eval_bfcl.py279CODE
LOWtest/acc/bfcl/eval_bfcl.py306CODE
LOWtest/acc/bfcl/eval_bfcl.py382CODE
LOWtest/acc/bfcl/eval_bfcl.py466CODE
LOWunit_tests/common/kv_trans_kernel/test_nixl_kv_trans.py30CODE
LOWunit_tests/common/fused_moe/test_deepep.py141CODE
LOW…del/triton_kernel/linear_att/test_causal_conv1d_mtp.py9CODE
LOWformat_out/impl.py34CODE
LOWformat_out/grammer/dpda.py406CODE
LOWformat_out/grammer/dpda.py501CODE
LOWformat_out/grammer/core.py320CODE
LOWformat_out/grammer/core.py342CODE
LOWformat_out/grammer/core.py377CODE
LOWformat_out/grammer/core.py228CODE
LOWformat_out/grammer/core.py237CODE
LOWformat_out/grammer/core.py272CODE
LOWlightllm/server/reasoning_parser.py61CODE
LOWlightllm/server/reasoning_parser.py152CODE
LOWlightllm/server/reasoning_parser.py267CODE
LOWlightllm/server/reasoning_parser.py435CODE
136 more matches not shown…
Hallucination Indicators8 hits · 80 pts
SeverityFileLineSnippetContext
CRITICALlightllm/server/visualserver/manager.py54 self.cache_client._channel.stream.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)CODE
CRITICALlightllm/server/visualserver/model_infer/model_rpc.py121 self.cache_client._channel.stream.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)CODE
CRITICALlightllm/server/httpserver/manager.py89 self.cache_client._channel.stream.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)CODE
CRITICALlightllm/server/httpserver/manager.py872 self.router_profiler_client._channel.stream.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)CODE
CRITICALlightllm/server/audioserver/manager.py48 self.cache_client._channel.stream.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)CODE
CRITICALlightllm/server/audioserver/model_infer/model_rpc.py57 self.cache_client._channel.stream.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)CODE
CRITICAL…el_infer/mode_backend/dp_backend/dp_shared_kv_trans.py113 self.backend.model.mem_manager.operator.copy_kv_from_other_dp_ranks(CODE
CRITICAL…on/basemodel/triton_kernel/linear_att/fla/ops/utils.py151 triton.runtime.driver.active.utils.get_device_properties(i)["max_shared_mem"]CODE
Cross-Language Confusion12 hits · 78 pts
SeverityFileLineSnippetContext
HIGH…t_tests/server/core/objs/test_out_token_circlequeue.py19 queue.push("token1", 0, False, 1)CODE
HIGH…t_tests/server/core/objs/test_out_token_circlequeue.py37 queue.push("token1", 0, False, 1)CODE
HIGH…t_tests/server/core/objs/test_out_token_circlequeue.py38 queue.push("token2", 1, False, 2)CODE
HIGH…t_tests/server/core/objs/test_out_token_circlequeue.py39 queue.push("token3", 2, False, 3)CODE
HIGH…t_tests/server/core/objs/test_out_token_circlequeue.py73 queue.push(f"token{i}", i, False, 1)CODE
HIGH…t_tests/server/core/objs/test_out_token_circlequeue.py79 queue.push("token_overflow", LIGHTLLM_OUT_TOKEN_QUEUE_SIZE, False, 1)CODE
HIGH…t_tests/server/core/objs/test_out_token_circlequeue.py95 queue.push(f"token{i}", i, False, i)CODE
HIGH…t_tests/server/core/objs/test_out_token_circlequeue.py107 queue.push("token1", 0, False, 1)CODE
HIGH…t_tests/server/core/objs/test_out_token_circlequeue.py108 queue.push("token2", 1, False, 2)CODE
HIGHlightllm/server/detokenization/manager.py122 decode_req.req.out_tokens_queue.push(new_text, src_index, special, count_output_tokens)CODE
HIGH…m/models/gemma4/layer_infer/transformer_layer_infer.py39 # Some E-series checkpoints leave num_global_key_value_heads = null;COMMENT
HIGH…odels/gemma4/layer_weights/transformer_layer_weight.py27 # Some E-series checkpoints leave num_global_key_value_heads = null;COMMENT
Self-Referential Comments20 hits · 60 pts
SeverityFileLineSnippetContext
MEDIUMgenerate_requirements_musa.sh35# Create the output file with a header commentCOMMENT
MEDIUMtest/acc/bfcl/eval_bfcl.py164 # Create a mapping from id to answerCOMMENT
MEDIUMunit_tests/server/core/objs/test_shm_array.py27 # Create a new instance to link the existing shmCOMMENT
MEDIUMunit_tests/server/core/objs/test_shm_array.py37 # Create a new shm with a different sizeCOMMENT
MEDIUMunit_tests/server/core/objs/test_atomic_array_lock.py11 # Create an instance of AtomicShmArrayLockCOMMENT
MEDIUMlightllm/distributed/pynccl_wrapper.py22# This file is a pure Python wrapper for the NCCL library.COMMENT
MEDIUM…mon/basemodel/triton_kernel/linear_att/fla/__init__.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUM…n/basemodel/triton_kernel/linear_att/fla/ops/l2norm.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUM…semodel/triton_kernel/linear_att/fla/ops/solve_tril.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUM…on/basemodel/triton_kernel/linear_att/fla/ops/index.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUM…basemodel/triton_kernel/linear_att/fla/ops/__init__.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUM…on/basemodel/triton_kernel/linear_att/fla/ops/chunk.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUM…ommon/basemodel/triton_kernel/linear_att/fla/ops/op.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUM…on/basemodel/triton_kernel/linear_att/fla/ops/utils.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUM…/basemodel/triton_kernel/linear_att/fla/ops/chunk_o.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUM…/basemodel/triton_kernel/linear_att/fla/ops/wy_fast.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUM…n/basemodel/triton_kernel/linear_att/fla/ops/cumsum.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUM…iton_kernel/linear_att/fla/ops/chunk_scaled_dot_kkt.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUM…odel/triton_kernel/linear_att/fla/ops/chunk_delta_h.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUM…el/triton_kernel/linear_att/fla/ops/fused_recurrent.py5# This file contains code copied from the flash-linear-attention project.COMMENT
Over-Commented Block58 hits · 53 pts
SeverityFileLineSnippetContext
LOWdocker/scripts/build.sh1#!/usr/bin/env bashCOMMENT
LOWtest/benchmark/bench_agents.py1# Example:COMMENT
LOWtest/benchmark/service/benchmark_mcq.py1# Adapted from benchmarks/benchmark_serving.pyCOMMENT
LOWtest/benchmark/service/benchmark_sharegpt.py1# Adapted from benchmarks/benchmark_serving.pyCOMMENT
LOWtest/cpu_cache_kernel/test_speed.py121)COMMENT
LOWtest/performance/multimodal_test.py541# import argparseCOMMENT
LOWtest/performance/multimodal_test.py561# os.environ["PYTHONHASHSEED"] = str(seed)COMMENT
LOWtest/performance/multimodal_test.py581COMMENT
LOWtest/performance/multimodal_test.py601# def get_prompts_from_json(json_path, tokenizer, output_len, range_ratio):COMMENT
LOWtest/performance/multimodal_test.py621# # -------------------- 请求函数 --------------------COMMENT
LOWtest/performance/multimodal_test.py641# start = time.time()COMMENT
LOWtest/performance/multimodal_test.py661COMMENT
LOWtest/performance/multimodal_test.py681# }COMMENT
LOWtest/performance/multimodal_test.py701# # -------------------- 并发控制 --------------------COMMENT
LOWtest/performance/multimodal_test.py721# end = time.time()COMMENT
LOWtest/performance/multimodal_test.py741# args = parser.parse_args()COMMENT
LOWtest/performance/multimodal_test.py761# run_fixed_concurrency_benchmark(async_task, args.url, prompts, max_new_tokens, args.num_concurrent)COMMENT
LOWtest/performance/multimodal_test.py781# final_output_lens.append(len(result))COMMENT
LOWtest/performance/multimodal_test.py801# "Total Throughput": (sum(input_lens) + sum(final_output_lens)) / (end_time - start_time),COMMENT
LOWtest/performance/multimodal_test.py821# with open(args.dump_file, "w") as f:COMMENT
LOWtest/start_scripts/draft.sh21--enable_cpu_cache --cpu_cache_storage_size 66 --cpu_cache_token_page_size 128COMMENT
LOWtest/start_scripts/multi_pd_master/pd_prefill.sh21# if you want to enable microbatch overlap, you can uncomment the following linesCOMMENT
LOWtest/acc/test_deepseekr1_mtp_ep.sh21# 不要写额外的脚本来启动服务,就是单独一个一个的按照上面的描述启动服务,然后再执行评测脚本,然后注意等待服务启动完成,可以20s检测一次其控制台输出,看是否启动完成,还是启动报错。COMMENT
LOWtest/acc/test_qwen2.5_fp8kv_sph.sh1# 先清理掉占用显卡和端口的进程COMMENT
LOWtest/acc/test_pd.sh61--tasks gsm8k --batch_size 1 --confirm_run_unsafe_code --limit 1COMMENT
LOWtest/acc/bfcl/run_bfcl.sh1#!/bin/bashCOMMENT
LOWlightllm/distributed/pynccl_wrapper.py1# Adapted fromCOMMENT
LOWlightllm/distributed/pynccl_wrapper.py21COMMENT
LOWlightllm/distributed/pynccl_wrapper.py181 Function(COMMENT
LOWlightllm/distributed/communication_op.py1# Adapted fromCOMMENT
LOWlightllm/distributed/pynccl.py1# Adapted fromCOMMENT
LOWlightllm/server/api_http.py1# Adapted from vllm/entrypoints/api_server.pyCOMMENT
LOWlightllm/server/reasoning_parser.py1# Adaptive from SGlang [https://github.com/sgl-project/sglang/blob/main/python/sglang/srt/parser/reasoning_parser.py]COMMENT
LOWlightllm/server/function_call_parser.py1# Adaptive from SGlang [https://github.com/sgl-project/sglang/blob/main/python/sglang/srt/function_call_parser.py]COMMENT
LOWlightllm/server/tokenizer.py1# Adapted from vllm/transformers_utils/tokenizer.pyCOMMENT
LOWlightllm/server/visualserver/model_infer/model_rpc.py41COMMENT
LOW…de_backend/pd/decode_node_impl/decode_trans_process.py61 # 上排队,而推理在另一进程的 stream 上执行,彼此无法 cudaStreamWaitEventCOMMENT
LOWlightllm/utils/dist_utils.py1import torch.distributed as distCOMMENT
LOWlightllm/utils/dist_utils.py21# +------+--------------+----------------+-------------+--------------+------------------+COMMENT
LOWlightllm/utils/dist_utils.py61 # "device_id": device_id,COMMENT
LOWlightllm/utils/rl/bucketed_weight_transfer.py1# Copyright 2025 Bytedance Ltd. and/or its affiliatesCOMMENT
LOW…llm/models/qwen3_omni_moe_thinker/qwen3_omni_visual.py1# coding=utf-8COMMENT
LOWlightllm/models/qwen2_vl/qwen2_visual.py1# coding=utf-8COMMENT
LOWlightllm/models/whisper/modeling_whisper.py1# Copyright 2025 The HuggingFace Inc. team.COMMENT
LOWlightllm/models/qwen3_vl/qwen3_visual.py1# coding=utf-8COMMENT
LOWlightllm/common/cuda_wrapper.py1# Adapted fromCOMMENT
LOWlightllm/common/basemodel/batch_objs.py21 b_mtp_index: torch.Tensor = NoneCOMMENT
LOW…/common/basemodel/triton_kernel/flashinfer_mla_plan.py1import torchCOMMENT
LOW…emodel/triton_kernel/fused_moe/grouped_fused_moe_ep.py261COMMENT
LOW…basemodel/triton_kernel/fused_moe/grouped_fused_moe.py1"""Fused MoE kernel."""COMMENT
LOW…ommon/basemodel/triton_kernel/fused_moe/topk_select.py1# Adapted fromCOMMENT
LOW…/triton_kernel/alibi_att/token_flashattention_nopad.py121 returnCOMMENT
LOW…/triton_kernel/alibi_att/token_flashattention_nopad.py141# o,COMMENT
LOW…htllm/common/basemodel/triton_kernel/norm/layernorm.py61# # print("BLOCK_SIZE:", BLOCK_SIZE)COMMENT
LOW…asemodel/triton_kernel/linear_att/causal_conv1d_mtp.py1# Vendored from vLLM v0.14.1COMMENT
LOW…asemodel/triton_kernel/linear_att/causal_conv1d_mtp.py81COMMENT
LOW…emodel/triton_kernel/linear_att/mtp_fused_recurrent.py1# SPDX-License-Identifier: Apache-2.0COMMENT
LOW…mon/basemodel/triton_kernel/linear_att/fla/__init__.py1# SPDX-License-Identifier: Apache-2.0COMMENT
Redundant / Tautological Comments29 hits · 46 pts
SeverityFileLineSnippetContext
LOWgenerate_requirements_musa.sh55 # Check if this is a CUDA package to skipCOMMENT
LOWgenerate_requirements_musa.sh69 # Check if this is a torch-related package (remove version pin)COMMENT
LOWtest/test_api/test_gsmk.py58 # Check if the cache file already existsCOMMENT
LOWtest/test_api/test_gsmk.py233 # Print resultsCOMMENT
LOWtest/test_api/test_anthropic_extra_body.py908 # Set logger to DEBUG so caplog can capture itCOMMENT
LOWtest/acc/test_gsmk.py42 # Check if the cache file already existsCOMMENT
LOWtest/acc/test_gsmk.py215 # Print resultsCOMMENT
LOWtest/acc/bfcl/run_bfcl.sh23# Check if server is runningCOMMENT
LOWtest/acc/bfcl/eval_bfcl.py409 # Check if it's already in standard format {"name": ..., "arguments": ...}COMMENT
LOWlightllm/server/reasoning_parser.py164 # Check if this might be incompleteCOMMENT
LOWlightllm/server/reasoning_parser.py171 # Check if this might be commentary filler between blocksCOMMENT
LOWlightllm/server/reasoning_parser.py201 # Check if this might be commentary filler between blocksCOMMENT
LOWlightllm/server/reasoning_parser.py379 # Check if we have CALL -> TEXT("commentary") -> CHANNEL patternCOMMENT
LOWlightllm/server/reasoning_parser.py524 # Check if we should start filtering commentary (after <|call|> token or tool_call event)COMMENT
LOWlightllm/server/reasoning_parser.py535 # Check if we're in a commentary filtering stateCOMMENT
LOWlightllm/server/api_openai.py816 # Check if it's a list of integers (token IDs)COMMENT
LOWlightllm/server/function_call_parser.py729 # Check if we have a tool call (either the start token or individual tool call)COMMENT
LOWlightllm/server/function_call_parser.py911 # Check if we have a tool call (either the start token or individual tool call)COMMENT
LOWlightllm/server/function_call_parser.py1089 # Check if we have a tool call (either the start token or individual tool call)COMMENT
LOWlightllm/server/function_call_parser.py1335 # Check if we have a tool call startingCOMMENT
LOWlightllm/server/function_call_parser.py447 # Check if buffer contains complete end token (without leading newline)COMMENT
LOWlightllm/server/function_call_parser.py454 # Check if buffer might contain partial end token at the endCOMMENT
LOWlightllm/server/function_call_parser.py1357 # Check if we have a complete tool callCOMMENT
LOWlightllm/server/function_call_parser.py1407 # Check if function name is validCOMMENT
LOWlightllm/server/function_call_parser.py1563 # Check if we're inside a function_calls block or starting oneCOMMENT
LOWlightllm/server/function_call_parser.py1581 # Check if function_calls block has endedCOMMENT
LOWlightllm/utils/device_utils.py148 # Check if the output contains 'NVLink'COMMENT
LOWlightllm/utils/device_utils.py163 # Check if the output contains 'MTLink'COMMENT
LOW…/meta_weights/fused_moe/gpt_oss_fused_moe_weight_tp.py199 # Check if blocks and scales are on CPU, and move to GPU if soCOMMENT
Modern Structural Boilerplate44 hits · 45 pts
SeverityFileLineSnippetContext
LOWdocs/CN/source/conf.py22logger = logging.getLogger(__name__)CODE
LOWdocs/EN/source/conf.py22logger = logging.getLogger(__name__)CODE
LOWlightllm/distributed/pynccl_wrapper.py53logger = logging.getLogger(__name__)CODE
LOWlightllm/distributed/pynccl_wrapper.py394__all__ = [CODE
LOWlightllm/distributed/pynccl.py45logger = logging.getLogger(__name__)CODE
LOWlightllm/server/reasoning_parser.py954 def update_reasoning_token_count(self, token_id: int) -> None:CODE
LOWlightllm/server/function_call_parser.py32logger = logging.getLogger(__name__)CODE
LOWlightllm/server/embed_cache/impl/naive_memory_cache.py251 def set_items_data(self, ids: list[int]) -> None:CODE
LOWlightllm/server/embed_cache/impl/naive_memory_cache.py258 def set_items_embed(self, ids: list[int]) -> None:CODE
LOW…er/httpserver_for_pd_master/pd_selector/cache_aware.py71 def update_config(self, config: CacheAwareConfig) -> None:CODE
LOW…/server/router/model_infer/mtp_speculative/__init__.py5__all__ = ["DPOverlapSpecEngine", "SpecEngine"]CODE
LOW…outer/model_infer/mtp_speculative/dp_overlap_engine.py186__all__ = ["DPOverlapSpecEngine"]CODE
LOW…llm/server/router/model_infer/mtp_speculative/utils.py133__all__ = [CODE
LOW…uter/model_infer/mtp_speculative/proposers/__init__.py43__all__ = [CODE
LOW…router/model_infer/mtp_speculative/planner/__init__.py7__all__ = [CODE
LOW…r/router/model_infer/mtp_speculative/planner/dspark.py86 def _update_confidence_probs(self, confidence_probs, req_num: int) -> None:CODE
LOW…infer/mtp_speculative/dp_overlap_proposers/__init__.py48__all__ = ["build_dp_overlap_spec_proposer"]CODE
LOWlightllm/utils/infer_utils.py85def set_random_seed(seed: int) -> None:CODE
LOWlightllm/models/qwen3_dspark/__init__.py3__all__ = ["Qwen3DSparkModel"]CODE
LOWlightllm/models/qwen3_dspark/layer_weights/__init__.py5__all__ = ["Qwen3DSparkPreAndPostLayerWeight"]CODE
LOWlightllm/models/glm4_moe_lite_mtp/__init__.py3__all__ = ["Glm4MoeLiteMTPModel"]CODE
LOW…llm/models/glm4_moe_lite_mtp/layer_weights/__init__.py5__all__ = ["Glm4MoeLiteMTPPreAndPostLayerWeight"]CODE
LOWlightllm/models/qwen3_dflash/__init__.py3__all__ = ["Qwen3DFlashModel"]CODE
LOWlightllm/models/qwen3_dflash/layer_weights/__init__.py8__all__ = [CODE
LOWlightllm/models/glm4_moe_lite/__init__.py4__all__ = ["Glm4MoeLiteTpPartModel", "Glm4MoeLiteInferStateInfo"]CODE
LOWlightllm/models/glm4_moe_lite/layer_infer/__init__.py3__all__ = ["Glm4MoeLiteTransformerLayerInfer"]CODE
LOWlightllm/models/glm4_moe_lite/layer_weights/__init__.py3__all__ = ["Glm4MoeLiteTransformerLayerWeight"]CODE
LOWlightllm/models/qwen3_5_dflash/__init__.py3__all__ = ["Qwen3_5DFlashModel"]CODE
LOW…ghtllm/models/qwen3_5_dflash/layer_weights/__init__.py5__all__ = ["Qwen35DFlashPreAndPostLayerWeight"]CODE
LOWlightllm/models/qwen2_vl/qwen2_visual.py111 def update_freqs_cache(self, seqlen: int) -> None:CODE
LOWlightllm/models/qwen3_5_dspark/__init__.py3__all__ = ["Qwen3_5DSparkModel"]CODE
LOWlightllm/models/qwen3_5/__init__.py13__all__ = [CODE
LOWlightllm/models/qwen3next/__init__.py3__all__ = ["Qwen3NextTpPartModel"]CODE
LOWlightllm/models/qwen3_5_moe_mtp/__init__.py3__all__ = ["Qwen3_5MoeMTPModel"]CODE
LOW…htllm/models/qwen3_5_moe_mtp/layer_weights/__init__.py5__all__ = ["Qwen3_5MoeMTPTransformerLayerWeight"]CODE
LOWlightllm/common/basemodel/__init__.py15__all__ = [CODE
LOWlightllm/common/basemodel/attention/linear/__init__.py9__all__ = [CODE
LOWlightllm/common/basemodel/attention/nsa/__init__.py14__all__ = [CODE
LOW…/common/basemodel/triton_kernel/linear_att/__init__.py10__all__ = [CODE
LOW…basemodel/triton_kernel/linear_att/fla/ops/__init__.py12__all__ = [CODE
LOW…on/basemodel/triton_kernel/linear_att/fla/ops/utils.py22logger = logging.getLogger(__name__)CODE
LOW…iton_kernel/att/decode_att/gqa/mtp_diverse/__init__.py10__all__ = [CODE
LOWlightllm/common/kv_cache_mem_manager/__init__.py12__all__ = [CODE
LOWlightllm/common/cpu_cache/__init__.py3__all__ = ["CpuCacheCreator", "CpuCacheTensorSpec"]CODE
Cross-File Repetition9 hits · 45 pts
SeverityFileLineSnippetContext
HIGHtest/benchmark/service/benchmark_client.py0gets a tokenizer for the given model name via huggingface.STRING
HIGHtest/benchmark/service/benchmark_qps.py0gets a tokenizer for the given model name via huggingface.STRING
HIGHtest/benchmark/service/benchmark_mcq.py0gets a tokenizer for the given model name via huggingface.STRING
HIGHtest/benchmark/service/benchmark_sharegpt.py0gets a tokenizer for the given model name via huggingface.STRING
HIGHtest/performance/multimodal_test.py0gets a tokenizer for the given model name via huggingface.STRING
HIGHlightllm/server/tokenizer.py0gets a tokenizer for the given model name via huggingface.STRING
HIGH…server/router/model_infer/mode_backend/base_backend.py0将错误请求从 req_ids 中过滤出来, 然后让 _get_classed_reqs 进行处理。 该函数 主要用于在 nixl pd 分离模式下, 由子类继承重载, prefill 和 decode 节点过滤 kv 传输错误,或者 kv STRING
HIGH…nfer/mode_backend/pd/prefill_node_impl/prefill_impl.py0将错误请求从 req_ids 中过滤出来, 然后让 _get_classed_reqs 进行处理。 该函数 主要用于在 nixl pd 分离模式下, 由子类继承重载, prefill 和 decode 节点过滤 kv 传输错误,或者 kv STRING
HIGH…_infer/mode_backend/pd/decode_node_impl/decode_impl.py0将错误请求从 req_ids 中过滤出来, 然后让 _get_classed_reqs 进行处理。 该函数 主要用于在 nixl pd 分离模式下, 由子类继承重载, prefill 和 decode 节点过滤 kv 传输错误,或者 kv STRING
AI Structural Patterns46 hits · 44 pts
SeverityFileLineSnippetContext
LOWunit_tests/models/qwen2_vl/test_rotary_pos_emb.py22CODE
LOW…tt/int8kv/test_int8kv_flash_decoding_diverse_stage1.py8CODE
LOWlightllm/server/pd_io_struct.py251CODE
LOWlightllm/server/metrics/manager.py64CODE
LOWlightllm/server/core/objs/py_sampling_params.py28CODE
LOWlightllm/server/core/objs/out_token_circlequeue.py103CODE
LOWlightllm/server/embed_cache/utils.py17CODE
LOWlightllm/utils/sgl_utils.py82CODE
LOWlightllm/utils/dist_utils.py326CODE
LOW…/models/gpt_oss/layer_infer/transformer_layer_infer.py28CODE
LOW…/models/gpt_oss/layer_infer/transformer_layer_infer.py33CODE
LOW…emma4/triton_kernel/context_attention_fwd_gemma4_mm.py347CODE
LOWlightllm/models/qwen_vl/qwen_visual.py241CODE
LOWlightllm/models/qwen2_5_vl/qwen2_5_visual.py139CODE
LOW…tllm/models/vit/layer_infer/transformer_layer_infer.py40CODE
LOW…tllm/models/vit/layer_infer/transformer_layer_infer.py54CODE
LOWlightllm/models/tarsier2/tarsier2_visual.py153CODE
LOWlightllm/models/qwen3_omni_moe_thinker/audio_process.py18CODE
LOWlightllm/models/qwen3_omni_moe_thinker/audio_process.py106CODE
LOW…tllm/models/qwen3_omni_moe_thinker/qwen3_omni_audio.py150CODE
LOW…llm/models/qwen3_omni_moe_thinker/qwen3_omni_visual.py124CODE
LOW…odels/deepseek2/layer_infer/transformer_layer_infer.py115CODE
LOW…eepseek2/triton_kernel/context_flashattention_nopad.py438CODE
LOWlightllm/models/qwen2_vl/qwen2_visual.py179CODE
LOWlightllm/models/qwen2_vl/vision_process.py81CODE
LOW…odels/qwen3next/layer_infer/transformer_layer_infer.py325CODE
LOWlightllm/models/whisper/modeling_whisper.py51CODE
LOWlightllm/models/qwen3_vl/qwen3_visual.py120CODE
LOWlightllm/common/quantization/w8a8gx.py115CODE
LOWlightllm/common/basemodel/attention/triton/fp.py244CODE
LOWlightllm/common/basemodel/attention/triton/mla.py159CODE
LOW…basemodel/triton_kernel/fused_moe/grouped_fused_moe.py992CODE
LOW…basemodel/triton_kernel/fused_moe/grouped_fused_moe.py1118CODE
LOW…basemodel/triton_kernel/fused_moe/grouped_fused_moe.py1158CODE
LOW…basemodel/triton_kernel/fused_moe/grouped_fused_moe.py1188CODE
LOW…basemodel/triton_kernel/fused_moe/grouped_fused_moe.py1228CODE
LOW…basemodel/triton_kernel/fused_moe/grouped_fused_moe.py1258CODE
LOW…iton_kernel/alibi_att/token_attention_nopad_reduceV.py108CODE
LOW…riton_kernel/alibi_att/context_flashattention_nopad.py196CODE
LOW…odel/triton_kernel/linear_att/fla/ops/chunk_delta_h.py256CODE
LOW…el/triton_kernel/linear_att/fla/ops/fused_recurrent.py250CODE
LOW…el/triton_kernel/linear_att/fla/ops/fused_recurrent.py432CODE
LOW…el/triton_kernel/linear_att/fla/ops/fused_recurrent.py385CODE
LOW…mha/stage3_decode_att/token_attention_nopad_reduceV.py110CODE
LOW…yer_weights/meta_weights/fused_moe/impl/triton_impl.py155CODE
LOW…r_weights/meta_weights/fused_moe/impl/deepgemm_impl.py91CODE
Structural Annotation Overuse11 hits · 24 pts
SeverityFileLineSnippetContext
LOWtest/performance/multimodal_test.py21 # Step 1: Generate a random image (RGB)COMMENT
LOWtest/performance/multimodal_test.py24 # Step 2: Convert NumPy array to PIL ImageCOMMENT
LOWtest/performance/multimodal_test.py27 # Step 3: Save the image to a BytesIO bufferCOMMENT
LOWtest/performance/multimodal_test.py31 # Step 4: Encode the image bytes to Base64COMMENT
LOWtest/start_scripts/README.md70# Step 1: Start PD MasterCOMMENT
LOWtest/start_scripts/README.md73# Step 2: Start Prefill serviceCOMMENT
LOWtest/start_scripts/README.md76# Step 3: Start Decode serviceCOMMENT
LOWtest/start_scripts/README.md83# Step 1: Start configuration serverCOMMENT
LOWtest/start_scripts/README.md86# Step 2: Start multiple PD MastersCOMMENT
LOWtest/start_scripts/README.md90# Step 3: Start Prefill and Decode services with the prefill/decode run modes.COMMENT
LOWlightllm/models/deepseek3_2/encoding_dsv32.py380# NOTE: This function is designed to parse only correctlyCOMMENT
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHlightllm/utils/shm_utils.py10 Args: name: name of the shared memory expected_size: expected size of the shared memory, if expecteSTRING
HIGH…htllm/models/deepseek2/triton_kernel/weight_dequant.py10 Dequantizes the given weight tensor using the provided scale tensor. Args: x (torch.Tensor): The quantSTRING
HIGH…on/basemodel/triton_kernel/linear_att/fla/ops/chunk.py123 Args: q (torch.Tensor): queries of shape `[B, T, H, K]` if `head_first=False` else `[B, H, T, KSTRING
HIGH…el/triton_kernel/linear_att/fla/ops/fused_recurrent.py453 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
Dead Code8 hits · 16 pts
SeverityFileLineSnippetContext
MEDIUMtest/test_pd_selector/test_pd_master_multi_choice.py164CODE
MEDIUMtest/test_pd_selector/test_pd_master_multi_choice.py181CODE
MEDIUMtest/test_pd_selector/test_pd_master_multi_choice.py224CODE
MEDIUMunit_tests/server/httpserver/test_pd_generate_error.py24CODE
MEDIUMunit_tests/server/httpserver/test_pd_generate_error.py32CODE
MEDIUMunit_tests/server/httpserver/test_pd_generate_error.py47CODE
MEDIUMunit_tests/server/httpserver/test_pd_generate_error.py59CODE
MEDIUMformat_out/impl.py61CODE
Verbosity Indicators4 hits · 9 pts
SeverityFileLineSnippetContext
LOWtest/performance/multimodal_test.py21 # Step 1: Generate a random image (RGB)COMMENT
LOWtest/performance/multimodal_test.py24 # Step 2: Convert NumPy array to PIL ImageCOMMENT
LOWtest/performance/multimodal_test.py27 # Step 3: Save the image to a BytesIO bufferCOMMENT
LOWtest/performance/multimodal_test.py31 # Step 4: Encode the image bytes to Base64COMMENT
Modern AI Meta-Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtest/test_api/test_gsmk.py181 # Test questions should start after few-shot examplesCOMMENT
MEDIUMtest/acc/test_gsmk.py163 # Test questions should start after few-shot examplesCOMMENT
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
LOWlightllm/server/reasoning_parser.py484 # If no emit, just return the held contentCOMMENT
MEDIUM…emma4/triton_kernel/context_attention_fwd_gemma4_mm.py267# Reference implementation + standalone test harnessCOMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMlightllm/server/tokenizer.py70 # you can try pip install protobuf==3.20.0 to try repairCOMMENT
Overly Generic Function Names3 hits · 3 pts
SeverityFileLineSnippetContext
LOWlightllm/server/visualserver/proxy_manager.py121 def run_task(self, conn: rpyc.Connection, images: List[ImageItem]):CODE
LOW…lm/server/visualserver/model_infer/model_rpc_client.py34 async def run_task(self, images: List[ImageItem], ref_event_list: List[threading.Event]):CODE
LOW…llm/server/audioserver/model_infer/model_rpc_client.py31 async def run_task(self, audios: List[AudioItem], ref_event_list: List[threading.Event]):CODE