Repository Analysis

InternLM/lmdeploy

LMDeploy is a toolkit for compressing, deploying, and serving LLMs.

18.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of InternLM/lmdeploy, a Python project with 7,953 GitHub stars. SynthScan v2.0 examined 229,426 lines of code across 1292 source files, recording 3095 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 18.3 places this repository in the Moderate AI signal band.

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

18.3
Adjusted Score
18.3
Raw Score
100%
Time Factor
2026-07-14
Last Push
8.0K
Stars
Python
Language
229.4K
Lines of Code
1.3K
Files
3.1K
Pattern Hits
2026-07-14
Scan Date
0.10
HC Hit Rate

What These Metrics Mean

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

Score History

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

Severity Breakdown

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

CRITICAL 0HIGH 123MEDIUM 310LOW 2662

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 3095 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 Identifiers1394 hits · 1331 pts
SeverityFileLineSnippetContext
LOWbenchmark/benchmark_chat_completion.py175def _dataset_longest_prefix_match(dataset: str, selected: Sequence[str]) -> str | None:CODE
LOWbenchmark/benchmark_chat_completion.py360def _cached_tokens_from_usage(usage: dict[str, Any] | None) -> int:CODE
LOWbenchmark/profile_restful_api.py159async def async_request_openai_completions(CODE
LOWbenchmark/profile_restful_api.py237async def async_request_openai_chat_completions(CODE
LOWbenchmark/profile_restful_api.py345async def async_request_sglang_generate(CODE
LOWbenchmark/profile_restful_api.py847 def _gen_random_image_data_uri(width: int = width, height: int = height) -> tuple[Image.Image, str, int]:CODE
LOWlmdeploy/tokenizer.py70 def _check_transformers_version(self, model_dir: str, trust_remote_code: bool = False):CODE
LOWlmdeploy/tokenizer.py234 def _convert_tokens_to_string_with_added_encoders(CODE
LOWlmdeploy/utils.py638def init_custom_process_group(backend=None,CODE
LOWlmdeploy/messages.py154 def convert_stop_bad_words_to_ids(self, tokenizer: Tokenizer):CODE
LOWlmdeploy/metrics/metrics_processor.py101 def increase_succeeded_requests(self):CODE
LOWlmdeploy/metrics/metrics_processor.py114 def increase_api_routed_requests(self):CODE
LOWlmdeploy/metrics/metrics_processor.py118 def decrease_api_routed_requests(self):CODE
LOWlmdeploy/metrics/stats.py90 def update_from_schedule_metrics(self, scheduled_metrics: ScheduleMetrics):CODE
LOWlmdeploy/lite/apis/calibrate.py184def make_compatible_internvl_config(model_path):CODE
LOWlmdeploy/lite/apis/calibrate.py194 def _get_non_default_generation_parameters(self):CODE
LOWlmdeploy/lite/utils/calib_dataloader.py250def get_neuralmagic_calibration(dataset, tokenizer, nsamples, seed, seqlen):CODE
LOWlmdeploy/lite/utils/memory_efficient.py45def find_modules_by_return_value(model: nn.Module, value: str) -> list[nn.Module]:CODE
LOWlmdeploy/lite/utils/memory_efficient.py197def memory_efficient_inference(model: nn.Module, offload: bool = True, device: str = 'cuda') -> None:CODE
LOWlmdeploy/lite/utils/cal_qparams.py20def cal_qparams_per_channel_absmax(w: torch.Tensor, n_bits: int, return_stats: bool = False) -> QParams:CODE
LOWlmdeploy/lite/utils/cal_qparams.py36def cal_qparams_per_channel_minmax(w: torch.Tensor, n_bits: int, return_stats: bool = False) -> QParams:CODE
LOWlmdeploy/lite/utils/cal_qparams.py58def cal_qparams_per_group_absmax(w: torch.Tensor, n_bits: int, group_size: int, return_stats: bool = False) -> QParams:CODE
LOWlmdeploy/lite/utils/cal_qparams.py79def cal_qparams_per_group_minmax(w: torch.Tensor, n_bits: int, group_size: int, return_stats: bool = False) -> QParams:CODE
LOWlmdeploy/lite/utils/cal_qparams.py105def cal_qparams_per_tensor_minmax(w: torch.Tensor, n_bits: int, return_stats: bool = False) -> QParams:CODE
LOWlmdeploy/lite/utils/cal_qparams.py125def cal_qparams_per_tensor_absmax(w: torch.Tensor, n_bits: int, return_stats: bool = False) -> QParams:CODE
LOWlmdeploy/lite/utils/batch_split.py7def split_decoder_layer_inputs(batch_size, *args: torch.Tensor | Any,CODE
LOWlmdeploy/lite/utils/batch_split.py64def concat_decoder_layer_outputs(batch_outputs: list[Any]) -> Any:CODE
LOWlmdeploy/lite/quantization/calibration.py407 def _wrap_decoder_layers_for_search(self):CODE
LOWlmdeploy/cli/utils.py502 def allow_terminate_by_client(parser):CODE
LOWlmdeploy/cli/utils.py589 def prefix_cache_state_budget(parser):CODE
LOWlmdeploy/cli/utils.py600 def prefix_cache_decode_state_interval(parser):CODE
LOWlmdeploy/cli/utils.py644 def cudagraph_capture_batch_sizes(parser):CODE
LOWlmdeploy/cli/utils.py773 def dllm_confidence_threshold(parser):CODE
LOWlmdeploy/cli/utils.py781 def enable_return_routed_experts(parser):CODE
LOWlmdeploy/cli/utils.py811 def distributed_executor_backend(parser):CODE
LOWlmdeploy/vl/engine.py15def _get_hf_config_mm_feature_dtype(hf_config) -> torch.dtype | None:CODE
LOWlmdeploy/vl/engine.py44def _resolve_mm_feature_dtype(hf_config, backend_config) -> torch.dtype | None:CODE
LOWlmdeploy/vl/engine.py63def _raise_exception_on_finish(task: asyncio.Task) -> None:CODE
LOWlmdeploy/vl/model/internvl.py22def find_closest_aspect_ratio(aspect_ratio, target_ratios, width, height, image_size):CODE
LOWlmdeploy/vl/model/preprocess_utils.py77def _expand_bundled_image_items(item: dict, token_id: int) -> list[dict]:CODE
LOWlmdeploy/vl/model/preprocess_utils.py107def _expand_bundled_video_items(item: dict, token_id: int) -> list[dict]:CODE
LOWlmdeploy/vl/model/preprocess_utils.py189def _expand_bundled_audio_items(item: dict, token_id: int) -> list[dict]:CODE
LOWlmdeploy/vl/model/llava.py30def _clip_vision_tower_load_model(self, **kwargs):CODE
LOWlmdeploy/vl/model/utils.py11def disable_transformers_logging():CODE
LOWlmdeploy/vl/model/deepseek.py14def check_deepseek_vl_install():CODE
LOWlmdeploy/vl/model/qwen2.py8def check_qwen_vl_deps_install():CODE
LOWlmdeploy/vl/model/base.py384 def to_pytorch_with_input_ids(self, messages):CODE
LOWlmdeploy/vl/media/video.py46 def _get_video_loader_backend(self) -> VideoLoader:CODE
LOWlmdeploy/turbomind/tokenizer_info.py119 def _is_sentencepiece_tokenizer(tokenizer: PreTrainedTokenizerBase) -> bool:STRING
LOWlmdeploy/turbomind/converter.py95def _validate_quant_group_size(model_format: str | None, group_size: int | None) -> int | None:CODE
LOWlmdeploy/turbomind/turbomind.py40def _construct_stop_or_bad_words(words: list[int] = None):CODE
LOWlmdeploy/turbomind/turbomind.py591 def _get_extra_output_processors(self, outputs: dict[str, torch.Tensor], gen_config: GenerationConfig,CODE
LOWlmdeploy/serve/parsers/_openai_harmony.py71 def _convert_response_format_to_harmony(self):CODE
LOWlmdeploy/serve/parsers/response_parser.py54def _parse_tool_call_arguments_dict(arguments: Any) -> dict[str, Any] | None:CODE
LOWlmdeploy/serve/parsers/response_parser.py77def _normalize_request_messages(messages: list[dict]) -> list[dict] | None:CODE
LOWlmdeploy/serve/parsers/response_parser.py261 def chat_template_kwargs_from_request(cls, request: ChatCompletionRequest) -> dict:CODE
LOWlmdeploy/serve/parsers/response_parser.py719 def _longest_open_tag_prefix_suffix(text: str, tags: list[str]) -> int:CODE
LOWlmdeploy/serve/parsers/tool_parser/tool_parser.py116 def _decode_tool_incremental_json(self, added_text: str, *, final: bool) -> list[DeltaToolCall]:CODE
LOWlmdeploy/serve/parsers/tool_parser/tool_parser.py172 def _parse_tool_call_complete_json(payload: str) -> ToolCall | None:CODE
LOW…oy/serve/parsers/tool_parser/qwen3coder_tool_parser.py60 def _extract_incremental_state(self,CODE
1334 more matches not shown…
Decorative Section Separators272 hits · 915 pts
SeverityFileLineSnippetContext
MEDIUMlmdeploy/turbomind/linear.py29# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/linear.py31# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/linear.py67# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/linear.py69# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/linear.py104# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/linear.py106# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/linear.py221# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/linear.py223# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/weight_format.py42# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/weight_format.py44# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/weight_format.py83# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/weight_format.py85# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/weight_format.py172# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/weight_format.py174# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/weight_format.py426# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/weight_format.py428# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py10# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py12# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py26# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py28# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py45# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py47# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py116# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py118# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py192 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py194 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py210 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py212 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py223 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py225 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py320 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py322 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py335 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py337 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py387 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/_base.py389 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/attention.py17# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/attention.py19# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/attention.py79# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/attention.py81# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/ffn.py23# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/ffn.py25# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/ffn.py47# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/ffn.py49# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/ffn.py139# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/ffn.py141# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/ffn.py168# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/ffn.py170# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/deltanet.py63# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/deltanet.py65# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/moe.py6# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/moe.py8# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/mla.py9# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/mla.py11# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/mla.py62# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/builders/mla.py64# ---------------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/models/internlm2.py66 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/models/internlm2.py68 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/models/internlm2.py86 # ------------------------------------------------------------------COMMENT
MEDIUMlmdeploy/turbomind/models/internlm2.py88 # ------------------------------------------------------------------COMMENT
212 more matches not shown…
Unused Imports552 hits · 532 pts
SeverityFileLineSnippetContext
LOWbenchmark/benchmark_parser.py9CODE
LOWbenchmark/benchmark_parser.py19CODE
LOWbenchmark/benchmark_parser.py22CODE
LOWbenchmark/benchmark_chat_completion.py14CODE
LOWbenchmark/benchmark_generate.py21CODE
LOWlmdeploy/__init__.py3CODE
LOWlmdeploy/__init__.py3CODE
LOWlmdeploy/__init__.py3CODE
LOWlmdeploy/__init__.py4CODE
LOWlmdeploy/__init__.py4CODE
LOWlmdeploy/__init__.py4CODE
LOWlmdeploy/__init__.py4CODE
LOWlmdeploy/__init__.py5CODE
LOWlmdeploy/__init__.py6CODE
LOWlmdeploy/__init__.py7CODE
LOWlmdeploy/__init__.py8CODE
LOWlmdeploy/__init__.py8CODE
LOWlmdeploy/api.py2CODE
LOWlmdeploy/utils.py511CODE
LOWlmdeploy/utils.py519CODE
LOWlmdeploy/utils.py470CODE
LOWlmdeploy/pipeline.py2CODE
LOWlmdeploy/lite/__init__.py2CODE
LOWlmdeploy/lite/__init__.py3CODE
LOWlmdeploy/lite/__init__.py4CODE
LOWlmdeploy/lite/utils/__init__.py3CODE
LOWlmdeploy/lite/utils/__init__.py3CODE
LOWlmdeploy/lite/utils/__init__.py4CODE
LOWlmdeploy/lite/utils/__init__.py4CODE
LOWlmdeploy/lite/utils/__init__.py4CODE
LOWlmdeploy/lite/utils/__init__.py4CODE
LOWlmdeploy/lite/utils/__init__.py4CODE
LOWlmdeploy/lite/utils/__init__.py4CODE
LOWlmdeploy/lite/utils/__init__.py4CODE
LOWlmdeploy/lite/utils/__init__.py4CODE
LOWlmdeploy/lite/utils/__init__.py14CODE
LOWlmdeploy/lite/utils/__init__.py15CODE
LOWlmdeploy/lite/utils/__init__.py15CODE
LOWlmdeploy/lite/utils/__init__.py15CODE
LOWlmdeploy/lite/utils/__init__.py16CODE
LOWlmdeploy/lite/utils/__init__.py17CODE
LOWlmdeploy/lite/quantization/__init__.py2CODE
LOWlmdeploy/lite/quantization/__init__.py2CODE
LOWlmdeploy/lite/quantization/__init__.py3CODE
LOWlmdeploy/lite/quantization/__init__.py3CODE
LOWlmdeploy/lite/quantization/__init__.py4CODE
LOWlmdeploy/lite/quantization/weight/__init__.py2CODE
LOWlmdeploy/lite/quantization/activation/__init__.py2CODE
LOWlmdeploy/lite/quantization/activation/__init__.py2CODE
LOWlmdeploy/lite/quantization/modules/__init__.py2CODE
LOWlmdeploy/lite/model/__init__.py3CODE
LOWlmdeploy/lite/model/__init__.py3CODE
LOWlmdeploy/lite/model/__init__.py7CODE
LOWlmdeploy/cli/__init__.py2CODE
LOWlmdeploy/vl/__init__.py2CODE
LOWlmdeploy/vl/__init__.py2CODE
LOWlmdeploy/vl/__init__.py2CODE
LOWlmdeploy/vl/__init__.py2CODE
LOWlmdeploy/vl/__init__.py2CODE
LOWlmdeploy/vl/__init__.py2CODE
492 more matches not shown…
Cross-File Repetition61 hits · 305 pts
SeverityFileLineSnippetContext
HIGHlmdeploy/vl/model/internvl.py0build the vision part of a vlm model when backend is turbomind, or load the whole vlm model when `self.with_llm==true`STRING
HIGHlmdeploy/vl/model/molmo.py0build the vision part of a vlm model when backend is turbomind, or load the whole vlm model when `self.with_llm==true`STRING
HIGHlmdeploy/vl/model/llama4.py0build the vision part of a vlm model when backend is turbomind, or load the whole vlm model when `self.with_llm==true`STRING
HIGHlmdeploy/vl/model/llava.py0build the vision part of a vlm model when backend is turbomind, or load the whole vlm model when `self.with_llm==true`STRING
HIGHlmdeploy/vl/model/deepseek.py0build the vision part of a vlm model when backend is turbomind, or load the whole vlm model when `self.with_llm==true`STRING
HIGHlmdeploy/vl/model/llava_hf.py0build the vision part of a vlm model when backend is turbomind, or load the whole vlm model when `self.with_llm==true`STRING
HIGHlmdeploy/vl/model/llava_next.py0build the vision part of a vlm model when backend is turbomind, or load the whole vlm model when `self.with_llm==true`STRING
HIGHlmdeploy/vl/model/internvl3_hf.py0build the vision part of a vlm model when backend is turbomind, or load the whole vlm model when `self.with_llm==true`STRING
HIGHlmdeploy/vl/model/gemma3_vl.py0build the vision part of a vlm model when backend is turbomind, or load the whole vlm model when `self.with_llm==true`STRING
HIGHlmdeploy/vl/model/minicpmv.py0build the vision part of a vlm model when backend is turbomind, or load the whole vlm model when `self.with_llm==true`STRING
HIGHlmdeploy/vl/model/deepseek_vl2.py0build the vision part of a vlm model when backend is turbomind, or load the whole vlm model when `self.with_llm==true`STRING
HIGHlmdeploy/vl/model/internvl.py0extract image feature. only implement it when the backend is turbomind engine. args: messages(list[dict]): the outputs oSTRING
HIGHlmdeploy/vl/model/molmo.py0extract image feature. only implement it when the backend is turbomind engine. args: messages(list[dict]): the outputs oSTRING
HIGHlmdeploy/vl/model/llama4.py0extract image feature. only implement it when the backend is turbomind engine. args: messages(list[dict]): the outputs oSTRING
HIGHlmdeploy/vl/model/llava.py0extract image feature. only implement it when the backend is turbomind engine. args: messages(list[dict]): the outputs oSTRING
HIGHlmdeploy/vl/model/deepseek.py0extract image feature. only implement it when the backend is turbomind engine. args: messages(list[dict]): the outputs oSTRING
HIGHlmdeploy/vl/model/llava_hf.py0extract image feature. only implement it when the backend is turbomind engine. args: messages(list[dict]): the outputs oSTRING
HIGHlmdeploy/vl/model/llava_next.py0extract image feature. only implement it when the backend is turbomind engine. args: messages(list[dict]): the outputs oSTRING
HIGHlmdeploy/vl/model/internvl3_hf.py0extract image feature. only implement it when the backend is turbomind engine. args: messages(list[dict]): the outputs oSTRING
HIGHlmdeploy/vl/model/gemma3_vl.py0extract image feature. only implement it when the backend is turbomind engine. args: messages(list[dict]): the outputs oSTRING
HIGHlmdeploy/vl/model/qwen2.py0extract image feature. only implement it when the backend is turbomind engine. args: messages(list[dict]): the outputs oSTRING
HIGHlmdeploy/vl/model/minicpmv.py0extract image feature. only implement it when the backend is turbomind engine. args: messages(list[dict]): the outputs oSTRING
HIGHlmdeploy/vl/model/deepseek_vl2.py0extract image feature. only implement it when the backend is turbomind engine. args: messages(list[dict]): the outputs oSTRING
HIGHlmdeploy/serve/openai/protocol.py0tear down a previously initialized weights-update group.STRING
HIGHlmdeploy/pytorch/engine/engine.py0tear down a previously initialized weights-update group.STRING
HIGHlmdeploy/pytorch/engine/mp_engine/base_worker.py0tear down a previously initialized weights-update group.STRING
HIGHlmdeploy/pytorch/engine/mp_engine/base.py0tear down a previously initialized weights-update group.STRING
HIGHlmdeploy/pytorch/engine/executor/base_worker.py0tear down a previously initialized weights-update group.STRING
HIGHlmdeploy/pytorch/engine/executor/ray_executor.py0tear down a previously initialized weights-update group.STRING
HIGHlmdeploy/pytorch/engine/executor/base.py0tear down a previously initialized weights-update group.STRING
HIGHlmdeploy/serve/openai/api_server.py0tear down a previously initialized weights-update group.STRING
HIGHlmdeploy/pytorch/messages.py0update token ids, old token ids will be added to history.STRING
HIGHlmdeploy/pytorch/strategies/dllm/sequence.py0update token ids, old token ids will be added to history.STRING
HIGHlmdeploy/pytorch/strategies/ar_spec/sequence.py0update token ids, old token ids will be added to history.STRING
HIGHlmdeploy/pytorch/strategies/ar/sequence.py0update token ids, old token ids will be added to history.STRING
HIGHlmdeploy/pytorch/strategies/dllm/step_inputs.py0shrink batch — keep only sequences at delta.indices.STRING
HIGHlmdeploy/pytorch/strategies/ar_spec/step_inputs.py0shrink batch — keep only sequences at delta.indices.STRING
HIGHlmdeploy/pytorch/strategies/ar/step_inputs.py0shrink batch — keep only sequences at delta.indices.STRING
HIGHlmdeploy/pytorch/strategies/base/step_inputs.py0shrink batch — keep only sequences at delta.indices.STRING
HIGHlmdeploy/pytorch/models/qwen3_5.py0we might change the number of layers so we can debug the model with less gpus.STRING
HIGHlmdeploy/pytorch/models/qwen3_5_moe.py0we might change the number of layers so we can debug the model with less gpus.STRING
HIGHlmdeploy/pytorch/models/qwen3_next.py0we might change the number of layers so we can debug the model with less gpus.STRING
HIGHlmdeploy/pytorch/models/deepseek_v2.py0we might change the number of layers so we can debug the model with less gpus.STRING
HIGH…/pytorch/paging/block_manager/default_block_manager.py0return if physical block can be allocated for given message.STRING
HIGH…y/pytorch/paging/block_manager/window_block_manager.py0return if physical block can be allocated for given message.STRING
HIGH…loy/pytorch/paging/block_manager/base_block_manager.py0return if physical block can be allocated for given message.STRING
HIGH…/pytorch/paging/block_manager/default_block_manager.py0allocate physical blocks for given message according to logical blocks.STRING
HIGH…y/pytorch/paging/block_manager/window_block_manager.py0allocate physical blocks for given message according to logical blocks.STRING
HIGH…loy/pytorch/paging/block_manager/base_block_manager.py0allocate physical blocks for given message according to logical blocks.STRING
HIGHlmdeploy/pytorch/engine/engine.py0receive weights through the disaggregated process group.STRING
HIGHlmdeploy/pytorch/engine/mp_engine/base_worker.py0receive weights through the disaggregated process group.STRING
HIGHlmdeploy/pytorch/engine/mp_engine/base.py0receive weights through the disaggregated process group.STRING
HIGHlmdeploy/pytorch/engine/executor/base_worker.py0receive weights through the disaggregated process group.STRING
HIGHlmdeploy/pytorch/engine/executor/ray_executor.py0receive weights through the disaggregated process group.STRING
HIGHlmdeploy/pytorch/engine/executor/base.py0receive weights through the disaggregated process group.STRING
HIGHlmdeploy/pytorch/engine/base.py0drop connection. 1. drop engine connection (zmq connection) 2. todo(jimyma) drop rdma connection.STRING
HIGHlmdeploy/pytorch/engine/mp_engine/base_worker.py0drop connection. 1. drop engine connection (zmq connection) 2. todo(jimyma) drop rdma connection.STRING
HIGHlmdeploy/pytorch/engine/mp_engine/base.py0drop connection. 1. drop engine connection (zmq connection) 2. todo(jimyma) drop rdma connection.STRING
HIGHautotest/utils/run_restful_chat.py0get current temperature at a location. args: location: the location to get the temperature for, in the format "city, staSTRING
HIGHdocs/zh_cn/llm/api_server_tools.md0get current temperature at a location. args: location: the location to get the temperature for, in the format "city, staSTRING
1 more matches not shown…
Magic Placeholder Names57 hits · 282 pts
SeverityFileLineSnippetContext
HIGH…/interface/restful/test_restful_chat_completions_v1.py692 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py708 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py729 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py748 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py772 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py794 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py821 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py843 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py871 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py886 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py902 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py921 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py947 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py964 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py988 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py1005 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py1036 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py1057 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py1088 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGH…/interface/restful/test_restful_chat_completions_v1.py1121 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{BASE_URL}/v1')CODE
HIGHautotest/utils/tool_reasoning_definitions.py205 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{url}/v1')CODE
HIGHautotest/utils/tool_reasoning_definitions.py787 'Authorization': 'Bearer YOUR_API_KEY',CODE
HIGHautotest/utils/tool_reasoning_definitions.py941 'Authorization': 'Bearer YOUR_API_KEY',CODE
HIGHautotest/utils/run_restful_chat.py156 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{url}/v1')CODE
HIGHautotest/utils/run_restful_chat.py485 client = OpenAI(api_key='YOUR_API_KEY', base_url=http_url + '/v1')CODE
HIGHautotest/utils/run_restful_chat.py826 client = OpenAI(api_key='YOUR_API_KEY', base_url=http_url + '/v1')CODE
HIGHautotest/utils/run_restful_chat.py1117 client = OpenAI(api_key='YOUR_API_KEY', base_url=http_url + '/v1')CODE
HIGHdocs/zh_cn/llm/api_server.md90 api_key='YOUR_API_KEY',CODE
HIGHdocs/zh_cn/llm/api_server.md113 client = AsyncOpenAI(api_key='YOUR_API_KEY',CODE
HIGHdocs/zh_cn/llm/codellama.md149 api_key='YOUR_API_KEY',STRING
HIGHdocs/zh_cn/llm/api_server_tools.md39client = OpenAI(api_key='YOUR_API_KEY',base_url='http://0.0.0.0:23333/v1')CODE
HIGHdocs/zh_cn/llm/api_server_tools.md112client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')CODE
HIGHdocs/zh_cn/llm/api_server_tools.md186 client = OpenAI(api_key='YOUR_API_KEY',CODE
HIGHdocs/zh_cn/llm/api_server_tools.md357client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')CODE
HIGHdocs/zh_cn/llm/api_server_lora.md77 api_key='YOUR_API_KEY',CODE
HIGHdocs/zh_cn/advance/structed_output.md99client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')CODE
HIGHdocs/zh_cn/advance/spec_decoding.md188 client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:24545/v1')CODE
HIGHdocs/zh_cn/get_started/get_started.md131 api_key='YOUR_API_KEY',CODE
HIGHdocs/zh_cn/get_started/get_started.md165client = OpenAI(api_key='YOUR_API_KEY', # A dummy api_key is requiredCODE
HIGHdocs/zh_cn/multi_modal/api_server_vl.md60client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')CODE
HIGHdocs/zh_cn/multi_modal/phi3.md55client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')CODE
HIGHdocs/en/llm/api_server.md71 api_key='YOUR_API_KEY',CODE
HIGHdocs/en/llm/api_server.md94 client = AsyncOpenAI(api_key='YOUR_API_KEY',CODE
HIGHdocs/en/llm/codellama.md149 api_key='YOUR_API_KEY',STRING
HIGHdocs/en/llm/api_server_tools.md39client = OpenAI(api_key='YOUR_API_KEY',base_url='http://0.0.0.0:23333/v1')CODE
HIGHdocs/en/llm/api_server_tools.md112client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')CODE
HIGHdocs/en/llm/api_server_tools.md186 client = OpenAI(api_key='YOUR_API_KEY',CODE
HIGHdocs/en/llm/api_server_tools.md357client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')CODE
HIGHdocs/en/llm/api_server_lora.md77 api_key='YOUR_API_KEY',CODE
HIGHdocs/en/advance/structed_output.md99client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')CODE
HIGHdocs/en/advance/spec_decoding.md189 client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:24545/v1')CODE
HIGHdocs/en/get_started/get_started.md134 api_key='YOUR_API_KEY',CODE
HIGHdocs/en/get_started/get_started.md169client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')CODE
HIGHdocs/en/multi_modal/api_server_vl.md83client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')CODE
HIGHdocs/en/multi_modal/phi3.md56client = OpenAI(api_key='YOUR_API_KEY', base_url='http://0.0.0.0:23333/v1')CODE
HIGHeval/config.py57 key='YOUR_API_KEY',CODE
HIGHeval/eval.py121 client = OpenAI(api_key='YOUR_API_KEY', base_url=f'{server}/v1')CODE
Excessive Try-Catch Wrapping216 hits · 250 pts
SeverityFileLineSnippetContext
LOWbenchmark/benchmark_chat_completion.py35except Exception: # noqa: BLE001 - tqdm is optional for CLI progress display.CODE
LOWbenchmark/benchmark_chat_completion.py531 except Exception as e: # noqa: BLE001 - record and keep consuming SSE.CODE
LOWbenchmark/benchmark_chat_completion.py537 except Exception as e: # noqa: BLE001 - benchmark should record failures and continue.CODE
LOWbenchmark/benchmark_chat_completion.py772 except Exception as e:CODE
LOWbenchmark/benchmark_pipeline.py58 except Exception as e:CODE
LOWbenchmark/benchmark_throughput.py58 except Exception as e:CODE
LOWbenchmark/benchmark_serving.py87 except Exception as e:CODE
LOWbenchmark/benchmark_serving.py146 except Exception as e:CODE
LOWbenchmark/benchmark_generate.py56except Exception: # noqa: BLE001CODE
LOWbenchmark/benchmark_generate.py274 except Exception as e: # noqa: BLE001CODE
MEDIUMbenchmark/profile_restful_api.py747 print(f'Error applying chat template: {e}, fallback to <image> tag')CODE
MEDIUMbenchmark/profile_restful_api.py1115 print(f'Error running benchmark for request rate: {request_rate}')CODE
LOWbenchmark/profile_restful_api.py148 except Exception:CODE
LOWbenchmark/profile_restful_api.py227 except Exception:CODE
LOWbenchmark/profile_restful_api.py335 except Exception:CODE
LOWbenchmark/profile_restful_api.py412 except Exception:CODE
LOWbenchmark/profile_restful_api.py744 except Exception as e:CODE
LOWbenchmark/profile_restful_api.py775 except Exception:CODE
LOWbenchmark/profile_restful_api.py1181 except Exception as e:CODE
LOWbenchmark/profile_restful_api.py1244 except Exception as e:CODE
LOWlmdeploy/model.py636 except Exception as e:CODE
LOWlmdeploy/model.py653 except Exception as e:CODE
LOWlmdeploy/model.py735 except Exception:CODE
LOWlmdeploy/model.py743 except Exception:CODE
LOWlmdeploy/tokenizer.py430 except Exception as e: # noqaCODE
LOWlmdeploy/utils.py471 except Exception as e:CODE
LOWlmdeploy/utils.py512 except Exception:CODE
LOWlmdeploy/utils.py520 except Exception:CODE
MEDIUMlmdeploy/utils.py509def is_deep_ep_installed():CODE
MEDIUMlmdeploy/utils.py517def is_deep_gemm_installed():CODE
LOWlmdeploy/archs.py151 except Exception as e: # noqaCODE
LOWlmdeploy/metrics/metrics_processor.py81 except Exception as e:CODE
LOWlmdeploy/lite/apis/gptq.py43 except Exception:CODE
LOWlmdeploy/cli/cli.py127 except Exception:CODE
LOWlmdeploy/vl/engine.py69 except Exception as e:CODE
LOWlmdeploy/vl/model/builder.py80 except Exception as e:CODE
LOWlmdeploy/vl/model/utils.py44 except Exception:CODE
LOWlmdeploy/vl/model/base.py101 except Exception as e:CODE
LOWlmdeploy/vl/media/time_series.py42 except Exception as e:CODE
LOWlmdeploy/vl/media/connection.py50 except Exception as e:CODE
LOWlmdeploy/turbomind/turbomind.py817 except Exception as e:CODE
LOWlmdeploy/serve/parsers/_openai_harmony.py127 except Exception:CODE
LOWlmdeploy/serve/core/health.py114 except Exception as e:CODE
LOWlmdeploy/serve/core/async_engine.py303 except Exception:CODE
LOWlmdeploy/serve/core/async_engine.py315 except Exception as e:CODE
LOWlmdeploy/serve/core/async_engine.py441 except Exception:CODE
LOWlmdeploy/serve/core/async_engine.py449 except Exception:CODE
LOWlmdeploy/serve/core/async_engine.py465 except Exception as e:CODE
LOWlmdeploy/serve/core/async_engine.py565 except Exception:CODE
LOWlmdeploy/serve/proxy/streaming_response.py54 except Exception:CODE
LOWlmdeploy/serve/proxy/proxy.py200 except Exception as e: # noqaCODE
LOWlmdeploy/serve/proxy/proxy.py814 except Exception as e:CODE
LOWlmdeploy/serve/proxy/proxy.py832 except Exception as e:CODE
LOWlmdeploy/serve/proxy/proxy.py850 except Exception as e:CODE
LOWlmdeploy/serve/managers/session_manager.py95 except Exception as e:CODE
LOWlmdeploy/serve/utils/request_cleanup.py18 except Exception:CODE
LOWlmdeploy/serve/utils/request_cleanup.py37 except Exception:CODE
LOWlmdeploy/serve/anthropic/endpoints/messages.py237 except Exception as err:CODE
LOWlmdeploy/serve/openai/launch_server.py24 except Exception:CODE
LOWlmdeploy/serve/openai/launch_server.py67 except Exception:CODE
156 more matches not shown…
Deep Nesting228 hits · 214 pts
SeverityFileLineSnippetContext
LOWsetup.py58CODE
LOWsetup.py74CODE
LOWsetup.py115CODE
LOWbenchmark/benchmark_parser.py81CODE
LOWbenchmark/benchmark_chat_completion.py266CODE
LOWbenchmark/benchmark_chat_completion.py448CODE
LOWbenchmark/benchmark_chat_completion.py1005CODE
LOWbenchmark/benchmark_guided.py527CODE
LOWbenchmark/benchmark_generate.py203CODE
LOWbenchmark/benchmark_generate.py280CODE
LOWbenchmark/profile_restful_api.py159CODE
LOWbenchmark/profile_restful_api.py237CODE
LOWbenchmark/profile_restful_api.py345CODE
LOWbenchmark/profile_restful_api.py1186CODE
LOWlmdeploy/tokenizer.py152CODE
LOWlmdeploy/utils.py394CODE
LOWlmdeploy/utils.py420CODE
LOWlmdeploy/utils.py542CODE
LOWlmdeploy/archs.py56CODE
LOWlmdeploy/archs.py95CODE
LOWlmdeploy/archs.py168CODE
LOWlmdeploy/metrics/metrics_processor.py45CODE
LOWlmdeploy/metrics/stats.py146CODE
LOWlmdeploy/lite/apis/auto_awq.py18CODE
LOWlmdeploy/lite/apis/smooth_quant.py18CODE
LOWlmdeploy/lite/apis/calibrate.py201CODE
LOWlmdeploy/lite/apis/calibrate.py233CODE
LOWlmdeploy/lite/utils/calib_dataloader.py14CODE
LOWlmdeploy/lite/utils/memory_efficient.py197CODE
LOWlmdeploy/lite/utils/batch_split.py7CODE
LOWlmdeploy/cli/entrypoint.py10CODE
LOWlmdeploy/cli/chat.py72CODE
LOWlmdeploy/cli/utils.py14CODE
LOWlmdeploy/cli/utils.py832CODE
LOWlmdeploy/vl/model/internvl.py22CODE
LOWlmdeploy/vl/model/internvl.py238CODE
LOWlmdeploy/vl/model/molmo.py129CODE
LOWlmdeploy/vl/model/molmo.py151CODE
LOWlmdeploy/vl/model/preprocess_utils.py207CODE
LOWlmdeploy/vl/model/llava.py305CODE
LOWlmdeploy/vl/model/builder.py35CODE
LOWlmdeploy/vl/model/qwen3_5.py114CODE
LOWlmdeploy/vl/model/utils.py29CODE
LOWlmdeploy/vl/model/internvl3_hf.py57CODE
LOWlmdeploy/vl/model/qwen2.py125CODE
LOWlmdeploy/vl/model/base.py123CODE
LOWlmdeploy/vl/model/base.py364CODE
LOWlmdeploy/vl/model/minicpmv.py200CODE
LOWlmdeploy/vl/media/time_series.py31CODE
LOWlmdeploy/turbomind/checkpoint.py188CODE
LOWlmdeploy/turbomind/tokenizer_info.py133CODE
LOWlmdeploy/turbomind/linear.py109CODE
LOWlmdeploy/turbomind/linear.py160CODE
LOWlmdeploy/turbomind/linear.py121CODE
LOWlmdeploy/turbomind/linear.py171CODE
LOWlmdeploy/turbomind/converter.py29CODE
LOWlmdeploy/turbomind/converter.py154CODE
LOWlmdeploy/turbomind/supported_models.py35CODE
LOWlmdeploy/turbomind/turbomind.py687CODE
LOWlmdeploy/turbomind/builders/_base.py227CODE
168 more matches not shown…
AI Structural Patterns131 hits · 128 pts
SeverityFileLineSnippetContext
LOWbenchmark/profile_restful_api.py1166CODE
LOWlmdeploy/model.py116CODE
LOWlmdeploy/model.py209CODE
LOWlmdeploy/model.py585CODE
LOWlmdeploy/api.py83CODE
LOWlmdeploy/utils.py638CODE
LOWlmdeploy/lite/apis/auto_awq.py41CODE
LOWlmdeploy/lite/apis/smooth_quant.py18CODE
LOWlmdeploy/lite/apis/gptq.py11CODE
LOWlmdeploy/lite/apis/calibrate.py283CODE
LOWlmdeploy/lite/utils/memory_efficient.py124CODE
LOWlmdeploy/vl/model/base.py238CODE
LOWlmdeploy/turbomind/turbomind.py687CODE
LOWlmdeploy/turbomind/models/utils.py225CODE
LOWlmdeploy/serve/core/async_engine.py479CODE
LOWlmdeploy/serve/proxy/proxy.py884CODE
LOWlmdeploy/serve/proxy/proxy.py325CODE
LOWlmdeploy/serve/openai/api_server.py1505CODE
LOWlmdeploy/serve/openai/api_client.py90CODE
LOWlmdeploy/serve/openai/api_client.py175CODE
LOWlmdeploy/pytorch/config.py414CODE
LOWlmdeploy/pytorch/model_inputs.py179CODE
LOWlmdeploy/pytorch/model_inputs.py275CODE
LOWlmdeploy/pytorch/model_inputs.py406CODE
LOWlmdeploy/pytorch/messages.py430CODE
LOWlmdeploy/pytorch/messages.py547CODE
LOWlmdeploy/pytorch/kernels/cuda/pagedattention.py756CODE
LOWlmdeploy/pytorch/kernels/cuda/w8a8_fused_moe.py288CODE
LOWlmdeploy/pytorch/kernels/cuda/fused_lora.py159CODE
LOWlmdeploy/pytorch/kernels/cuda/blocked_fp8_fused_moe.py336CODE
LOWlmdeploy/pytorch/kernels/cuda/fused_moe.py543CODE
LOWlmdeploy/pytorch/kernels/cuda/flashattention.py475CODE
LOWlmdeploy/pytorch/kernels/cuda/utils.py49CODE
LOWlmdeploy/pytorch/kernels/cuda/gated_delta_rule.py256CODE
LOWlmdeploy/pytorch/kernels/cuda/gated_delta_rule.py575CODE
LOWlmdeploy/pytorch/kernels/cuda/w8a8_triton_kernels.py306CODE
LOWlmdeploy/pytorch/kernels/cuda/causal_conv1d.py212CODE
LOWlmdeploy/pytorch/kernels/cuda/rms_norm.py18CODE
LOWlmdeploy/pytorch/kernels/cuda/flatten_kv_cache.py397CODE
LOWlmdeploy/pytorch/nn/attention.py24CODE
LOWlmdeploy/pytorch/nn/rotary_embedding.py177CODE
LOWlmdeploy/pytorch/nn/nsa.py44CODE
LOWlmdeploy/pytorch/nn/linear/blocked_fp8.py19CODE
LOWlmdeploy/pytorch/nn/linear/blocked_fp8.py168CODE
LOWlmdeploy/pytorch/nn/linear/blocked_fp8.py276CODE
LOWlmdeploy/pytorch/nn/linear/__init__.py18CODE
LOWlmdeploy/pytorch/nn/linear/__init__.py103CODE
LOWlmdeploy/pytorch/nn/linear/__init__.py147CODE
LOWlmdeploy/pytorch/nn/linear/__init__.py184CODE
LOWlmdeploy/pytorch/nn/linear/__init__.py258CODE
LOWlmdeploy/pytorch/nn/linear/default.py18CODE
LOWlmdeploy/pytorch/nn/linear/base.py114CODE
LOWlmdeploy/pytorch/nn/moe/blocked_fp8.py146CODE
LOWlmdeploy/pytorch/nn/moe/__init__.py11CODE
LOWlmdeploy/pytorch/strategies/ar_spec/model_agent.py190CODE
LOWlmdeploy/pytorch/strategies/ar/model_inputs.py127CODE
LOWlmdeploy/pytorch/backends/attention.py32CODE
LOWlmdeploy/pytorch/backends/attention.py114CODE
LOWlmdeploy/pytorch/backends/rotary_embedding.py79CODE
LOWlmdeploy/pytorch/backends/gated_delta_rule.py40CODE
71 more matches not shown…
Over-Commented Block99 hits · 99 pts
SeverityFileLineSnippetContext
LOWCMakeLists.txt1# Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved.COMMENT
LOWbenchmark/benchmark_decode.py61if __name__ == '__main__':COMMENT
LOWbenchmark/benchmark_decode.py81 # Decoded 15991314 tokens in 242.7 seconds, 65893.38488718234 tokens/s.COMMENT
LOWlmdeploy/pytorch/utils.py161 # When using `remote_code` in HF components like tokenizer or configCOMMENT
LOWlmdeploy/pytorch/strategies/dllm/step_inputs.py1# Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWlmdeploy/pytorch/strategies/ar_spec/step_inputs.py1# Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWlmdeploy/pytorch/strategies/ar/step_inputs.py1# Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWtests/csrc/CMakeLists.txt1# Copyright (c) 2021-2023, NVIDIA CORPORATION. All rights reserved.COMMENT
LOWtests/csrc/unittests/unittest_utils.h21#include <float.h> // FLT_MAXCOMMENT
LOWtests/csrc/unittests/CMakeLists.txt1# Copyright (c) 2021-2023, NVIDIA CORPORATION. All rights reserved.COMMENT
LOWtests/csrc/unittests/gtest_utils.h1#include <algorithm> // std::fill_nCOMMENT
LOWtests/test_lmdeploy/test_model.py241 add_generation_prompt=True,COMMENT
LOWtests/test_lmdeploy/test_model.py261# 'role': 'system',COMMENT
LOWtests/pytorch/test_internvl_lora.py21COMMENT
LOWdocs/zh_cn/conf.py1#COMMENT
LOWdocs/zh_cn/conf.py121# The language for content autogenerated by Sphinx. Refer to documentationCOMMENT
LOWdocs/zh_cn/conf.py161 'use_issues_button': True,COMMENT
LOWdocs/zh_cn/conf.py181COMMENT
LOWdocs/zh_cn/conf.py201# defined by theme itself. Builtin themes are using these templates byCOMMENT
LOWdocs/zh_cn/conf.py221 # 'pointsize': '10pt',COMMENT
LOWdocs/en/conf.py1#COMMENT
LOWdocs/en/conf.py121# The language for content autogenerated by Sphinx. Refer to documentationCOMMENT
LOWdocs/en/conf.py161 'use_repository_button': True,COMMENT
LOWdocs/en/conf.py181# Enable ::: for my_stCOMMENT
LOWdocs/en/conf.py201# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',COMMENT
LOWdocs/en/conf.py221COMMENT
LOWsrc/CMakeLists.txt1# Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved.COMMENT
LOWsrc/turbomind/turbomind.h1// Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWsrc/turbomind/CMakeLists.txt1# Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/CMakeLists.txt1# Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/attention/impl_simt.h1// Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/attention/iterator_sm80.h1// Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/attention/impl_884.h41 static constexpr int V_N = HeadDim / OP_N; // 8COMMENT
LOWsrc/turbomind/kernels/core/floating_point.h141// FloatingPoint<5, 2>::max_denormal;COMMENT
LOWsrc/turbomind/kernels/core/common.h1// Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/core/common.h21#endifCOMMENT
LOWsrc/turbomind/kernels/core/common.h41#if defined(__CUDACC_RTC__) || (defined(__clang__) && defined(__CUDA__))COMMENT
LOWsrc/turbomind/kernels/core/common.h61#define TM_HOST __forceinline__ __host__COMMENT
LOWsrc/turbomind/kernels/gemm/gemm_universal_sm90_v4.h1#pragma onceCOMMENT
LOWsrc/turbomind/kernels/gemm/gemm_universal_sm90_v4.h21COMMENT
LOWsrc/turbomind/kernels/gemm/iterator_sm70.h1// Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/gemm/tiled_mma.h1// Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/gemm/CMakeLists.txt121 # GIT_REPOSITORY https://github.com/NVIDIA/nvbench.gitCOMMENT
LOWsrc/turbomind/kernels/gemm/kernel_impl.h1// Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/gemm/gemm_universal_sm90_v3.h1#pragma onceCOMMENT
LOWsrc/turbomind/kernels/gemm/gemm_universal_sm90_v3.h21COMMENT
LOWsrc/turbomind/kernels/gemm/mainloop_sm80_v2.h1// Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/gemm/gemm_universal.h1// Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/gemm/iterator_sm80.h1// Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/gemm/matrix_ptr.h101COMMENT
LOWsrc/turbomind/kernels/gemm/gemm_universal_sm90_v2.h1#pragma onceCOMMENT
LOWsrc/turbomind/kernels/gemm/gemm_universal_sm90_v2.h21#include "src/turbomind/core/data_type.h"COMMENT
LOWsrc/turbomind/kernels/gemm/smem_copy.h181 }COMMENT
LOWsrc/turbomind/kernels/gemm/gemm_universal_sm90.h1#pragma onceCOMMENT
LOWsrc/turbomind/kernels/gemm/gemm_universal_sm90_v5.h1#pragma onceCOMMENT
LOWsrc/turbomind/kernels/gemm/gemm_universal_sm90_v5.h21COMMENT
LOWsrc/turbomind/kernels/gemm/mainloop_sm70.h1// Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/gemm/kernel_impl_sm90.h1// Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/gemm/epilogue.h1// Copyright (c) OpenMMLab. All rights reserved.COMMENT
LOWsrc/turbomind/kernels/gemm/test/testbed_v3.h1COMMENT
39 more matches not shown…
Modern Structural Boilerplate38 hits · 38 pts
SeverityFileLineSnippetContext
LOWlmdeploy/__init__.py10__all__ = [CODE
LOWlmdeploy/lite/utils/__init__.py19__all__ = [CODE
LOWlmdeploy/lite/quantization/__init__.py6__all__ = ['WeightQuantizer', 'ActivationObserver', 'KVCacheObserver', 'CalibrationContext', 'CalibrationContextV2']CODE
LOWlmdeploy/lite/quantization/weight/__init__.py4__all__ = ['WeightQuantizer']CODE
LOWlmdeploy/lite/quantization/activation/__init__.py4__all__ = ['ActivationObserver', 'KVCacheObserver']CODE
LOWlmdeploy/lite/quantization/modules/__init__.py4__all__ = ['WeightOnlyQLinear']CODE
LOWlmdeploy/lite/model/__init__.py9__all__ = ['MODELS']CODE
LOWlmdeploy/cli/__init__.py4__all__ = ['run']CODE
LOWlmdeploy/vl/__init__.py13__all__ = [CODE
LOWlmdeploy/turbomind/tokenizer_info.py23logger = logging.getLogger(__name__)CODE
LOWlmdeploy/turbomind/__init__.py54__all__ = ['TurboMind', 'update_parallel_config']CODE
LOWlmdeploy/turbomind/builders/ffn.py18__all__ = [CODE
LOWlmdeploy/turbomind/builders/__init__.py17__all__ = [CODE
LOWlmdeploy/serve/__init__.py6__all__ = [CODE
LOWlmdeploy/serve/parsers/__init__.py6__all__ = ['ResponseParser', 'ResponseParserManager', 'GptOssResponseParser', 'validate_parser_names']CODE
LOWlmdeploy/serve/parsers/tool_parser/__init__.py12__all__ = [CODE
LOWlmdeploy/serve/parsers/reasoning_parser/__init__.py5__all__ = [CODE
LOWlmdeploy/serve/core/__init__.py6__all__ = ['AsyncEngine', 'EngineHealthMonitor', 'VLAsyncEngine']CODE
LOWlmdeploy/serve/managers/__init__.py4__all__ = ['Session', 'SessionManager']CODE
LOWlmdeploy/serve/processors/__init__.py4__all__ = ['MultimodalProcessor']CODE
LOWlmdeploy/serve/anthropic/__init__.py6__all__ = ['create_anthropic_router']CODE
LOWlmdeploy/serve/openai/responses/__init__.py13__all__ = [CODE
LOWlmdeploy/pytorch/configurations/__init__.py7__all__ = []CODE
LOWlmdeploy/pytorch/kernels/__init__.py10__all__ = [CODE
LOWlmdeploy/pytorch/kernels/cuda/__init__.py14__all__ = [CODE
LOWlmdeploy/pytorch/kernels/cuda/turbo_quant.py14logger = logging.getLogger(__name__)CODE
LOWlmdeploy/pytorch/kernels/default/__init__.py5__all__ = [CODE
LOWlmdeploy/pytorch/kernels/dlinfer/__init__.py13__all__ = [CODE
LOWlmdeploy/pytorch/models/__init__.py4__all__ = ['QLinear', 'QRMSNorm']CODE
LOWlmdeploy/pytorch/disagg/backend/__init__.py18__all__ = ['DLSlimeBackend', 'MooncakeBackend']CODE
LOWlmdeploy/pytorch/spec_decode/__init__.py42__all__ = ['build_spec_agent']CODE
LOWlmdeploy/pytorch/multimodal/__init__.py4__all__ = ['MultiModalData']CODE
LOWlmdeploy/pytorch/paging/__init__.py4__all__ = ['Scheduler']CODE
LOWlmdeploy/pytorch/engine/__init__.py5__all__ = ['Engine', 'EngineInstance']CODE
LOWlmdeploy/pytorch/engine/executor/base.py361 def update_configs(self) -> None:CODE
LOWlmdeploy/pytorch/devices/__init__.py4__all__ = ['DeviceContext', 'DefaultContext', 'get_device_manager']CODE
LOWautotest/utils/config_utils.py871def set_device_env_variable(worker_id: str | None, parallel_config: dict[str, int] | None = None) -> None:CODE
LOWscripts/test_turbomind_model.py59def _set_hf_cache(path: str) -> None:CODE
Redundant / Tautological Comments13 hits · 22 pts
SeverityFileLineSnippetContext
LOWbenchmark/profile_restful_api.py307 # Check if this chunk contains contentCOMMENT
LOWbenchmark/profile_restful_api.py519 # Check if the cache file already existsCOMMENT
LOWlmdeploy/model.py640 # Verify if the model can perform apply_chat_template with different roles.COMMENT
LOWlmdeploy/lite/apis/calibrate.py153 # Check if the child is an instance of the given layer typeCOMMENT
LOWlmdeploy/lite/apis/calibrate.py161 # Check if the child contains the target module typeCOMMENT
LOWlmdeploy/lite/apis/calibrate.py164 # Check if the child matches the head nameCOMMENT
LOWlmdeploy/lite/utils/batch_split.py102 # Check if the current element is a past key-value pair.COMMENT
LOWlmdeploy/serve/processors/multimodal.py241 # Check if multimodal input existsCOMMENT
LOWlmdeploy/serve/openai/api_server.py334 # Check if token_id is within the vocab sizeCOMMENT
LOWlmdeploy/pytorch/engine/executor/ray_executor.py574 # Check if all elements in ips are present in worker_ips and vice versa (ignoring order)COMMENT
LOWautotest/utils/run_restful_chat.py92 # Check if process is still runningCOMMENT
LOWautotest/utils/run_restful_chat.py1265 # Check if process is still runningCOMMENT
LOWautotest/utils/ray_distributed_utils.py58 # Check if port is openCOMMENT
Self-Referential Comments11 hits · 19 pts
SeverityFileLineSnippetContext
MEDIUMlmdeploy/api.py94 """This function is deprecated and no longer available.STRING
MEDIUMlmdeploy/api.py107 """This function is deprecated and no longer available.STRING
MEDIUMlmdeploy/lite/quantization/modules/linear.py16 """This class implements weight only quantization linear.STRING
MEDIUMlmdeploy/turbomind/tokenizer_info.py3"""This module provides the tokenizer info class to handle the tokenizerSTRING
MEDIUMlmdeploy/serve/openai/api_server.py232 # Define an async function that always returns successCOMMENT
MEDIUMlmdeploy/pytorch/ray.py127 # Create a new placement groupCOMMENT
MEDIUMlmdeploy/pytorch/tools/utils.py165 # Create a clean table-like formatCOMMENT
MEDIUMlmdeploy/pytorch/models/llama4.py751 """This function is used to fetch the first embedding layer to activateSTRING
MEDIUMlmdeploy/pytorch/models/gemma3_vl.py240 # Create a global causal mask.STRING
MEDIUMlmdeploy/pytorch/models/gemma3_vl.py261 # Create a local causal mask with sliding window (1024).STRING
MEDIUM…_lite/test_quantization/test_utils/test_cal_qparams.py18 # Create a dummy tensorCOMMENT
Structural Annotation Overuse7 hits · 12 pts
SeverityFileLineSnippetContext
LOW…rve/openai/chat_completions/test_delta_tool_call_id.py18 # Step 1: feed partial JSON with nameCOMMENT
LOW…rve/openai/chat_completions/test_delta_tool_call_id.py27 # Step 2: feed final chunk with argumentsCOMMENT
LOW…ts/pytorch/spec_decode/test_guided_spec_integration.py481 # Step 2: original should be at correct stateCOMMENT
LOWdocs/en/advance/update_weights.md5## Step 1: Launch serverCOMMENT
LOWdocs/en/advance/update_weights.md13## Step 2: Offloads weights & kv cacheCOMMENT
LOWdocs/en/advance/update_weights.md38## Step 3: Update weightsCOMMENT
LOWdocs/en/advance/update_weights.md71## Step 4: Wakeup serverCOMMENT
Synthetic Comment Markers1 hit · 11 pts
SeverityFileLineSnippetContext
HIGHlmdeploy/pytorch/kernels/cuda/fused_noaux_tc.py98# Wrappers and Benchmarking Logic (Kept exactly as requested)COMMENT
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHlmdeploy/api.py23Create a pipeline for inference. Args: model_path: the path of a model. It could be one of the following opSTRING
HIGHlmdeploy/lite/utils/memory_efficient.py46Finds modules in model that return given value. Args: model (nn.Module): Model to inspect value (stSTRING
Modern AI Meta-Vocabulary3 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMlmdeploy/pytorch/models/utils/cudagraph.py28 window_size=(-1, -1), # -1 means infinite context windowCODE
MEDIUMautotest/tools/pipeline/mllm_case.py370 # In-context few-shot learningCOMMENT
MEDIUMdocs/en/multi_modal/vl_pipeline.md66### Set context window sizeCOMMENT
Cross-Language Confusion2 hits · 8 pts
SeverityFileLineSnippetContext
HIGHlmdeploy/turbomind/builders/ffn.py57 act_type == SiLU && (int4 || mxfp4 || fp8 || moe) && !(fp8 && SM90)STRING
HIGHlmdeploy/turbomind/builders/ffn.py57 act_type == SiLU && (int4 || mxfp4 || fp8 || moe) && !(fp8 && SM90)STRING
Verbosity Indicators4 hits · 6 pts
SeverityFileLineSnippetContext
LOWlmdeploy/serve/core/async_engine.py801 The purpose of this function is to allow users to choose whether to use the synchronous interface or theSTRING
LOW…rve/openai/chat_completions/test_delta_tool_call_id.py18 # Step 1: feed partial JSON with nameCOMMENT
LOW…rve/openai/chat_completions/test_delta_tool_call_id.py27 # Step 2: feed final chunk with argumentsCOMMENT
LOW…ts/pytorch/spec_decode/test_guided_spec_integration.py481 # Step 2: original should be at correct stateCOMMENT
AI Slop Vocabulary2 hits · 3 pts
SeverityFileLineSnippetContext
LOWlmdeploy/pytorch/paging/scheduler.py749 # No need to evict, just return True.COMMENT
LOWlmdeploy/pytorch/paging/scheduler.py752 # Enough free blocks, just return True.COMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/pytorch/engine/test_zmq_rpc.py65 # Example usageCOMMENT
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWlmdeploy/model.py715 messages = [{'role': 'user', 'content': 'placeholder'}, {'role': 'assistant', 'content': 'sentinel'}]CODE