LightLLM is a Python-based LLM (Large Language Model) inference and serving framework, notable for its lightweight design, easy scalability, and high-speed performance.
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/benchmark/static_inference/static_benchmark.py | 246 | def _materialize_context_for_decode(self, case: BenchmarkCase): | CODE |
| LOW | test/benchmark/static_inference/static_benchmark.py | 514 | def _materialize_cached_prefix(self, req_idx: torch.Tensor, cached_len: int): | CODE |
| LOW | test/benchmark/static_inference/static_benchmark.py | 689 | def _merge_overlap_model_outputs(output0: ModelOutput, output1: ModelOutput) -> ModelOutput: | CODE |
| LOW | test/benchmark/static_inference/static_benchmark.py | 720 | def _build_mtp_decode_index_tensors(self, req_idx: torch.Tensor, step_width: int): | CODE |
| LOW | test/benchmark/static_inference/static_benchmark.py | 851 | def prefill_step_tokens_per_req(uncached_len: int, chunked_prefill_size: Optional[int]) -> int: | CODE |
| LOW | test/benchmark/static_inference/static_benchmark.py | 881 | def prefill_batch_size_from_batch_max_tokens( | CODE |
| LOW | test/benchmark/static_inference/static_benchmark.py | 976 | def decode_profile_batch_divisor(args: SimpleNamespace, case: BenchmarkCase) -> int: | CODE |
| LOW | test/benchmark/static_inference/static_benchmark.py | 982 | def resolve_profile_decode_cases( | CODE |
| LOW | test/benchmark/static_inference/static_benchmark.py | 1017 | def resolve_batch_max_prefill_cases( | CODE |
| LOW | test/benchmark/static_inference/static_benchmark.py | 1559 | def add_static_benchmark_args(parser: argparse.ArgumentParser): | CODE |
| LOW | test/benchmark/service/benchmark_multiturn.py | 174 | def gen_session_initial_prompt( | CODE |
| LOW | test/benchmark/service/benchmark_multiturn.py | 622 | def run_full_concurrency_level( | CODE |
| LOW | test/benchmark/service/benchmark_multiturn.py | 691 | def run_pooled_concurrency_level( | CODE |
| LOW | test/benchmark/service/benchmark_qps.py | 57 | def gen_random_input_text_with_seed(tokenizer, input_len, seed) -> str: | CODE |
| LOW⚡ | test/benchmark/service/benchmark_qps.py | 170 | async def async_post_stream_lightllm(url, prompt, max_new_tokens, session): | CODE |
| LOW | test/test_pd_selector/test_pd_master_metrics.py | 26 | def test_pd_master_exports_node_load_with_role_and_endpoint_labels(): | CODE |
| LOW | test/test_pd_selector/test_pd_master_metrics.py | 70 | def test_metric_server_copies_rpyc_label_proxy_before_updating_gauge(): | CODE |
| LOW | test/test_pd_selector/test_pd_master_metrics.py | 105 | def test_pd_master_stage_waiting_gauge_is_balanced_for_every_exit(stage, outcome): | CODE |
| LOW | test/test_pd_selector/test_pd_master_multi_choice.py | 24 | def test_pd_master_expands_n_into_concurrent_single_choice_requests(): | CODE |
| LOW | test/test_pd_selector/test_pd_master_multi_choice.py | 103 | def test_pd_master_n_one_uses_the_same_choice_merge_path(): | CODE |
| LOW | test/test_pd_selector/test_pd_master_multi_choice.py | 146 | def test_pd_master_multi_choice_failure_closes_other_generators(): | CODE |
| LOW | test/test_pd_selector/test_pd_master_multi_choice.py | 175 | def test_pd_master_multi_choice_cancellation_is_not_treated_as_success(): | CODE |
| LOW | test/test_pd_selector/test_pd_master_multi_choice.py | 190 | def test_pd_master_closing_merged_stream_closes_choice_generators(): | CODE |
| LOW | test/test_pd_selector/test_pd_master_multi_choice.py | 211 | def test_pd_master_releases_prefill_load_when_generation_fails(): | CODE |
| LOW | test/test_pd_selector/test_pd_master_multi_choice.py | 222 | async def failing_wait_to_token_package(*_args, **_kwargs): | CODE |
| LOW | test/test_pd_selector/test_pd_master_multi_choice.py | 246 | def test_pd_master_accounts_each_split_prefill_on_the_same_node(): | CODE |
| LOW | test/test_pd_selector/test_pd_master_multi_choice.py | 303 | def test_pd_master_releases_prefill_load_when_stream_is_closed(): | CODE |
| LOW | test/utils/test_tensor_buffer_manager.py | 13 | def test_allocate_different_shapes_and_dtypes_from_one_buffer(): | CODE |
| LOW | test/utils/test_tensor_buffer_manager.py | 31 | def test_non_byte_backing_tensor_is_used_as_byte_storage(): | CODE |
| LOW | test/utils/test_tensor_buffer_manager.py | 40 | def test_released_block_is_reused(): | CODE |
| LOW | test/utils/test_tensor_buffer_manager.py | 51 | def test_adjacent_free_blocks_are_merged(): | CODE |
| LOW | test/utils/test_tensor_buffer_manager.py | 68 | def test_release_rejects_unknown_and_already_released_tensors(): | CODE |
| LOW | test/utils/test_tensor_buffer_manager.py | 79 | def test_stale_tensor_cannot_release_reused_address(): | CODE |
| LOW | test/utils/test_tensor_buffer_manager.py | 92 | def test_allocation_reports_fragmentation_on_failure(): | CODE |
| LOW | test/utils/test_tensor_buffer_manager.py | 106 | def test_invalid_buffer_is_rejected(): | CODE |
| LOW | test/utils/test_tensor_buffer_manager.py | 117 | def test_unaligned_buffer_prefix_is_skipped(): | CODE |
| LOW | test/utils/test_tensor_buffer_manager.py | 126 | def test_empty_tensor_does_not_consume_buffer_space(): | CODE |
| LOW | test/test_api/test_seed_validation.py | 16 | def test_api_request_seed_range(request_type, request_data): | CODE |
| LOW | test/test_api/test_seed_validation.py | 34 | def test_sampling_params_normalizes_and_accepts_seed(seed, expected_seed): | CODE |
| LOW | test/test_api/test_seed_validation.py | 45 | def test_sampling_params_rejects_out_of_range_seed(seed): | CODE |
| LOW | test/test_api/test_rl_endpoints.py | 170 | def update_weights_from_disk_via_tensor_api( | CODE |
| LOW | test/test_api/test_openai_api.py | 214 | def completions_with_multiple_prompts(self, prompts: List[str], **kwargs) -> Dict[str, Any]: | CODE |
| LOW | test/test_api/test_openai_api.py | 231 | def completions_with_logprobs(self, prompt: str, logprobs: int = 5, **kwargs) -> Dict[str, Any]: | CODE |
| LOW | test/test_api/test_openai_api.py | 267 | def completions_with_echo_and_logprobs( | CODE |
| LOW | test/test_api/test_openai_api.py | 288 | def completions_logprobs_structure_test(self, prompt: str, **kwargs) -> Dict[str, Any]: | CODE |
| LOW | test/test_api/test_openai_api.py | 344 | def completions_with_multiple_token_arrays(self, token_arrays: List[List[int]], **kwargs) -> Dict[str, Any]: | CODE |
| LOW | test/test_api/test_openai_api.py | 502 | def test_stream_function_call(): | CODE |
| LOW | test/test_api/test_openai_api.py | 666 | def test_multiple_token_arrays(): | CODE |
| LOW | test/test_api/test_openai_api.py | 686 | def test_structured_generation(): | CODE |
| LOW⚡ | test/test_api/test_anthropic_extra_body.py | 434 | def test_url_pdf_document_block_is_rejected_explicitly(): | CODE |
| LOW⚡ | test/test_api/test_anthropic_extra_body.py | 442 | def test_tool_result_url_pdf_document_block_is_rejected_explicitly(): | CODE |
| LOW⚡ | test/test_api/test_anthropic_extra_body.py | 449 | def test_tool_result_pdf_document_block_becomes_text_not_pdf_image_url(monkeypatch): | CODE |
| LOW⚡ | test/test_api/test_anthropic_extra_body.py | 653 | def test_pdf_cache_does_not_store_empty_results(): | CODE |
| LOW⚡ | test/test_api/test_anthropic_extra_body.py | 663 | def test_anthropic_messages_impl_runs_translation_in_thread(monkeypatch): | CODE |
| LOW⚡ | test/test_api/test_anthropic_extra_body.py | 673 | async def fake_chat_completions_impl(_request, _raw_request): | CODE |
| LOW | test/test_api/test_anthropic_extra_body.py | 121 | def test_extra_body_chat_template_kwargs_forwarded(): | CODE |
| LOW | test/test_api/test_anthropic_extra_body.py | 131 | def test_native_thinking_parameter_is_forwarded(): | CODE |
| LOW | test/test_api/test_anthropic_extra_body.py | 142 | def test_replayed_thinking_is_preserved_through_request_validation(): | CODE |
| LOW | test/test_api/test_anthropic_extra_body.py | 164 | def test_extra_body_multiple_fields_forwarded(): | CODE |
| LOW | test/test_api/test_anthropic_extra_body.py | 179 | def test_top_level_openai_field_beats_extra_body_duplicate(): | CODE |
| 1195 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/benchmark/static_inference/profile_demo.py | 2 | CODE | |
| LOW | test/benchmark/static_inference/profile_demo.py | 3 | CODE | |
| LOW | test/benchmark/static_inference/test_vit.py | 1 | CODE | |
| LOW | test/benchmark/static_inference/test_vit.py | 2 | CODE | |
| LOW | test/benchmark/static_inference/test_vit.py | 4 | CODE | |
| LOW | test/benchmark/static_inference/test_vit.py | 38 | CODE | |
| LOW | test/benchmark/service/benchmark_client.py | 3 | CODE | |
| LOW | test/benchmark/service/benchmark_qps.py | 3 | CODE | |
| LOW | test/benchmark/service/benchmark_qps.py | 4 | CODE | |
| LOW | test/benchmark/service/benchmark_qps.py | 9 | CODE | |
| LOW | test/benchmark/service/benchmark_qps.py | 11 | CODE | |
| LOW | test/benchmark/service/benchmark_mcq.py | 18 | CODE | |
| LOW | test/benchmark/service/benchmark_mcq.py | 29 | CODE | |
| LOW | test/benchmark/service/benchmark_sharegpt.py | 28 | CODE | |
| LOW | test/cpu_cache_kernel/test_speed.py | 19 | CODE | |
| LOW | test/test_pd_selector/test_pd_master_multi_choice.py | 1 | CODE | |
| LOW | test/format_out/test_xgrammar_constraint.py | 1 | CODE | |
| LOW | test/format_out/qabot.py | 23 | CODE | |
| LOW | test/format_out/qabot.py | 24 | CODE | |
| LOW | test/test_api/test_rl_endpoints.py | 44 | CODE | |
| LOW | test/test_api/test_openai_api.py | 11 | CODE | |
| LOW | test/test_api/test_openai_api.py | 12 | CODE | |
| LOW | test/test_api/test_stream_fc.py | 24 | CODE | |
| LOW | test/test_api/test_stream_fc.py | 24 | CODE | |
| LOW | test/test_api/test_multimodal_api.py | 2 | CODE | |
| LOW | test/test_api/test_abort_request.py | 43 | CODE | |
| LOW | test/performance/audio_test.py | 1 | CODE | |
| LOW | test/performance/multimodal_test.py | 3 | CODE | |
| LOW | test/performance/multimodal_test.py | 4 | CODE | |
| LOW | test/performance/multimodal_test.py | 9 | CODE | |
| LOW | test/performance/multimodal_test.py | 11 | CODE | |
| LOW | test/kernel/moe_sum_reduce_tuning_bf16.py | 8 | CODE | |
| LOW | test/kernel/llama_gqa_diverse_decode_stage1_tuning.py | 2 | CODE | |
| LOW | test/kernel/deepseekv3_rotary_emb_tuning.py | 3 | CODE | |
| LOW | test/kernel/deepseekv3_rotary_emb_tuning.py | 9 | CODE | |
| LOW | test/kernel/deepseekv3_fp8_block_gemm_tuning.py | 5 | CODE | |
| LOW | test/kernel/llama_gqa_diverse_decode_stage2_tuning.py | 4 | CODE | |
| LOW | test/kernel/llama_gqa_decode_vsm_tuning.py | 2 | CODE | |
| LOW | test/acc/test_vlm_models.py | 1 | CODE | |
| LOW | test/acc/test_vlm_models.py | 2 | CODE | |
| LOW | test/acc/test_vlm_models.py | 3 | CODE | |
| LOW | test/acc/test_vlm_models.py | 5 | CODE | |
| LOW | test/acc/test_vlm_models.py | 7 | CODE | |
| LOW | test/acc/test_vlm_models.py | 8 | CODE | |
| LOW | test/acc/test_vlm_models.py | 9 | CODE | |
| LOW | test/acc/bfcl/eval_bfcl.py | 33 | CODE | |
| LOW | test/acc/bfcl/eval_bfcl.py | 36 | CODE | |
| LOW | unit_tests/server/core/objs/test_shm_array.py | 5 | CODE | |
| LOW | unit_tests/server/core/objs/test_atomic_array_lock.py | 4 | CODE | |
| LOW | unit_tests/server/core/objs/test_req.py | 3 | CODE | |
| LOW | unit_tests/server/core/objs/test_req.py | 3 | CODE | |
| LOW | unit_tests/utils/test_custom_kernel_utils.py | 2 | CODE | |
| LOW | unit_tests/models/qwen3-vl/test_deepstack_emb.py | 2 | CODE | |
| LOW | unit_tests/models/qwen3-vl/test_deepstack_emb.py | 3 | CODE | |
| LOW | unit_tests/models/qwen3-vl/test_deepstack_emb.py | 4 | CODE | |
| LOW | unit_tests/models/deepseek2/test_rope_repeat.py | 2 | CODE | |
| LOW | unit_tests/models/qwen2_vl/test_rotary_pos_emb.py | 1 | CODE | |
| LOW | unit_tests/common/kv_trans_kernel/test_nixl_kv_trans.py | 1 | CODE | |
| LOW | unit_tests/common/fused_moe/test_grouped_topk.py | 4 | CODE | |
| LOW | …tests/common/fused_moe/test_grouped_fused_moe_speed.py | 4 | CODE | |
| 784 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 21 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 24 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 39 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 41 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 63 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 65 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 79 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 81 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 153 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 155 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 178 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 180 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 227 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/cpu_cache_kernel/test_speed.py | 229 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | test/test_api/test_stream_fc.py | 28 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM | test/test_api/test_stream_fc.py | 30 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | test/test_api/test_stream_fc.py | 86 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | test/test_api/test_stream_fc.py | 88 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM | test/test_api/test_stream_fc.py | 160 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM | test/test_api/test_stream_fc.py | 162 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM | test/test_api/test_stream_fc.py | 594 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM | test/test_api/test_stream_fc.py | 596 | # ────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | …del/triton_kernel/linear_att/test_causal_conv1d_mtp.py | 510 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | …del/triton_kernel/linear_att/test_causal_conv1d_mtp.py | 512 | # ============================================================================= | COMMENT |
| MEDIUM | lightllm/server/io_struct.py | 24 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightllm/server/io_struct.py | 26 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightllm/server/io_struct.py | 40 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightllm/server/io_struct.py | 42 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightllm/server/api_anthropic.py | 86 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightllm/server/api_anthropic.py | 88 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightllm/server/api_anthropic.py | 867 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightllm/server/api_anthropic.py | 869 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightllm/server/api_anthropic.py | 1255 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightllm/server/api_anthropic.py | 1257 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightllm/server/api_anthropic.py | 697 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightllm/server/api_anthropic.py | 699 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightllm/server/api_anthropic.py | 1208 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | lightllm/server/api_anthropic.py | 1210 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | lightllm/server/router/multinode_tp_helper.py | 22 | # ================================================================== | COMMENT |
| MEDIUM⚡ | lightllm/server/router/multinode_tp_helper.py | 24 | # ================================================================== | COMMENT |
| MEDIUM⚡ | lightllm/server/router/multinode_tp_helper.py | 58 | # ================================================================== | COMMENT |
| MEDIUM⚡ | lightllm/server/router/multinode_tp_helper.py | 60 | # ================================================================== | COMMENT |
| MEDIUM⚡ | lightllm/server/router/multinode_tp_helper.py | 124 | # ================================================================== | COMMENT |
| MEDIUM⚡ | lightllm/server/router/multinode_tp_helper.py | 126 | # ================================================================== | COMMENT |
| MEDIUM⚡ | lightllm/server/router/multinode_tp_helper.py | 147 | # ================================================================== | COMMENT |
| MEDIUM⚡ | lightllm/server/router/multinode_tp_helper.py | 149 | # ================================================================== | COMMENT |
| MEDIUM⚡ | …er/model_infer/mode_backend/pd/base_kv_move_manager.py | 56 | # ================================================================================== | COMMENT |
| MEDIUM⚡ | …er/model_infer/mode_backend/pd/base_kv_move_manager.py | 58 | # ================================================================================== | COMMENT |
| MEDIUM⚡ | …er/model_infer/mode_backend/pd/base_kv_move_manager.py | 63 | # ================================================================================== | COMMENT |
| MEDIUM⚡ | …er/model_infer/mode_backend/pd/base_kv_move_manager.py | 65 | # ================================================================================== | COMMENT |
| MEDIUM⚡ | …er/model_infer/mode_backend/pd/base_kv_move_manager.py | 94 | # ================================================================================== | COMMENT |
| MEDIUM⚡ | …er/model_infer/mode_backend/pd/base_kv_move_manager.py | 96 | # ================================================================================== | COMMENT |
| MEDIUM⚡ | …er/model_infer/mode_backend/pd/base_kv_move_manager.py | 103 | # ================================================================================== | COMMENT |
| MEDIUM⚡ | …er/model_infer/mode_backend/pd/base_kv_move_manager.py | 105 | # ================================================================================== | COMMENT |
| MEDIUM | …ackend/pd/prefill_node_impl/prefill_kv_move_manager.py | 54 | # ================================================================================== | COMMENT |
| MEDIUM | …ackend/pd/prefill_node_impl/prefill_kv_move_manager.py | 56 | # ================================================================================== | COMMENT |
| MEDIUM | …_backend/pd/decode_node_impl/decode_kv_move_manager.py | 74 | # ================================================================================== | COMMENT |
| MEDIUM | …_backend/pd/decode_node_impl/decode_kv_move_manager.py | 76 | # ================================================================================== | COMMENT |
| MEDIUM | …de_backend/pd/decode_node_impl/decode_trans_process.py | 56 | # ------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …de_backend/pd/decode_node_impl/decode_trans_process.py | 74 | # ------------------------------------------------------------------------- | COMMENT |
| 18 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/compare_with_previous_commit.py | 59 | except Exception: | CODE |
| LOW | test/compare_with_previous_commit.py | 80 | except Exception as e: | CODE |
| LOW | test/benchmark/bench_agents.py | 150 | except Exception as e: # keep the run alive; record failure count only | CODE |
| LOW | test/benchmark/static_inference/static_benchmark.py | 1327 | except Exception: | CODE |
| LOW | test/benchmark/static_inference/static_benchmark.py | 1333 | except Exception: | CODE |
| LOW | test/benchmark/service/benchmark_multiturn.py | 124 | except Exception as exc: | CODE |
| LOW | test/benchmark/service/benchmark_multiturn.py | 306 | except Exception: | CODE |
| LOW | test/benchmark/service/benchmark_multiturn.py | 347 | except Exception as e: | CODE |
| LOW⚡ | test/benchmark/service/benchmark_qps.py | 155 | except Exception: | CODE |
| LOW⚡ | test/benchmark/service/benchmark_qps.py | 161 | except Exception as e: | CODE |
| LOW⚡ | test/benchmark/service/benchmark_qps.py | 165 | except Exception as e: | CODE |
| LOW⚡ | test/benchmark/service/benchmark_qps.py | 203 | except Exception: | CODE |
| LOW⚡ | test/benchmark/service/benchmark_qps.py | 209 | except Exception as e: | CODE |
| LOW⚡ | test/benchmark/service/benchmark_qps.py | 213 | except Exception as e: | CODE |
| LOW | test/benchmark/service/benchmark_qps.py | 284 | except Exception as e: | CODE |
| LOW | test/benchmark/service/benchmark_qps.py | 317 | except Exception as e: | CODE |
| MEDIUM | test/benchmark/service/benchmark_qps.py | 122 | def async_post_stream_openai(url, prompt, max_new_tokens, session): | CODE |
| MEDIUM | test/benchmark/service/benchmark_qps.py | 170 | def async_post_stream_lightllm(url, prompt, max_new_tokens, session): | CODE |
| LOW | test/benchmark/service/benchmark_prompt_cache.py | 72 | except Exception as e: | CODE |
| LOW | test/benchmark/service/benchmark_sharegpt.py | 129 | except Exception: | CODE |
| LOW | test/format_out/gomoku_game.py | 158 | except Exception as e: | CODE |
| LOW | test/format_out/gomoku_game.py | 184 | except Exception as e: | CODE |
| LOW | test/test_api/test_rl_endpoints.py | 112 | except Exception: | CODE |
| LOW | test/test_api/test_abort_chaos.py | 53 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 373 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 389 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 401 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 419 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 498 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 555 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 572 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 593 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 616 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 638 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 662 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 682 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 748 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 767 | except Exception as e: | CODE |
| LOW | test/test_api/test_openai_api.py | 793 | except Exception as e: | CODE |
| LOW | test/test_api/test_stream_fc.py | 644 | except Exception as e: | CODE |
| LOW | test/test_api/test_abort_request.py | 123 | except Exception: | CODE |
| LOW | test/test_api/test_abort_request.py | 145 | except Exception as e: | CODE |
| LOW | test/test_api/test_abort_request.py | 150 | except Exception as e: | CODE |
| LOW | test/test_api/test_abort_request.py | 408 | except Exception as e: | CODE |
| LOW | test/performance/audio_test.py | 226 | except Exception as e: | CODE |
| LOW | test/performance/audio_test.py | 282 | except Exception as e: | CODE |
| LOW | test/performance/multimodal_test.py | 164 | except Exception as e: | CODE |
| LOW | test/performance/multimodal_test.py | 209 | except Exception as e: | CODE |
| LOW | test/performance/multimodal_test.py | 294 | except Exception as e: | CODE |
| LOW | test/kernel/moe_sum_reduce_tuning_bf16.py | 95 | except Exception as ex: | CODE |
| LOW | test/kernel/llama_gqa_diverse_decode_stage1_tuning.py | 168 | except Exception as ex: | CODE |
| LOW | test/kernel/deepseekv3_rotary_emb_tuning.py | 104 | except Exception as ex: | CODE |
| LOW | test/kernel/deepseekv2_gqa_decode_tuning.py | 159 | except Exception as ex: | CODE |
| LOW | test/kernel/deepseekv3_fp8_block_gemm_tuning.py | 101 | except Exception as ex: | CODE |
| LOW | test/kernel/llama_gqa_diverse_decode_stage2_tuning.py | 137 | except Exception as ex: | CODE |
| LOW | test/kernel/llama_gqa_decode_vsm_tuning.py | 134 | except Exception as ex: | CODE |
| LOW | test/acc/bfcl/eval_bfcl.py | 114 | except Exception as e: | CODE |
| MEDIUM | test/acc/bfcl/eval_bfcl.py | 115 | print(f"Error downloading {filename}: {e}") | CODE |
| LOW | test/acc/bfcl/eval_bfcl.py | 462 | except Exception as e: | CODE |
| LOW | test/acc/bfcl/eval_bfcl.py | 555 | except Exception as e: | CODE |
| 174 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/benchmark/bench_agents.py | 94 | CODE | |
| LOW | test/benchmark/static_inference/static_benchmark.py | 1181 | CODE | |
| LOW | test/benchmark/service/benchmark_multiturn.py | 233 | CODE | |
| LOW | test/benchmark/service/benchmark_multiturn.py | 536 | CODE | |
| LOW | test/benchmark/service/benchmark_multiturn.py | 691 | CODE | |
| LOW | test/benchmark/service/benchmark_qps.py | 122 | CODE | |
| LOW | test/benchmark/service/benchmark_qps.py | 170 | CODE | |
| LOW | test/benchmark/service/benchmark_qps.py | 250 | CODE | |
| LOW | test/benchmark/service/benchmark_prompt_cache.py | 37 | CODE | |
| LOW | test/benchmark/kernel/benchmark_fused_moe_triton.py | 12 | CODE | |
| LOW | test/format_out/gomoku_game.py | 49 | CODE | |
| LOW | test/format_out/qabot.py | 4 | CODE | |
| LOW | test/test_api/test_rl_endpoints.py | 170 | CODE | |
| LOW | test/test_api/test_openai_api.py | 406 | CODE | |
| LOW | test/test_api/test_openai_api.py | 502 | CODE | |
| LOW | test/test_api/test_openai_api.py | 752 | CODE | |
| LOW | test/test_api/test_openai_api.py | 41 | CODE | |
| LOW | test/test_api/test_openai_api.py | 99 | CODE | |
| LOW | test/test_api/test_openai_api.py | 148 | CODE | |
| LOW | test/test_api/test_anthropic_extra_body.py | 785 | CODE | |
| LOW | test/test_api/test_stream_fc.py | 91 | CODE | |
| LOW | test/test_api/test_stream_fc.py | 435 | CODE | |
| LOW | test/test_api/test_abort_request.py | 84 | CODE | |
| LOW | test/performance/audio_test.py | 180 | CODE | |
| LOW | test/performance/audio_test.py | 193 | CODE | |
| LOW | test/performance/audio_test.py | 239 | CODE | |
| LOW | test/performance/multimodal_test.py | 245 | CODE | |
| LOW | test/kernel/moe_sum_reduce_tuning_bf16.py | 127 | CODE | |
| LOW | test/kernel/llama_gqa_diverse_decode_stage1_tuning.py | 181 | CODE | |
| LOW | test/kernel/llama_gqa_diverse_decode_stage1_tuning.py | 214 | CODE | |
| LOW | test/kernel/deepseekv3_rotary_emb_tuning.py | 130 | CODE | |
| LOW | test/kernel/deepseekv2_gqa_decode_tuning.py | 167 | CODE | |
| LOW | test/kernel/deepseekv2_gqa_decode_tuning.py | 206 | CODE | |
| LOW | test/kernel/deepseekv3_fp8_block_gemm_tuning.py | 137 | CODE | |
| LOW | test/kernel/llama_gqa_diverse_decode_stage2_tuning.py | 147 | CODE | |
| LOW | test/kernel/llama_gqa_diverse_decode_stage2_tuning.py | 179 | CODE | |
| LOW | test/kernel/llama_gqa_decode_vsm_tuning.py | 147 | CODE | |
| LOW | test/kernel/llama_gqa_decode_vsm_tuning.py | 187 | CODE | |
| LOW | test/acc/bfcl/eval_bfcl.py | 119 | CODE | |
| LOW | test/acc/bfcl/eval_bfcl.py | 142 | CODE | |
| LOW | test/acc/bfcl/eval_bfcl.py | 279 | CODE | |
| LOW | test/acc/bfcl/eval_bfcl.py | 306 | CODE | |
| LOW | test/acc/bfcl/eval_bfcl.py | 382 | CODE | |
| LOW | test/acc/bfcl/eval_bfcl.py | 466 | CODE | |
| LOW | unit_tests/common/kv_trans_kernel/test_nixl_kv_trans.py | 30 | CODE | |
| LOW | unit_tests/common/fused_moe/test_deepep.py | 141 | CODE | |
| LOW | …del/triton_kernel/linear_att/test_causal_conv1d_mtp.py | 9 | CODE | |
| LOW | format_out/impl.py | 34 | CODE | |
| LOW | format_out/grammer/dpda.py | 406 | CODE | |
| LOW | format_out/grammer/dpda.py | 501 | CODE | |
| LOW | format_out/grammer/core.py | 320 | CODE | |
| LOW | format_out/grammer/core.py | 342 | CODE | |
| LOW | format_out/grammer/core.py | 377 | CODE | |
| LOW | format_out/grammer/core.py | 228 | CODE | |
| LOW | format_out/grammer/core.py | 237 | CODE | |
| LOW | format_out/grammer/core.py | 272 | CODE | |
| LOW | lightllm/server/reasoning_parser.py | 61 | CODE | |
| LOW | lightllm/server/reasoning_parser.py | 152 | CODE | |
| LOW | lightllm/server/reasoning_parser.py | 267 | CODE | |
| LOW | lightllm/server/reasoning_parser.py | 435 | CODE | |
| 136 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | lightllm/server/visualserver/manager.py | 54 | self.cache_client._channel.stream.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) | CODE |
| CRITICAL | lightllm/server/visualserver/model_infer/model_rpc.py | 121 | self.cache_client._channel.stream.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) | CODE |
| CRITICAL | lightllm/server/httpserver/manager.py | 89 | self.cache_client._channel.stream.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) | CODE |
| CRITICAL | lightllm/server/httpserver/manager.py | 872 | self.router_profiler_client._channel.stream.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) | CODE |
| CRITICAL | lightllm/server/audioserver/manager.py | 48 | self.cache_client._channel.stream.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) | CODE |
| CRITICAL | lightllm/server/audioserver/model_infer/model_rpc.py | 57 | 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.py | 113 | self.backend.model.mem_manager.operator.copy_kv_from_other_dp_ranks( | CODE |
| CRITICAL | …on/basemodel/triton_kernel/linear_att/fla/ops/utils.py | 151 | triton.runtime.driver.active.utils.get_device_properties(i)["max_shared_mem"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …t_tests/server/core/objs/test_out_token_circlequeue.py | 19 | queue.push("token1", 0, False, 1) | CODE |
| HIGH⚡ | …t_tests/server/core/objs/test_out_token_circlequeue.py | 37 | queue.push("token1", 0, False, 1) | CODE |
| HIGH⚡ | …t_tests/server/core/objs/test_out_token_circlequeue.py | 38 | queue.push("token2", 1, False, 2) | CODE |
| HIGH⚡ | …t_tests/server/core/objs/test_out_token_circlequeue.py | 39 | queue.push("token3", 2, False, 3) | CODE |
| HIGH⚡ | …t_tests/server/core/objs/test_out_token_circlequeue.py | 73 | queue.push(f"token{i}", i, False, 1) | CODE |
| HIGH⚡ | …t_tests/server/core/objs/test_out_token_circlequeue.py | 79 | queue.push("token_overflow", LIGHTLLM_OUT_TOKEN_QUEUE_SIZE, False, 1) | CODE |
| HIGH | …t_tests/server/core/objs/test_out_token_circlequeue.py | 95 | queue.push(f"token{i}", i, False, i) | CODE |
| HIGH | …t_tests/server/core/objs/test_out_token_circlequeue.py | 107 | queue.push("token1", 0, False, 1) | CODE |
| HIGH | …t_tests/server/core/objs/test_out_token_circlequeue.py | 108 | queue.push("token2", 1, False, 2) | CODE |
| HIGH | lightllm/server/detokenization/manager.py | 122 | 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.py | 39 | # Some E-series checkpoints leave num_global_key_value_heads = null; | COMMENT |
| HIGH | …odels/gemma4/layer_weights/transformer_layer_weight.py | 27 | # Some E-series checkpoints leave num_global_key_value_heads = null; | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | generate_requirements_musa.sh | 35 | # Create the output file with a header comment | COMMENT |
| MEDIUM | test/acc/bfcl/eval_bfcl.py | 164 | # Create a mapping from id to answer | COMMENT |
| MEDIUM | unit_tests/server/core/objs/test_shm_array.py | 27 | # Create a new instance to link the existing shm | COMMENT |
| MEDIUM | unit_tests/server/core/objs/test_shm_array.py | 37 | # Create a new shm with a different size | COMMENT |
| MEDIUM | unit_tests/server/core/objs/test_atomic_array_lock.py | 11 | # Create an instance of AtomicShmArrayLock | COMMENT |
| MEDIUM | lightllm/distributed/pynccl_wrapper.py | 22 | # This file is a pure Python wrapper for the NCCL library. | COMMENT |
| MEDIUM | …mon/basemodel/triton_kernel/linear_att/fla/__init__.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | …n/basemodel/triton_kernel/linear_att/fla/ops/l2norm.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | …semodel/triton_kernel/linear_att/fla/ops/solve_tril.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | …on/basemodel/triton_kernel/linear_att/fla/ops/index.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | …basemodel/triton_kernel/linear_att/fla/ops/__init__.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | …on/basemodel/triton_kernel/linear_att/fla/ops/chunk.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | …ommon/basemodel/triton_kernel/linear_att/fla/ops/op.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | …on/basemodel/triton_kernel/linear_att/fla/ops/utils.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | …/basemodel/triton_kernel/linear_att/fla/ops/chunk_o.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | …/basemodel/triton_kernel/linear_att/fla/ops/wy_fast.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | …n/basemodel/triton_kernel/linear_att/fla/ops/cumsum.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | …iton_kernel/linear_att/fla/ops/chunk_scaled_dot_kkt.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | …odel/triton_kernel/linear_att/fla/ops/chunk_delta_h.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | …el/triton_kernel/linear_att/fla/ops/fused_recurrent.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docker/scripts/build.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | test/benchmark/bench_agents.py | 1 | # Example: | COMMENT |
| LOW | test/benchmark/service/benchmark_mcq.py | 1 | # Adapted from benchmarks/benchmark_serving.py | COMMENT |
| LOW | test/benchmark/service/benchmark_sharegpt.py | 1 | # Adapted from benchmarks/benchmark_serving.py | COMMENT |
| LOW | test/cpu_cache_kernel/test_speed.py | 121 | ) | COMMENT |
| LOW | test/performance/multimodal_test.py | 541 | # import argparse | COMMENT |
| LOW | test/performance/multimodal_test.py | 561 | # os.environ["PYTHONHASHSEED"] = str(seed) | COMMENT |
| LOW | test/performance/multimodal_test.py | 581 | COMMENT | |
| LOW | test/performance/multimodal_test.py | 601 | # def get_prompts_from_json(json_path, tokenizer, output_len, range_ratio): | COMMENT |
| LOW | test/performance/multimodal_test.py | 621 | # # -------------------- 请求函数 -------------------- | COMMENT |
| LOW | test/performance/multimodal_test.py | 641 | # start = time.time() | COMMENT |
| LOW | test/performance/multimodal_test.py | 661 | COMMENT | |
| LOW | test/performance/multimodal_test.py | 681 | # } | COMMENT |
| LOW | test/performance/multimodal_test.py | 701 | # # -------------------- 并发控制 -------------------- | COMMENT |
| LOW | test/performance/multimodal_test.py | 721 | # end = time.time() | COMMENT |
| LOW | test/performance/multimodal_test.py | 741 | # args = parser.parse_args() | COMMENT |
| LOW | test/performance/multimodal_test.py | 761 | # run_fixed_concurrency_benchmark(async_task, args.url, prompts, max_new_tokens, args.num_concurrent) | COMMENT |
| LOW | test/performance/multimodal_test.py | 781 | # final_output_lens.append(len(result)) | COMMENT |
| LOW | test/performance/multimodal_test.py | 801 | # "Total Throughput": (sum(input_lens) + sum(final_output_lens)) / (end_time - start_time), | COMMENT |
| LOW | test/performance/multimodal_test.py | 821 | # with open(args.dump_file, "w") as f: | COMMENT |
| LOW | test/start_scripts/draft.sh | 21 | --enable_cpu_cache --cpu_cache_storage_size 66 --cpu_cache_token_page_size 128 | COMMENT |
| LOW | test/start_scripts/multi_pd_master/pd_prefill.sh | 21 | # if you want to enable microbatch overlap, you can uncomment the following lines | COMMENT |
| LOW | test/acc/test_deepseekr1_mtp_ep.sh | 21 | # 不要写额外的脚本来启动服务,就是单独一个一个的按照上面的描述启动服务,然后再执行评测脚本,然后注意等待服务启动完成,可以20s检测一次其控制台输出,看是否启动完成,还是启动报错。 | COMMENT |
| LOW | test/acc/test_qwen2.5_fp8kv_sph.sh | 1 | # 先清理掉占用显卡和端口的进程 | COMMENT |
| LOW | test/acc/test_pd.sh | 61 | --tasks gsm8k --batch_size 1 --confirm_run_unsafe_code --limit 1 | COMMENT |
| LOW | test/acc/bfcl/run_bfcl.sh | 1 | #!/bin/bash | COMMENT |
| LOW | lightllm/distributed/pynccl_wrapper.py | 1 | # Adapted from | COMMENT |
| LOW | lightllm/distributed/pynccl_wrapper.py | 21 | COMMENT | |
| LOW | lightllm/distributed/pynccl_wrapper.py | 181 | Function( | COMMENT |
| LOW | lightllm/distributed/communication_op.py | 1 | # Adapted from | COMMENT |
| LOW | lightllm/distributed/pynccl.py | 1 | # Adapted from | COMMENT |
| LOW | lightllm/server/api_http.py | 1 | # Adapted from vllm/entrypoints/api_server.py | COMMENT |
| LOW | lightllm/server/reasoning_parser.py | 1 | # Adaptive from SGlang [https://github.com/sgl-project/sglang/blob/main/python/sglang/srt/parser/reasoning_parser.py] | COMMENT |
| LOW | lightllm/server/function_call_parser.py | 1 | # Adaptive from SGlang [https://github.com/sgl-project/sglang/blob/main/python/sglang/srt/function_call_parser.py] | COMMENT |
| LOW | lightllm/server/tokenizer.py | 1 | # Adapted from vllm/transformers_utils/tokenizer.py | COMMENT |
| LOW | lightllm/server/visualserver/model_infer/model_rpc.py | 41 | COMMENT | |
| LOW | …de_backend/pd/decode_node_impl/decode_trans_process.py | 61 | # 上排队,而推理在另一进程的 stream 上执行,彼此无法 cudaStreamWaitEvent | COMMENT |
| LOW | lightllm/utils/dist_utils.py | 1 | import torch.distributed as dist | COMMENT |
| LOW | lightllm/utils/dist_utils.py | 21 | # +------+--------------+----------------+-------------+--------------+------------------+ | COMMENT |
| LOW | lightllm/utils/dist_utils.py | 61 | # "device_id": device_id, | COMMENT |
| LOW | lightllm/utils/rl/bucketed_weight_transfer.py | 1 | # Copyright 2025 Bytedance Ltd. and/or its affiliates | COMMENT |
| LOW | …llm/models/qwen3_omni_moe_thinker/qwen3_omni_visual.py | 1 | # coding=utf-8 | COMMENT |
| LOW | lightllm/models/qwen2_vl/qwen2_visual.py | 1 | # coding=utf-8 | COMMENT |
| LOW | lightllm/models/whisper/modeling_whisper.py | 1 | # Copyright 2025 The HuggingFace Inc. team. | COMMENT |
| LOW | lightllm/models/qwen3_vl/qwen3_visual.py | 1 | # coding=utf-8 | COMMENT |
| LOW | lightllm/common/cuda_wrapper.py | 1 | # Adapted from | COMMENT |
| LOW | lightllm/common/basemodel/batch_objs.py | 21 | b_mtp_index: torch.Tensor = None | COMMENT |
| LOW | …/common/basemodel/triton_kernel/flashinfer_mla_plan.py | 1 | import torch | COMMENT |
| LOW | …emodel/triton_kernel/fused_moe/grouped_fused_moe_ep.py | 261 | COMMENT | |
| LOW | …basemodel/triton_kernel/fused_moe/grouped_fused_moe.py | 1 | """Fused MoE kernel.""" | COMMENT |
| LOW | …ommon/basemodel/triton_kernel/fused_moe/topk_select.py | 1 | # Adapted from | COMMENT |
| LOW | …/triton_kernel/alibi_att/token_flashattention_nopad.py | 121 | return | COMMENT |
| LOW | …/triton_kernel/alibi_att/token_flashattention_nopad.py | 141 | # o, | COMMENT |
| LOW | …htllm/common/basemodel/triton_kernel/norm/layernorm.py | 61 | # # print("BLOCK_SIZE:", BLOCK_SIZE) | COMMENT |
| LOW | …asemodel/triton_kernel/linear_att/causal_conv1d_mtp.py | 1 | # Vendored from vLLM v0.14.1 | COMMENT |
| LOW | …asemodel/triton_kernel/linear_att/causal_conv1d_mtp.py | 81 | COMMENT | |
| LOW | …emodel/triton_kernel/linear_att/mtp_fused_recurrent.py | 1 | # SPDX-License-Identifier: Apache-2.0 | COMMENT |
| LOW | …mon/basemodel/triton_kernel/linear_att/fla/__init__.py | 1 | # SPDX-License-Identifier: Apache-2.0 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | generate_requirements_musa.sh | 55 | # Check if this is a CUDA package to skip | COMMENT |
| LOW | generate_requirements_musa.sh | 69 | # Check if this is a torch-related package (remove version pin) | COMMENT |
| LOW | test/test_api/test_gsmk.py | 58 | # Check if the cache file already exists | COMMENT |
| LOW | test/test_api/test_gsmk.py | 233 | # Print results | COMMENT |
| LOW | test/test_api/test_anthropic_extra_body.py | 908 | # Set logger to DEBUG so caplog can capture it | COMMENT |
| LOW | test/acc/test_gsmk.py | 42 | # Check if the cache file already exists | COMMENT |
| LOW | test/acc/test_gsmk.py | 215 | # Print results | COMMENT |
| LOW | test/acc/bfcl/run_bfcl.sh | 23 | # Check if server is running | COMMENT |
| LOW | test/acc/bfcl/eval_bfcl.py | 409 | # Check if it's already in standard format {"name": ..., "arguments": ...} | COMMENT |
| LOW | lightllm/server/reasoning_parser.py | 164 | # Check if this might be incomplete | COMMENT |
| LOW | lightllm/server/reasoning_parser.py | 171 | # Check if this might be commentary filler between blocks | COMMENT |
| LOW | lightllm/server/reasoning_parser.py | 201 | # Check if this might be commentary filler between blocks | COMMENT |
| LOW | lightllm/server/reasoning_parser.py | 379 | # Check if we have CALL -> TEXT("commentary") -> CHANNEL pattern | COMMENT |
| LOW | lightllm/server/reasoning_parser.py | 524 | # Check if we should start filtering commentary (after <|call|> token or tool_call event) | COMMENT |
| LOW | lightllm/server/reasoning_parser.py | 535 | # Check if we're in a commentary filtering state | COMMENT |
| LOW | lightllm/server/api_openai.py | 816 | # Check if it's a list of integers (token IDs) | COMMENT |
| LOW⚡ | lightllm/server/function_call_parser.py | 729 | # Check if we have a tool call (either the start token or individual tool call) | COMMENT |
| LOW⚡ | lightllm/server/function_call_parser.py | 911 | # Check if we have a tool call (either the start token or individual tool call) | COMMENT |
| LOW⚡ | lightllm/server/function_call_parser.py | 1089 | # Check if we have a tool call (either the start token or individual tool call) | COMMENT |
| LOW⚡ | lightllm/server/function_call_parser.py | 1335 | # Check if we have a tool call starting | COMMENT |
| LOW | lightllm/server/function_call_parser.py | 447 | # Check if buffer contains complete end token (without leading newline) | COMMENT |
| LOW | lightllm/server/function_call_parser.py | 454 | # Check if buffer might contain partial end token at the end | COMMENT |
| LOW | lightllm/server/function_call_parser.py | 1357 | # Check if we have a complete tool call | COMMENT |
| LOW | lightllm/server/function_call_parser.py | 1407 | # Check if function name is valid | COMMENT |
| LOW | lightllm/server/function_call_parser.py | 1563 | # Check if we're inside a function_calls block or starting one | COMMENT |
| LOW | lightllm/server/function_call_parser.py | 1581 | # Check if function_calls block has ended | COMMENT |
| LOW | lightllm/utils/device_utils.py | 148 | # Check if the output contains 'NVLink' | COMMENT |
| LOW | lightllm/utils/device_utils.py | 163 | # Check if the output contains 'MTLink' | COMMENT |
| LOW | …/meta_weights/fused_moe/gpt_oss_fused_moe_weight_tp.py | 199 | # Check if blocks and scales are on CPU, and move to GPU if so | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/CN/source/conf.py | 22 | logger = logging.getLogger(__name__) | CODE |
| LOW | docs/EN/source/conf.py | 22 | logger = logging.getLogger(__name__) | CODE |
| LOW | lightllm/distributed/pynccl_wrapper.py | 53 | logger = logging.getLogger(__name__) | CODE |
| LOW | lightllm/distributed/pynccl_wrapper.py | 394 | __all__ = [ | CODE |
| LOW | lightllm/distributed/pynccl.py | 45 | logger = logging.getLogger(__name__) | CODE |
| LOW | lightllm/server/reasoning_parser.py | 954 | def update_reasoning_token_count(self, token_id: int) -> None: | CODE |
| LOW | lightllm/server/function_call_parser.py | 32 | logger = logging.getLogger(__name__) | CODE |
| LOW⚡ | lightllm/server/embed_cache/impl/naive_memory_cache.py | 251 | def set_items_data(self, ids: list[int]) -> None: | CODE |
| LOW⚡ | lightllm/server/embed_cache/impl/naive_memory_cache.py | 258 | def set_items_embed(self, ids: list[int]) -> None: | CODE |
| LOW | …er/httpserver_for_pd_master/pd_selector/cache_aware.py | 71 | def update_config(self, config: CacheAwareConfig) -> None: | CODE |
| LOW | …/server/router/model_infer/mtp_speculative/__init__.py | 5 | __all__ = ["DPOverlapSpecEngine", "SpecEngine"] | CODE |
| LOW | …outer/model_infer/mtp_speculative/dp_overlap_engine.py | 186 | __all__ = ["DPOverlapSpecEngine"] | CODE |
| LOW | …llm/server/router/model_infer/mtp_speculative/utils.py | 133 | __all__ = [ | CODE |
| LOW | …uter/model_infer/mtp_speculative/proposers/__init__.py | 43 | __all__ = [ | CODE |
| LOW | …router/model_infer/mtp_speculative/planner/__init__.py | 7 | __all__ = [ | CODE |
| LOW | …r/router/model_infer/mtp_speculative/planner/dspark.py | 86 | def _update_confidence_probs(self, confidence_probs, req_num: int) -> None: | CODE |
| LOW | …infer/mtp_speculative/dp_overlap_proposers/__init__.py | 48 | __all__ = ["build_dp_overlap_spec_proposer"] | CODE |
| LOW | lightllm/utils/infer_utils.py | 85 | def set_random_seed(seed: int) -> None: | CODE |
| LOW | lightllm/models/qwen3_dspark/__init__.py | 3 | __all__ = ["Qwen3DSparkModel"] | CODE |
| LOW | lightllm/models/qwen3_dspark/layer_weights/__init__.py | 5 | __all__ = ["Qwen3DSparkPreAndPostLayerWeight"] | CODE |
| LOW | lightllm/models/glm4_moe_lite_mtp/__init__.py | 3 | __all__ = ["Glm4MoeLiteMTPModel"] | CODE |
| LOW | …llm/models/glm4_moe_lite_mtp/layer_weights/__init__.py | 5 | __all__ = ["Glm4MoeLiteMTPPreAndPostLayerWeight"] | CODE |
| LOW | lightllm/models/qwen3_dflash/__init__.py | 3 | __all__ = ["Qwen3DFlashModel"] | CODE |
| LOW | lightllm/models/qwen3_dflash/layer_weights/__init__.py | 8 | __all__ = [ | CODE |
| LOW | lightllm/models/glm4_moe_lite/__init__.py | 4 | __all__ = ["Glm4MoeLiteTpPartModel", "Glm4MoeLiteInferStateInfo"] | CODE |
| LOW | lightllm/models/glm4_moe_lite/layer_infer/__init__.py | 3 | __all__ = ["Glm4MoeLiteTransformerLayerInfer"] | CODE |
| LOW | lightllm/models/glm4_moe_lite/layer_weights/__init__.py | 3 | __all__ = ["Glm4MoeLiteTransformerLayerWeight"] | CODE |
| LOW | lightllm/models/qwen3_5_dflash/__init__.py | 3 | __all__ = ["Qwen3_5DFlashModel"] | CODE |
| LOW | …ghtllm/models/qwen3_5_dflash/layer_weights/__init__.py | 5 | __all__ = ["Qwen35DFlashPreAndPostLayerWeight"] | CODE |
| LOW | lightllm/models/qwen2_vl/qwen2_visual.py | 111 | def update_freqs_cache(self, seqlen: int) -> None: | CODE |
| LOW | lightllm/models/qwen3_5_dspark/__init__.py | 3 | __all__ = ["Qwen3_5DSparkModel"] | CODE |
| LOW | lightllm/models/qwen3_5/__init__.py | 13 | __all__ = [ | CODE |
| LOW | lightllm/models/qwen3next/__init__.py | 3 | __all__ = ["Qwen3NextTpPartModel"] | CODE |
| LOW | lightllm/models/qwen3_5_moe_mtp/__init__.py | 3 | __all__ = ["Qwen3_5MoeMTPModel"] | CODE |
| LOW | …htllm/models/qwen3_5_moe_mtp/layer_weights/__init__.py | 5 | __all__ = ["Qwen3_5MoeMTPTransformerLayerWeight"] | CODE |
| LOW | lightllm/common/basemodel/__init__.py | 15 | __all__ = [ | CODE |
| LOW | lightllm/common/basemodel/attention/linear/__init__.py | 9 | __all__ = [ | CODE |
| LOW | lightllm/common/basemodel/attention/nsa/__init__.py | 14 | __all__ = [ | CODE |
| LOW | …/common/basemodel/triton_kernel/linear_att/__init__.py | 10 | __all__ = [ | CODE |
| LOW | …basemodel/triton_kernel/linear_att/fla/ops/__init__.py | 12 | __all__ = [ | CODE |
| LOW | …on/basemodel/triton_kernel/linear_att/fla/ops/utils.py | 22 | logger = logging.getLogger(__name__) | CODE |
| LOW | …iton_kernel/att/decode_att/gqa/mtp_diverse/__init__.py | 10 | __all__ = [ | CODE |
| LOW | lightllm/common/kv_cache_mem_manager/__init__.py | 12 | __all__ = [ | CODE |
| LOW | lightllm/common/cpu_cache/__init__.py | 3 | __all__ = ["CpuCacheCreator", "CpuCacheTensorSpec"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | test/benchmark/service/benchmark_client.py | 0 | gets a tokenizer for the given model name via huggingface. | STRING |
| HIGH | test/benchmark/service/benchmark_qps.py | 0 | gets a tokenizer for the given model name via huggingface. | STRING |
| HIGH | test/benchmark/service/benchmark_mcq.py | 0 | gets a tokenizer for the given model name via huggingface. | STRING |
| HIGH | test/benchmark/service/benchmark_sharegpt.py | 0 | gets a tokenizer for the given model name via huggingface. | STRING |
| HIGH | test/performance/multimodal_test.py | 0 | gets a tokenizer for the given model name via huggingface. | STRING |
| HIGH | lightllm/server/tokenizer.py | 0 | gets a tokenizer for the given model name via huggingface. | STRING |
| HIGH | …server/router/model_infer/mode_backend/base_backend.py | 0 | 将错误请求从 req_ids 中过滤出来, 然后让 _get_classed_reqs 进行处理。 该函数 主要用于在 nixl pd 分离模式下, 由子类继承重载, prefill 和 decode 节点过滤 kv 传输错误,或者 kv | STRING |
| HIGH | …nfer/mode_backend/pd/prefill_node_impl/prefill_impl.py | 0 | 将错误请求从 req_ids 中过滤出来, 然后让 _get_classed_reqs 进行处理。 该函数 主要用于在 nixl pd 分离模式下, 由子类继承重载, prefill 和 decode 节点过滤 kv 传输错误,或者 kv | STRING |
| HIGH | …_infer/mode_backend/pd/decode_node_impl/decode_impl.py | 0 | 将错误请求从 req_ids 中过滤出来, 然后让 _get_classed_reqs 进行处理。 该函数 主要用于在 nixl pd 分离模式下, 由子类继承重载, prefill 和 decode 节点过滤 kv 传输错误,或者 kv | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | unit_tests/models/qwen2_vl/test_rotary_pos_emb.py | 22 | CODE | |
| LOW | …tt/int8kv/test_int8kv_flash_decoding_diverse_stage1.py | 8 | CODE | |
| LOW | lightllm/server/pd_io_struct.py | 251 | CODE | |
| LOW | lightllm/server/metrics/manager.py | 64 | CODE | |
| LOW | lightllm/server/core/objs/py_sampling_params.py | 28 | CODE | |
| LOW | lightllm/server/core/objs/out_token_circlequeue.py | 103 | CODE | |
| LOW | lightllm/server/embed_cache/utils.py | 17 | CODE | |
| LOW | lightllm/utils/sgl_utils.py | 82 | CODE | |
| LOW | lightllm/utils/dist_utils.py | 326 | CODE | |
| LOW | …/models/gpt_oss/layer_infer/transformer_layer_infer.py | 28 | CODE | |
| LOW | …/models/gpt_oss/layer_infer/transformer_layer_infer.py | 33 | CODE | |
| LOW | …emma4/triton_kernel/context_attention_fwd_gemma4_mm.py | 347 | CODE | |
| LOW | lightllm/models/qwen_vl/qwen_visual.py | 241 | CODE | |
| LOW | lightllm/models/qwen2_5_vl/qwen2_5_visual.py | 139 | CODE | |
| LOW | …tllm/models/vit/layer_infer/transformer_layer_infer.py | 40 | CODE | |
| LOW | …tllm/models/vit/layer_infer/transformer_layer_infer.py | 54 | CODE | |
| LOW | lightllm/models/tarsier2/tarsier2_visual.py | 153 | CODE | |
| LOW | lightllm/models/qwen3_omni_moe_thinker/audio_process.py | 18 | CODE | |
| LOW | lightllm/models/qwen3_omni_moe_thinker/audio_process.py | 106 | CODE | |
| LOW | …tllm/models/qwen3_omni_moe_thinker/qwen3_omni_audio.py | 150 | CODE | |
| LOW | …llm/models/qwen3_omni_moe_thinker/qwen3_omni_visual.py | 124 | CODE | |
| LOW | …odels/deepseek2/layer_infer/transformer_layer_infer.py | 115 | CODE | |
| LOW | …eepseek2/triton_kernel/context_flashattention_nopad.py | 438 | CODE | |
| LOW | lightllm/models/qwen2_vl/qwen2_visual.py | 179 | CODE | |
| LOW | lightllm/models/qwen2_vl/vision_process.py | 81 | CODE | |
| LOW | …odels/qwen3next/layer_infer/transformer_layer_infer.py | 325 | CODE | |
| LOW | lightllm/models/whisper/modeling_whisper.py | 51 | CODE | |
| LOW | lightllm/models/qwen3_vl/qwen3_visual.py | 120 | CODE | |
| LOW | lightllm/common/quantization/w8a8gx.py | 115 | CODE | |
| LOW | lightllm/common/basemodel/attention/triton/fp.py | 244 | CODE | |
| LOW | lightllm/common/basemodel/attention/triton/mla.py | 159 | CODE | |
| LOW | …basemodel/triton_kernel/fused_moe/grouped_fused_moe.py | 992 | CODE | |
| LOW | …basemodel/triton_kernel/fused_moe/grouped_fused_moe.py | 1118 | CODE | |
| LOW | …basemodel/triton_kernel/fused_moe/grouped_fused_moe.py | 1158 | CODE | |
| LOW | …basemodel/triton_kernel/fused_moe/grouped_fused_moe.py | 1188 | CODE | |
| LOW | …basemodel/triton_kernel/fused_moe/grouped_fused_moe.py | 1228 | CODE | |
| LOW | …basemodel/triton_kernel/fused_moe/grouped_fused_moe.py | 1258 | CODE | |
| LOW | …iton_kernel/alibi_att/token_attention_nopad_reduceV.py | 108 | CODE | |
| LOW | …riton_kernel/alibi_att/context_flashattention_nopad.py | 196 | CODE | |
| LOW | …odel/triton_kernel/linear_att/fla/ops/chunk_delta_h.py | 256 | CODE | |
| LOW | …el/triton_kernel/linear_att/fla/ops/fused_recurrent.py | 250 | CODE | |
| LOW | …el/triton_kernel/linear_att/fla/ops/fused_recurrent.py | 432 | CODE | |
| LOW | …el/triton_kernel/linear_att/fla/ops/fused_recurrent.py | 385 | CODE | |
| LOW | …mha/stage3_decode_att/token_attention_nopad_reduceV.py | 110 | CODE | |
| LOW | …yer_weights/meta_weights/fused_moe/impl/triton_impl.py | 155 | CODE | |
| LOW | …r_weights/meta_weights/fused_moe/impl/deepgemm_impl.py | 91 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | test/performance/multimodal_test.py | 21 | # Step 1: Generate a random image (RGB) | COMMENT |
| LOW⚡ | test/performance/multimodal_test.py | 24 | # Step 2: Convert NumPy array to PIL Image | COMMENT |
| LOW⚡ | test/performance/multimodal_test.py | 27 | # Step 3: Save the image to a BytesIO buffer | COMMENT |
| LOW⚡ | test/performance/multimodal_test.py | 31 | # Step 4: Encode the image bytes to Base64 | COMMENT |
| LOW⚡ | test/start_scripts/README.md | 70 | # Step 1: Start PD Master | COMMENT |
| LOW⚡ | test/start_scripts/README.md | 73 | # Step 2: Start Prefill service | COMMENT |
| LOW⚡ | test/start_scripts/README.md | 76 | # Step 3: Start Decode service | COMMENT |
| LOW⚡ | test/start_scripts/README.md | 83 | # Step 1: Start configuration server | COMMENT |
| LOW⚡ | test/start_scripts/README.md | 86 | # Step 2: Start multiple PD Masters | COMMENT |
| LOW⚡ | test/start_scripts/README.md | 90 | # Step 3: Start Prefill and Decode services with the prefill/decode run modes. | COMMENT |
| LOW | lightllm/models/deepseek3_2/encoding_dsv32.py | 380 | # NOTE: This function is designed to parse only correctly | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lightllm/utils/shm_utils.py | 10 | Args: name: name of the shared memory expected_size: expected size of the shared memory, if expecte | STRING |
| HIGH | …htllm/models/deepseek2/triton_kernel/weight_dequant.py | 10 | Dequantizes the given weight tensor using the provided scale tensor. Args: x (torch.Tensor): The quant | STRING |
| HIGH | …on/basemodel/triton_kernel/linear_att/fla/ops/chunk.py | 123 | Args: q (torch.Tensor): queries of shape `[B, T, H, K]` if `head_first=False` else `[B, H, T, K | STRING |
| HIGH | …el/triton_kernel/linear_att/fla/ops/fused_recurrent.py | 453 | Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/test_pd_selector/test_pd_master_multi_choice.py | 164 | CODE | |
| MEDIUM | test/test_pd_selector/test_pd_master_multi_choice.py | 181 | CODE | |
| MEDIUM | test/test_pd_selector/test_pd_master_multi_choice.py | 224 | CODE | |
| MEDIUM | unit_tests/server/httpserver/test_pd_generate_error.py | 24 | CODE | |
| MEDIUM | unit_tests/server/httpserver/test_pd_generate_error.py | 32 | CODE | |
| MEDIUM | unit_tests/server/httpserver/test_pd_generate_error.py | 47 | CODE | |
| MEDIUM | unit_tests/server/httpserver/test_pd_generate_error.py | 59 | CODE | |
| MEDIUM | format_out/impl.py | 61 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | test/performance/multimodal_test.py | 21 | # Step 1: Generate a random image (RGB) | COMMENT |
| LOW⚡ | test/performance/multimodal_test.py | 24 | # Step 2: Convert NumPy array to PIL Image | COMMENT |
| LOW⚡ | test/performance/multimodal_test.py | 27 | # Step 3: Save the image to a BytesIO buffer | COMMENT |
| LOW⚡ | test/performance/multimodal_test.py | 31 | # Step 4: Encode the image bytes to Base64 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/test_api/test_gsmk.py | 181 | # Test questions should start after few-shot examples | COMMENT |
| MEDIUM | test/acc/test_gsmk.py | 163 | # Test questions should start after few-shot examples | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lightllm/server/reasoning_parser.py | 484 | # If no emit, just return the held content | COMMENT |
| MEDIUM⚡ | …emma4/triton_kernel/context_attention_fwd_gemma4_mm.py | 267 | # Reference implementation + standalone test harness | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | lightllm/server/tokenizer.py | 70 | # you can try pip install protobuf==3.20.0 to try repair | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lightllm/server/visualserver/proxy_manager.py | 121 | def run_task(self, conn: rpyc.Connection, images: List[ImageItem]): | CODE |
| LOW | …lm/server/visualserver/model_infer/model_rpc_client.py | 34 | async def run_task(self, images: List[ImageItem], ref_event_list: List[threading.Event]): | CODE |
| LOW | …llm/server/audioserver/model_infer/model_rpc_client.py | 31 | async def run_task(self, audios: List[AudioItem], ref_event_list: List[threading.Event]): | CODE |