Repository Analysis

mlc-ai/mlc-llm

Universal LLM Deployment Engine with ML Compilation

20.0 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of mlc-ai/mlc-llm, a Python project with 22,947 GitHub stars. SynthScan v2.0 examined 84,938 lines of code across 550 source files, recording 871 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 20.0 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).

20.0
Adjusted Score
20.0
Raw Score
100%
Time Factor
2026-07-13
Last Push
22.9K
Stars
Python
Language
84.9K
Lines of Code
550
Files
871
Pattern Hits
2026-07-14
Scan Date
0.24
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 131MEDIUM 102LOW 638

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 871 distinct pattern matches across 18 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.

Cross-File Repetition106 hits · 530 pts
SeverityFileLineSnippetContext
HIGHpython/mlc_llm/nn/__init__.py0common `nn.modules` used to define llms in this project.STRING
HIGHpython/mlc_llm/model/phi3/__init__.py0common `nn.modules` used to define llms in this project.STRING
HIGHpython/mlc_llm/model/vision/__init__.py0common `nn.modules` used to define llms in this project.STRING
HIGHpython/mlc_llm/quantization/group_quantization.py0quantize model with awq quantization. parameters ---------- model : nn.module the non-quantized nn.module. quant_map : qSTRING
HIGHpython/mlc_llm/quantization/ft_quantization.py0quantize model with awq quantization. parameters ---------- model : nn.module the non-quantized nn.module. quant_map : qSTRING
HIGHpython/mlc_llm/quantization/block_scale_quantization.py0quantize model with awq quantization. parameters ---------- model : nn.module the non-quantized nn.module. quant_map : qSTRING
HIGHpython/mlc_llm/quantization/awq_quantization.py0quantize model with awq quantization. parameters ---------- model : nn.module the non-quantized nn.module. quant_map : qSTRING
HIGHpython/mlc_llm/quantization/group_quantization.py0the visiting method for fastertransformer quantization of nn.module nodes. parameters ---------- name : str the name of STRING
HIGHpython/mlc_llm/quantization/per_tensor_quantization.py0the visiting method for fastertransformer quantization of nn.module nodes. parameters ---------- name : str the name of STRING
HIGHpython/mlc_llm/quantization/ft_quantization.py0the visiting method for fastertransformer quantization of nn.module nodes. parameters ---------- name : str the name of STRING
HIGHpython/mlc_llm/quantization/group_quantization.py0forward method for per-tensor quantized embedding layer. parameters ---------- x : nn.tensor the input tensor. returns -STRING
HIGHpython/mlc_llm/quantization/per_tensor_quantization.py0forward method for per-tensor quantized embedding layer. parameters ---------- x : nn.tensor the input tensor. returns -STRING
HIGHpython/mlc_llm/quantization/ft_quantization.py0forward method for per-tensor quantized embedding layer. parameters ---------- x : nn.tensor the input tensor. returns -STRING
HIGHpython/mlc_llm/quantization/awq_quantization.py0forward method for per-tensor quantized embedding layer. parameters ---------- x : nn.tensor the input tensor. returns -STRING
HIGHpython/mlc_llm/quantization/group_quantization.py0override to() such that we do not convert bias if there is an out_dtype. otherwise, we might run into dtype mismatch wheSTRING
HIGHpython/mlc_llm/quantization/per_tensor_quantization.py0override to() such that we do not convert bias if there is an out_dtype. otherwise, we might run into dtype mismatch wheSTRING
HIGHpython/mlc_llm/quantization/ft_quantization.py0override to() such that we do not convert bias if there is an out_dtype. otherwise, we might run into dtype mismatch wheSTRING
HIGHpython/mlc_llm/quantization/block_scale_quantization.py0override to() such that we do not convert bias if there is an out_dtype. otherwise, we might run into dtype mismatch wheSTRING
HIGHpython/mlc_llm/quantization/awq_quantization.py0override to() such that we do not convert bias if there is an out_dtype. otherwise, we might run into dtype mismatch wheSTRING
HIGHpython/mlc_llm/model/llama4/llama4_model.py0the embedding module that can be shared with the final lm_head. from qwen2embedding.STRING
HIGHpython/mlc_llm/model/olmo/olmo_model.py0the embedding module that can be shared with the final lm_head. from qwen2embedding.STRING
HIGHpython/mlc_llm/model/llama/llama_model.py0the embedding module that can be shared with the final lm_head. from qwen2embedding.STRING
HIGHpython/mlc_llm/model/llama4/llama4_model.py0the lm_head forwarding, which transposes the weight and multiplies with the input tensor.STRING
HIGHpython/mlc_llm/model/ministral3/ministral3_model.py0the lm_head forwarding, which transposes the weight and multiplies with the input tensor.STRING
HIGHpython/mlc_llm/model/cohere/cohere_model.py0the lm_head forwarding, which transposes the weight and multiplies with the input tensor.STRING
HIGHpython/mlc_llm/model/gemma/gemma_model.py0the lm_head forwarding, which transposes the weight and multiplies with the input tensor.STRING
HIGHpython/mlc_llm/model/olmo2/olmo2_model.py0the lm_head forwarding, which transposes the weight and multiplies with the input tensor.STRING
HIGHpython/mlc_llm/model/olmo/olmo_model.py0the lm_head forwarding, which transposes the weight and multiplies with the input tensor.STRING
HIGHpython/mlc_llm/model/phi3/phi3_model.py0the lm_head forwarding, which transposes the weight and multiplies with the input tensor.STRING
HIGHpython/mlc_llm/model/qwen2/qwen2_model.py0the lm_head forwarding, which transposes the weight and multiplies with the input tensor.STRING
HIGHpython/mlc_llm/model/minicpm/minicpm_model.py0the lm_head forwarding, which transposes the weight and multiplies with the input tensor.STRING
HIGHpython/mlc_llm/model/qwen3/qwen3_model.py0the lm_head forwarding, which transposes the weight and multiplies with the input tensor.STRING
HIGHpython/mlc_llm/model/nemotron/nemotron_model.py0the lm_head forwarding, which transposes the weight and multiplies with the input tensor.STRING
HIGHpython/mlc_llm/model/llama/llama_model.py0the lm_head forwarding, which transposes the weight and multiplies with the input tensor.STRING
HIGHpython/mlc_llm/model/llama4/llama4_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/llama/llama_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/ministral3/ministral3_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/cohere/cohere_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/starcoder2/starcoder2_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/gemma/gemma_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/olmo2/olmo2_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/internlm/internlm_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/gpt_neox/gpt_neox_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/gemma2/gemma2_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/mixtral/mixtral_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/olmo/olmo_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/phi3/phi3_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/phi3v/phi3v_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/phi/phi_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/gemma3/gemma3_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/qwen2/qwen2_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/qwen3/qwen3_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/qwen2_moe/qwen2_moe_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/qwen3_moe/qwen3_moe_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/minicpm/minicpm_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/stable_lm/stablelm_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/medusa/medusa_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/orion/orion_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/eagle/eagle_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
HIGHpython/mlc_llm/model/qwen/qwen_loader.py0this file specifies how mlc's rwkv6 parameter maps from other formats, for example huggingface pytorch, huggingface safeSTRING
46 more matches not shown…
Hyper-Verbose Identifiers215 hits · 227 pts
SeverityFileLineSnippetContext
LOWpython/mlc_llm/__init__.py14def _create_socket_session_local_workers(num_workers):CODE
LOWpython/mlc_llm/base.py26def _debug_cuda_profiler_start() -> None:CODE
LOWpython/mlc_llm/base.py35def _debug_cuda_profiler_stop() -> None:CODE
LOWpython/mlc_llm/json_ffi/engine.py26 def get_request_stream_callback(self) -> Callable[[str], None]:CODE
LOWpython/mlc_llm/json_ffi/engine.py34 def _sync_request_stream_callback(self, chat_completion_stream_responses_json_str: str) -> None:CODE
LOWpython/mlc_llm/bench/request_processor.py71 def _sample_from_plain_request_records(CODE
LOWpython/mlc_llm/bench/request_processor.py94 def _sample_from_grouped_request_records(CODE
LOWpython/mlc_llm/bench/request_processor.py274 def generate_fake_warmup_requests(CODE
LOWpython/mlc_llm/bench/__main__.py34def _parse_num_concurrent_requests(num_str: Optional[str]) -> Optional[List[int]]: # noqa: UP006CODE
LOWpython/mlc_llm/bench/request_record.py116def _compute_metrics_statistics(CODE
LOWpython/mlc_llm/interface/gen_config.py28def apply_system_defaults_for_missing_fields(mlc_chat_config: MLCChatConfig) -> None:CODE
LOWpython/mlc_llm/interface/compile.py62def _apply_preproc_to_params_and_check_pipeline(CODE
LOWpython/mlc_llm/interface/calibrate.py106async def send_calibration_requests(CODE
LOWpython/mlc_llm/interface/convert_weight.py68def _merge_lora_adapter_with_base_model(base_source: Path, lora_adapter: Path) -> Iterator[Path]:CODE
LOWpython/mlc_llm/interface/router.py66 async def completion_stream_generator() -> AsyncGenerator[str, None]:CODE
LOWpython/mlc_llm/op/triton.py495def _compute_expert_id_per_block(CODE
LOWpython/mlc_llm/op/triton.py527 def tir_compute_expert_id_per_block(CODE
LOWpython/mlc_llm/op/moe_misc.py35def _gating_topk_init_local_top_k(k_val, dtype, local_top_k, local_top_k_index):CODE
LOWpython/mlc_llm/op/moe_misc.py42def _gating_topk_process_value(k_val, x, local_top_k, local_top_k_index, vi, vk):CODE
LOWpython/mlc_llm/op/moe_misc.py162 def _get_topk_softmax_norm_func(k_val: int):CODE
LOWpython/mlc_llm/op/moe_misc.py238def group_limited_greedy_topk(CODE
LOWpython/mlc_llm/op/moe_misc.py306 def group_limited_mask_scores(CODE
LOWpython/mlc_llm/op/mrope.py30def _split_indices_from_sizes(sizes: Sequence[int]) -> List[int]: # noqa: UP006CODE
LOWpython/mlc_llm/op/mrope.py123def apply_multimodal_rotary_pos_emb(CODE
LOWpython/mlc_llm/op/mrope.py263def _build_sequence_position_ids(CODE
LOWpython/mlc_llm/op/ft_gemm.py11def faster_transformer_dequantize_gemm(CODE
LOWpython/mlc_llm/op/ft_gemm.py95def faster_transformer_moe_gemm(CODE
LOWpython/mlc_llm/compiler_pass/fuse_add_norm.py83def _get_add_rms_norm_prefill(hidden_size: int, eps: float, TX: int, in_dtype: str):CODE
LOWpython/mlc_llm/compiler_pass/attach_logit_processor.py41def _get_apply_logit_bias_inplace_cpu():CODE
LOWpython/mlc_llm/compiler_pass/attach_logit_processor.py43 def _apply_logit_bias_inplace(CODE
LOWpython/mlc_llm/compiler_pass/attach_logit_processor.py72def _get_apply_logit_bias_inplace(target: tvm.target.Target):CODE
LOWpython/mlc_llm/compiler_pass/attach_logit_processor.py79 def _apply_logit_bias_inplace(CODE
LOWpython/mlc_llm/compiler_pass/attach_logit_processor.py112def _get_apply_penalty_inplace_cpu():CODE
LOWpython/mlc_llm/compiler_pass/attach_logit_processor.py156def _get_apply_penalty_inplace(target: tvm.target.Target):CODE
LOWpython/mlc_llm/compiler_pass/attach_logit_processor.py210def _get_apply_bitmask_inplace_cpu():CODE
LOWpython/mlc_llm/compiler_pass/attach_logit_processor.py246def _get_apply_bitmask_inplace(target: tvm.target.Target):CODE
LOWpython/mlc_llm/compiler_pass/attach_sampler.py69def _attach_multinomial_sampling_func(bb: relax.BlockBuilder):CODE
LOWpython/mlc_llm/compiler_pass/attach_sampler.py151def _attach_sample_with_top_p(bb: relax.BlockBuilder):CODE
LOWpython/mlc_llm/compiler_pass/attach_sampler.py229def _attach_renormalize_by_top_p(bb: relax.BlockBuilder, target: tvm.target.Target):CODE
LOW…/mlc_llm/compiler_pass/attach_spec_decode_aux_funcs.py74def _add_scatter_hidden_states(bb: BlockBuilder, tensor_parallel_shards: int, dtype: str):CODE
LOW…/mlc_llm/compiler_pass/attach_spec_decode_aux_funcs.py100def _add_gather_hidden_states(bb: BlockBuilder, tensor_parallel_shards: int, dtype: str):CODE
LOW…c_llm/compiler_pass/attach_softmax_with_temperature.py101def _get_lse_and_softmax_func(target: tvm.target.Target, chunk_size: int, active_vocab_size: int):CODE
LOW…hon/mlc_llm/compiler_pass/pipeline_parallel_rewrite.py249 def _prepare_stage_func_params_and_args(CODE
LOW…hon/mlc_llm/compiler_pass/pipeline_parallel_rewrite.py368def _analyze_required_func_params(CODE
LOW…on/mlc_llm/compiler_pass/dispatch_kv_cache_creation.py150 def create_tir_paged_kv_cache(CODE
LOW…on/mlc_llm/compiler_pass/dispatch_kv_cache_creation.py188 def create_flashinfer_paged_kv_cache(CODE
LOWpython/mlc_llm/protocol/conversation_protocol.py229def _strip_reasoning_in_history(CODE
LOWpython/mlc_llm/protocol/conversation_protocol.py255def _combine_consecutive_messages(messages: List[Any]) -> List[Any]: # noqa: UP006CODE
LOWpython/mlc_llm/protocol/mlc_chat_config.py65 def get_system_defaults_for_missing_fields(self) -> Dict[str, Any]: # noqa: UP006CODE
LOWpython/mlc_llm/protocol/openai_api_protocol.py366 def check_function_call_usage(self, conv_template: Conversation) -> None:CODE
LOWpython/mlc_llm/protocol/openai_api_protocol.py450def openai_api_get_unsupported_fields(CODE
LOWpython/mlc_llm/protocol/error_protocol.py33async def bad_request_error_handler(_request: fastapi.Request, e: BadRequestError):CODE
LOWpython/mlc_llm/cli/package.py26 def _parse_mlc_llm_source_dir(path: str) -> Path:CODE
LOWpython/mlc_llm/cli/delivery.py219def _generate_model_delivery_diff(CODE
LOWpython/mlc_llm/contrib/embeddings/openai.py146 async def _aget_len_safe_embeddings(CODE
LOWpython/mlc_llm/quantization/per_tensor_quantization.py246 def _compute_quantized_tensor(weight: te.Tensor, scale: Optional[te.Tensor]) -> te.Tensor:CODE
LOWpython/mlc_llm/quantization/model_quantization.py20def make_quantization_functions(CODE
LOWpython/mlc_llm/quantization/block_scale_quantization.py735def broadcast_activation_scale(CODE
LOWpython/mlc_llm/testing/debug_chat.py406 def _softmax_with_temperature(self, logits: np.ndarray, temperature: float):CODE
LOWpython/mlc_llm/testing/debug_chat.py415 def _apply_presence_and_freq_penalty(CODE
155 more matches not shown…
Decorative Section Separators56 hits · 204 pts
SeverityFileLineSnippetContext
MEDIUMversion.py16# ---------------------------------------------------COMMENT
MEDIUMversion.py27# ---------------------------------------------------COMMENT
MEDIUMpython/mlc_llm/op/triton.py173 # -----------------------------------------------------------COMMENT
MEDIUMpython/mlc_llm/op/triton.py186 # ----------------------------------------------------------COMMENT
MEDIUMpython/mlc_llm/op/triton.py218 # -----------------------------------------------------------COMMENT
MEDIUMpython/mlc_llm/op/triton.py261 # -----------------------------------------------------------COMMENT
MEDIUMpython/mlc_llm/model/qwen35/qwen35_model.py214# ============================================================================COMMENT
MEDIUMpython/mlc_llm/model/qwen35/qwen35_model.py216# ============================================================================COMMENT
MEDIUMpython/mlc_llm/model/qwen35/qwen35_model.py372# ============================================================================COMMENT
MEDIUMpython/mlc_llm/model/qwen35/qwen35_model.py374# ============================================================================COMMENT
MEDIUMpython/mlc_llm/model/qwen35/qwen35_model.py600# ============================================================================COMMENT
MEDIUMpython/mlc_llm/model/qwen35/qwen35_model.py602# ============================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py65# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py67# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py76# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py78# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py94# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py96# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py114# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py116# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py147# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py149# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py169# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py171# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py183# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py185# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py222# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py224# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py26# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py28# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py204# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py206# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py334# ===================================================================COMMENT
MEDIUMtests/python/serve/test_embedding_engine.py336# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py217# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py219# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py229# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py231# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py254# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py256# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py277# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py279# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py322# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py324# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py39# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py41# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py66# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py68# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py121# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py123# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py203# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py205# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py297# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py299# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py344# ===================================================================COMMENT
MEDIUMtests/python/serve/server/test_embedding_server.py346# ===================================================================COMMENT
Cross-Language Confusion (JS/TS)22 hits · 162 pts
SeverityFileLineSnippetContext
HIGHexamples/rest/nodejs/sample_client.js28 print('\n');CODE
HIGHexamples/rest/nodejs/sample_client.js32print(color.BOLD + "Without streaming:" + color.END);CODE
HIGHexamples/rest/nodejs/sample_client.js37print(color.GREEN + r.body.choices[0].message.content + color.END);CODE
HIGHexamples/rest/nodejs/sample_client.js38print('\n');CODE
HIGHexamples/rest/nodejs/sample_client.js41print(color.BOLD + "Reset chat" + color.END);CODE
HIGHexamples/rest/nodejs/sample_client.js52print( color.BOLD + "With streaming:" + color.END);CODE
HIGHexamples/rest/nodejs/sample_client.js62 print(color.GREEN + jsData.choices[0].delta.content + color.END);CODE
HIGHexamples/rest/nodejs/sample_client.js68 print(color.BOLD + "Runtime stats:" + color.END + txtresp.body);CODE
HIGHexamples/rest/nodejs/sample_langchain.ts26 print('\n');CODE
HIGHexamples/rest/nodejs/sample_langchain.ts51 print(color.BOLD + input + "..." + color.END);CODE
HIGHexamples/rest/nodejs/sample_langchain.ts55 print(color.GREEN + res.text + color.END);CODE
HIGHexamples/rest/nodejs/sample_langchain.ts58 print(color.BOLD + input + "..." + color.END);CODE
HIGHexamples/rest/nodejs/sample_langchain.ts62 print(color.GREEN + res.text + color.END);CODE
HIGHexamples/rest/nodejs/sample_langchain.ts71print(color.BOLD + "Query: " + color.END + color.BLUE + query + color.END);CODE
HIGHexamples/rest/nodejs/sample_langchain.ts74print(color.BOLD + "Response: " + color.END + color.GREEN + result.text + color.END);CODE
HIGHexamples/rest/nodejs/sample_openai.js32 print('\n');CODE
HIGHexamples/rest/nodejs/sample_openai.js37print(color.BOLD + "OpenAI chat completion example without streaming:" + color.END);CODE
HIGHexamples/rest/nodejs/sample_openai.js46print(color.GREEN + completion.data.choices[0].message.content + color.END)CODE
HIGHexamples/rest/nodejs/sample_openai.js53print(color.BOLD + "OpenAI chat completion example with streaming:" + color.END);CODE
HIGHexamples/rest/nodejs/sample_openai.js63 print(color.GREEN + parsed.choices[0].delta.content + color.END);CODE
HIGHexamples/rest/nodejs/sample_openai.js70 print(color.BOLD + "OpenAI completion example:" + color.END)CODE
HIGHexamples/rest/nodejs/sample_openai.js73 print(color.GREEN + res.data.choices[0].text + color.END);CODE
Unused Imports120 hits · 116 pts
SeverityFileLineSnippetContext
LOWpython/mlc_llm/__init__.py8CODE
LOWpython/mlc_llm/__init__.py8CODE
LOWpython/mlc_llm/__init__.py9CODE
LOWpython/mlc_llm/__init__.py10CODE
LOWpython/mlc_llm/__init__.py10CODE
LOWpython/mlc_llm/tokenizers/__init__.py3CODE
LOWpython/mlc_llm/tokenizers/__init__.py3CODE
LOWpython/mlc_llm/tokenizers/__init__.py4CODE
LOWpython/mlc_llm/json_ffi/__init__.py8CODE
LOWpython/mlc_llm/nn/__init__.py3CODE
LOWpython/mlc_llm/nn/__init__.py4CODE
LOWpython/mlc_llm/nn/__init__.py4CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py8CODE
LOWpython/mlc_llm/conversation_template/__init__.py38CODE
LOWpython/mlc_llm/op/mrope.py3CODE
LOWpython/mlc_llm/op/__init__.py3CODE
LOWpython/mlc_llm/op/__init__.py3CODE
LOWpython/mlc_llm/op/__init__.py4CODE
LOWpython/mlc_llm/op/__init__.py5CODE
LOWpython/mlc_llm/op/__init__.py6CODE
LOWpython/mlc_llm/op/__init__.py6CODE
LOWpython/mlc_llm/op/__init__.py6CODE
LOWpython/mlc_llm/op/__init__.py7CODE
LOWpython/mlc_llm/op/__init__.py8CODE
LOWpython/mlc_llm/op/__init__.py8CODE
LOWpython/mlc_llm/op/__init__.py8CODE
LOWpython/mlc_llm/op/__init__.py8CODE
LOWpython/mlc_llm/op/__init__.py14CODE
LOWpython/mlc_llm/op/__init__.py15CODE
LOWpython/mlc_llm/op/__init__.py15CODE
LOWpython/mlc_llm/compiler_pass/blas_dispatch.py8CODE
LOWpython/mlc_llm/compiler_pass/blas_dispatch.py9CODE
LOWpython/mlc_llm/compiler_pass/__init__.py3CODE
60 more matches not shown…
Deep Nesting106 hits · 104 pts
SeverityFileLineSnippetContext
LOWversion.py123CODE
LOWpython/setup.py87CODE
LOWpython/mlc_llm/__main__.py11CODE
LOWpython/mlc_llm/json_ffi/engine.py38CODE
LOWpython/mlc_llm/bench/dataset.py283CODE
LOWpython/mlc_llm/bench/dataset.py735CODE
LOWpython/mlc_llm/bench/evaluation/mmlu.py128CODE
LOWpython/mlc_llm/interface/gen_config.py89CODE
LOWpython/mlc_llm/interface/chat.py249CODE
LOWpython/mlc_llm/op/moe_misc.py63CODE
LOWpython/mlc_llm/op/moe_misc.py135CODE
LOWpython/mlc_llm/op/moe_misc.py453CODE
LOWpython/mlc_llm/op/moe_misc.py87CODE
LOWpython/mlc_llm/op/moe_misc.py162CODE
LOWpython/mlc_llm/op/moe_misc.py493CODE
LOWpython/mlc_llm/op/moe_misc.py89CODE
LOWpython/mlc_llm/op/moe_misc.py176CODE
LOWpython/mlc_llm/op/moe_matmul.py12CODE
LOWpython/mlc_llm/op/moe_matmul.py77CODE
LOWpython/mlc_llm/op/moe_matmul.py179CODE
LOWpython/mlc_llm/op/moe_matmul.py298CODE
LOWpython/mlc_llm/op/moe_matmul.py385CODE
LOWpython/mlc_llm/op/moe_matmul.py562CODE
LOWpython/mlc_llm/op/moe_matmul.py50CODE
LOWpython/mlc_llm/op/moe_matmul.py148CODE
LOWpython/mlc_llm/op/moe_matmul.py237CODE
LOWpython/mlc_llm/op/moe_matmul.py261CODE
LOWpython/mlc_llm/op/moe_matmul.py351CODE
LOWpython/mlc_llm/op/moe_matmul.py423CODE
LOWpython/mlc_llm/op/moe_matmul.py633CODE
LOWpython/mlc_llm/op/batch_spec_verify.py8CODE
LOWpython/mlc_llm/op/batch_spec_verify.py59CODE
LOWpython/mlc_llm/op/top_p_pivot.py11CODE
LOWpython/mlc_llm/op/top_p_pivot.py268CODE
LOWpython/mlc_llm/op/top_p_pivot.py53CODE
LOWpython/mlc_llm/op/top_p_pivot.py301CODE
LOWpython/mlc_llm/op/cutlass.py9CODE
LOWpython/mlc_llm/compiler_pass/fuse_add_norm.py14CODE
LOWpython/mlc_llm/compiler_pass/fuse_add_norm.py83CODE
LOWpython/mlc_llm/compiler_pass/fuse_add_norm.py22CODE
LOWpython/mlc_llm/compiler_pass/fuse_add_norm.py91CODE
LOW…thon/mlc_llm/compiler_pass/lift_global_buffer_alloc.py156CODE
LOW…hon/mlc_llm/compiler_pass/pipeline_parallel_rewrite.py35CODE
LOW…hon/mlc_llm/compiler_pass/pipeline_parallel_rewrite.py105CODE
LOWpython/mlc_llm/protocol/conversation_protocol.py120CODE
LOWpython/mlc_llm/cli/delivery.py219CODE
LOWpython/mlc_llm/cli/lib_delivery.py122CODE
LOWpython/mlc_llm/cli/model_metadata.py88CODE
LOWpython/mlc_llm/quantization/ft_quantization.py170CODE
LOWpython/mlc_llm/testing/debug_chat.py98CODE
LOWpython/mlc_llm/support/auto_device.py24CODE
LOWpython/mlc_llm/support/auto_device.py52CODE
LOWpython/mlc_llm/support/download_cache.py127CODE
LOWpython/mlc_llm/loader/huggingface_loader.py208CODE
LOWpython/mlc_llm/loader/huggingface_loader.py102CODE
LOWpython/mlc_llm/loader/utils.py55CODE
LOWpython/mlc_llm/loader/standard_loader.py23CODE
LOWpython/mlc_llm/loader/standard_loader.py69CODE
LOWpython/mlc_llm/model/qwen35/qwen35_loader.py36CODE
LOWpython/mlc_llm/model/qwen35/qwen35_model.py219CODE
46 more matches not shown…
Modern Structural Boilerplate85 hits · 86 pts
SeverityFileLineSnippetContext
LOWpython/mlc_llm/bench/request_processor.py27logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/bench/api_endpoint.py15logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/bench/__main__.py31logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/bench/request_record.py11logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/interface/package.py16logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/interface/compiler_flags.py11logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/interface/jit.py30logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/interface/gen_config.py21logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/interface/serve.py21logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/interface/compile.py24logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/interface/convert_weight.py27logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/op/attention.py13logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/compiler_pass/dispatch_triton_kernel.py15logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/compiler_pass/estimate_memory_usage.py13logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/compiler_pass/pipeline.py45logger = logging.getLogger(__name__)CODE
LOW…on/mlc_llm/compiler_pass/dispatch_kv_cache_creation.py13logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/cli/delivery.py19logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/cli/lib_delivery.py19logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/cli/model_metadata.py16logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/contrib/embeddings/openai.py15logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/quantization/group_quantization.py24logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/quantization/per_tensor_quantization.py27logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/quantization/ft_quantization.py25logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/quantization/block_scale_quantization.py19logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/support/config.py21logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/support/config.py111__all__ = ["ConfigBase", "ConfigOverrideBase"]CODE
LOWpython/mlc_llm/support/auto_config.py16logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/support/auto_device.py21logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/support/auto_weight.py10logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/support/download_cache.py24logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/support/tqdm.py39__all__ = ["redirect", "tqdm"]CODE
LOWpython/mlc_llm/support/auto_target.py22logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/loader/huggingface_loader.py23logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/loader/huggingface_loader.py228__all__ = ["HuggingFaceLoader"]CODE
LOWpython/mlc_llm/loader/utils.py17logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/loader/stats.py10logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/loader/mapping.py102__all__ = ["ExternMapping", "QuantizeMapping"]CODE
LOWpython/mlc_llm/model/qwen35/qwen35_model.py25logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/llama4/llama4_model.py23logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/ministral3/ministral3_model.py22logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/cohere/cohere_model.py20logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/starcoder2/starcoder2_model.py20logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/gemma/gemma_model.py18logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/olmo2/olmo2_model.py21logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/internlm/internlm_model.py20logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/gpt_neox/gpt_neox_model.py20logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/gemma2/gemma2_model.py19logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/mixtral/mixtral_model.py21logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/olmo/olmo_model.py22logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/phi3/phi3_model.py20logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/gemma3/gemma3_model.py19logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/qwen2/qwen2_model.py21logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/minicpm/minicpm_model.py23logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/stable_lm/stablelm_model.py20logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/medusa/medusa_model.py11logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/qwen3/qwen3_model.py21logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/orion/orion_model.py20logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/eagle/eagle_model.py18logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/qwen/qwen_model.py20logger = logging.getLogger(__name__)CODE
LOWpython/mlc_llm/model/vision/clip_vision.py26logger = logging.getLogger(__name__)CODE
25 more matches not shown…
Self-Referential Comments24 hits · 74 pts
SeverityFileLineSnippetContext
MEDIUMpython/setup.py76 """This class is needed in order to create OS specific wheels."""STRING
MEDIUMpython/mlc_llm/json_ffi/engine.py84 # Create the background engine-driving thread and start the loop.COMMENT
MEDIUMpython/mlc_llm/bench/request_processor.py85 # Create a new list so that the in-place shuffle does not mutate the input list.COMMENT
MEDIUMpython/mlc_llm/bench/request_processor.py109 # Create a new list so that the in-place shuffle does not mutate the input list.COMMENT
MEDIUMpython/mlc_llm/bench/dataset.py254 # Create a dummy ChatCompletionRequest.COMMENT
MEDIUMpython/mlc_llm/bench/dataset.py576 # Create a dummy ChatCompletionRequest.STRING
MEDIUM…hon/mlc_llm/compiler_pass/pipeline_parallel_rewrite.py164 # Create the param for the shape variables.COMMENT
MEDIUMpython/mlc_llm/cli/router.py11 # Define a custom argument type for a list of stringsCOMMENT
MEDIUMpython/mlc_llm/serve/sync_engine.py236 # Define the callback function for request generation resultsCOMMENT
MEDIUMpython/mlc_llm/serve/engine.py1343 # Create the request with the given id, input data, generationCOMMENT
MEDIUMpython/mlc_llm/serve/engine.py1350 # Create the unique async request stream of the request.COMMENT
MEDIUMpython/mlc_llm/serve/engine.py1867 # Create the request with the given id, input data, generationCOMMENT
MEDIUMtests/python/serve/test_serve_engine_spec.py77 # Define the callback function for request generation resultsCOMMENT
MEDIUMtests/python/serve/test_serve_engine_spec.py141 # Define the callback function for request generation resultsCOMMENT
MEDIUMtests/python/serve/test_serve_engine_spec.py213 # Define the callback class for request generation resultsCOMMENT
MEDIUMtests/python/serve/test_serve_engine_spec.py295 # Define the callback class for request generation resultsCOMMENT
MEDIUMtests/python/serve/test_serve_engine_spec.py477 # Define the callback function for request generation resultsCOMMENT
MEDIUMtests/python/serve/test_serve_engine_spec.py536 # Define the callback function for request generation resultsCOMMENT
MEDIUMtests/python/serve/test_serve_engine_spec.py602 # Define the callback function for request generation resultsCOMMENT
MEDIUMtests/python/serve/test_serve_sync_engine.py75 # Define the callback function for request generation resultsCOMMENT
MEDIUMtests/python/serve/test_serve_sync_engine.py137 # Define the callback class for request generation resultsCOMMENT
MEDIUMtests/python/serve/test_serve_sync_engine.py217 # Define the callback class for request generation resultsCOMMENT
MEDIUMtests/python/serve/test_serve_sync_engine.py297 # Define the callback class for request generation resultsCOMMENT
MEDIUMtests/python/serve/test_serve_sync_engine.py409 # Define the callback class for request generation resultsCOMMENT
Slop Phrases12 hits · 39 pts
SeverityFileLineSnippetContext
MEDIUMtests/python/serve/test_serve_engine_spec.py67 # Hyperparameters for tests (you can try different combinations).COMMENT
MEDIUMtests/python/serve/test_serve_engine_spec.py131 # Hyperparameters for tests (you can try different combinations).COMMENT
MEDIUMtests/python/serve/test_serve_engine_spec.py201 # Hyperparameters for tests (you can try different combinations)COMMENT
MEDIUMtests/python/serve/test_serve_engine_spec.py283 # Hyperparameters for tests (you can try different combinations)COMMENT
MEDIUMtests/python/serve/test_serve_engine_spec.py467 # Hyperparameters for tests (you can try different combinations).COMMENT
MEDIUMtests/python/serve/test_serve_engine_spec.py526 # Hyperparameters for tests (you can try different combinations).COMMENT
MEDIUMtests/python/serve/test_serve_engine_spec.py592 # Hyperparameters for tests (you can try different combinations).COMMENT
MEDIUMtests/python/serve/test_serve_sync_engine.py65 # Hyperparameters for tests (you can try different combinations).COMMENT
MEDIUMtests/python/serve/test_serve_sync_engine.py125 # Hyperparameters for tests (you can try different combinations)COMMENT
MEDIUMtests/python/serve/test_serve_sync_engine.py205 # Hyperparameters for tests (you can try different combinations)COMMENT
MEDIUMtests/python/serve/test_serve_sync_engine.py284 # Hyperparameters for tests (you can try different combinations)COMMENT
MEDIUMtests/python/serve/test_serve_sync_engine.py398 # Hyperparameters for tests (you can try different combinations)COMMENT
AI Structural Patterns38 hits · 32 pts
SeverityFileLineSnippetContext
LOWpython/mlc_llm/json_ffi/engine.py117CODE
LOWpython/mlc_llm/nn/kv_cache.py17CODE
LOWpython/mlc_llm/nn/rnn_state.py71CODE
LOWpython/mlc_llm/op/attention.py100CODE
LOWpython/mlc_llm/compiler_pass/pipeline.py82CODE
LOWpython/mlc_llm/contrib/embeddings/embeddings.py173CODE
LOWpython/mlc_llm/quantization/model_quantization.py20CODE
LOWpython/mlc_llm/loader/standard_loader.py23CODE
LOWpython/mlc_llm/model/vision/image_processing.py90CODE
LOWpython/mlc_llm/model/vision/image_processing.py143CODE
LOWpython/mlc_llm/model/vision/image_processing.py182CODE
LOWpython/mlc_llm/model/vision/image_processing.py233CODE
LOWpython/mlc_llm/model/vision/image_processing.py280CODE
LOWpython/mlc_llm/model/chatglm3/chatglm3_model.py162CODE
LOWpython/mlc_llm/model/phi3v/phi3v_image.py114CODE
LOWpython/mlc_llm/model/phi3v/phi3v_image.py153CODE
LOWpython/mlc_llm/model/phi3v/phi3v_image.py187CODE
LOWpython/mlc_llm/model/bert/bert_model.py110CODE
LOWpython/mlc_llm/model/nemotron/nemotron_model.py91CODE
LOWpython/mlc_llm/serve/engine.py58CODE
LOWpython/mlc_llm/serve/engine.py113CODE
LOWpython/mlc_llm/serve/engine.py167CODE
LOWpython/mlc_llm/serve/engine.py252CODE
LOWpython/mlc_llm/serve/engine.py307CODE
LOWpython/mlc_llm/serve/engine.py359CODE
LOWpython/mlc_llm/serve/engine.py444CODE
LOWpython/mlc_llm/serve/engine.py499CODE
LOWpython/mlc_llm/serve/engine.py551CODE
LOWpython/mlc_llm/serve/engine.py636CODE
LOWpython/mlc_llm/serve/engine.py691CODE
LOWpython/mlc_llm/serve/engine.py743CODE
LOWpython/mlc_llm/serve/engine.py911CODE
LOWpython/mlc_llm/serve/engine.py1053CODE
LOWpython/mlc_llm/serve/engine.py1483CODE
LOWpython/mlc_llm/serve/engine.py1615CODE
LOWpython/mlc_llm/serve/engine_base.py1151CODE
LOWpython/mlc_llm/serve/server/popen_server.py25CODE
LOWpython/mlc_llm/serve/entrypoints/debug_entrypoints.py102CODE
Redundant / Tautological Comments18 hits · 27 pts
SeverityFileLineSnippetContext
LOW…on/mlc_llm/compiler_pass/dispatch_kv_cache_creation.py30 # Check if attn_kind is a single value or a list with length of hidden layersCOMMENT
LOWpython/mlc_llm/serve/embedding_engine.py128 # Check if the post-processor actually appends a special token at the endCOMMENT
LOWpython/mlc_llm/serve/server/popen_server.py147 # Check if the subprocess terminates unexpectedly orCOMMENT
LOWtests/python/json_ffi/test_json_ffi_engine_image.py62 # Print output.COMMENT
LOWtests/python/json_ffi/test_json_ffi_engine.py81 # Print output.COMMENT
LOWtests/python/json_ffi/test_json_ffi_engine.py140 # Print output.COMMENT
LOWtests/python/serve/test_serve_engine_rnn.py45 # Print output.COMMENT
LOWtests/python/serve/test_serve_engine.py46 # Print output.COMMENT
LOWtests/python/serve/test_serve_engine.py91 # Print output.COMMENT
LOWtests/python/serve/test_serve_engine.py135 # Print output.COMMENT
LOWtests/python/serve/test_serve_engine.py179 # Print output.COMMENT
LOWtests/python/serve/test_serve_engine.py222 # Print output.COMMENT
LOWtests/python/serve/test_serve_async_engine_spec.py69 # Print output.COMMENT
LOWtests/python/serve/test_serve_async_engine.py66 # Print output.COMMENT
LOWtests/python/serve/test_serve_async_engine.py117 # Print output.COMMENT
LOWtests/python/serve/test_serve_async_engine.py167 # Print output.COMMENT
LOWtests/python/serve/test_serve_async_engine.py217 # Print output.COMMENT
LOWtests/python/serve/test_serve_async_engine.py266 # Print output.COMMENT
Over-Commented Block26 hits · 26 pts
SeverityFileLineSnippetContext
LOW.pre-commit-config.yaml1# To use:COMMENT
LOWpyproject.toml1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWpython/mlc_llm/interface/router.py81 output_texts = [""] * request.nCOMMENT
LOW…c_llm/compiler_pass/attach_softmax_with_temperature.py101def _get_lse_and_softmax_func(target: tvm.target.Target, chunk_size: int, active_vocab_size: int):COMMENT
LOWpython/mlc_llm/protocol/conversation_protocol.py41 # the system message below.COMMENT
LOWpython/mlc_llm/cli/worker.py1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWpython/mlc_llm/cli/disco_remote_socket_session.py1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWpython/mlc_llm/model/model_preset.py1581 # "architectures": ["BertModel"],COMMENT
LOWpython/mlc_llm/model/model_preset.py1981 "vocab_size": 49152,COMMENT
LOWpython/mlc_llm/model/model_preset.py2001 # "rms_norm_eps": 1e-05,COMMENT
LOWtests/python/conftest.py1# Licensed to the Apache Software Foundation (ASF) under oneCOMMENT
LOWios/MLCSwift/Sources/ObjC/LLMEngine.mm1//COMMENT
LOW…gineExample/MLCEngineExample/MLCEngineExampleApp.swift1// This is a minimum example App to interact with MLC EngineCOMMENT
LOWcpp/base.h1/*!COMMENT
LOWcpp/tokenizers/tokenizers.h1/*!COMMENT
LOWcpp/json_ffi/openai_api_protocol.h1/*!COMMENT
LOWcpp/json_ffi/conv_template.h1#ifndef MLC_LLM_JSON_FFI_CONV_TEMPLATE_HCOMMENT
LOWcpp/serve/config.h1/*!COMMENT
LOWcpp/serve/data.h1/*!COMMENT
LOWcpp/serve/model.h1/*!COMMENT
LOWcpp/serve/prefix_cache.h1/*!COMMENT
LOWcpp/serve/request_state.h1/*!COMMENT
LOWcpp/serve/function_table.h1/*!COMMENT
LOWexamples/rest/python/sample_langchain.py161COMMENT
LOWandroid/mlc4j/src/cpp/tvm_runtime.h1#define TVM_USE_LIBBACKTRACE 0COMMENT
LOWandroid/mlc4j/src/cpp/tvm_runtime.h21#include <runtime/cpu_device_api.cc>COMMENT
Excessive Try-Catch Wrapping24 hits · 24 pts
SeverityFileLineSnippetContext
LOWpython/mlc_llm/json_ffi/engine.py70 except Exception as exception:CODE
LOWpython/mlc_llm/bench/api_endpoint.py139 except Exception:CODE
LOWpython/mlc_llm/bench/api_endpoint.py269 except Exception:CODE
LOWpython/mlc_llm/bench/api_endpoint.py383 except Exception:CODE
LOWpython/mlc_llm/bench/__main__.py125 except Exception:CODE
LOWpython/mlc_llm/interface/gen_config.py212 except Exception:CODE
LOWpython/mlc_llm/interface/gen_config.py234 except Exception:CODE
LOWpython/mlc_llm/interface/gen_config.py281 except Exception:CODE
LOW…on/mlc_llm/compiler_pass/dispatch_kv_cache_creation.py235 except Exception as e:CODE
LOWpython/mlc_llm/cli/delivery.py198 except Exception as exc:CODE
LOWpython/mlc_llm/cli/check_device.py13 except Exception:CODE
LOWpython/mlc_llm/cli/model_metadata.py175 except Exception:STRING
LOWpython/mlc_llm/support/auto_device.py40 except Exception as err:CODE
LOWpython/mlc_llm/support/auto_target.py119 except Exception as err:CODE
LOWpython/mlc_llm/serve/engine.py1034 except Exception as err:CODE
LOWpython/mlc_llm/serve/engine.py1233 except Exception as err:CODE
LOWpython/mlc_llm/serve/engine.py1305 except Exception as err:CODE
LOWpython/mlc_llm/serve/engine.py1381 except Exception as exception:CODE
LOWpython/mlc_llm/serve/server/popen_server.py143 except Exception:CODE
LOWpython/mlc_llm/serve/entrypoints/openai_entrypoints.py78 except Exception as exc:CODE
LOWpython/mlc_llm/router/router.py304 except Exception as e:CODE
LOWtests/python/integration/test_model_compile.py147 except Exception:CODE
LOWscripts/check_url_validity.py36 except Exception as e:CODE
MEDIUMscripts/check_url_validity.py37 print(f"Error connecting {url}, error: {e}")CODE
Cross-Language Confusion3 hits · 18 pts
SeverityFileLineSnippetContext
HIGHpython/mlc_llm/serve/engine.py1354 stream.push(CODE
HIGHpython/mlc_llm/serve/engine_base.py518 stream.push([output])CODE
HIGHpython/mlc_llm/serve/engine_base.py545 stream.push(outputs)CODE
Modern AI Meta-Vocabulary6 hits · 16 pts
SeverityFileLineSnippetContext
MEDIUMpython/mlc_llm/interface/serve.py89 # Set up embedding model if specifiedCOMMENT
MEDIUMpython/mlc_llm/cli/model_metadata.py99 # Compute KV cache size per token of context window.COMMENT
MEDIUMpython/mlc_llm/model/gemma2/gemma2_model.py37 # NOTE: override the context window size with the Gemma2 sliding window size,COMMENT
MEDIUMpython/mlc_llm/model/gemma3/gemma3_model.py91 # NOTE: override the context window size with the Gemma2 sliding window size,COMMENT
MEDIUMpython/mlc_llm/model/rwkv5/rwkv5_model.py42 context_window_size: int = -1 # RWKV does not have context window limitation.CODE
MEDIUMpython/mlc_llm/model/rwkv6/rwkv6_model.py42 context_window_size: int = -1 # RWKV does not have context window limitation.CODE
AI Slop Vocabulary7 hits · 13 pts
SeverityFileLineSnippetContext
MEDIUMversion.py90 # Remove the v prefix, mainly to be robustCOMMENT
MEDIUMpython/setup.py76 """This class is needed in order to create OS specific wheels."""STRING
MEDIUMpython/mlc_llm/interface/chat.py173 # TODO(mlc-team): possibly leverage debug optionCOMMENT
LOWpython/mlc_llm/serve/engine.py1032 # for cancelled error, we can simply pass it throughCOMMENT
LOWpython/mlc_llm/serve/engine.py1231 # for cancelled error, we can simply pass it throughCOMMENT
LOWpython/mlc_llm/serve/engine.py1303 # for cancelled error, we can simply pass it throughCOMMENT
LOWpython/mlc_llm/serve/engine.py1379 # for cancelled error, we can simply pass it throughCOMMENT
Structural Annotation Overuse2 hits · 3 pts
SeverityFileLineSnippetContext
LOWpython/mlc_llm/serve/engine_base.py486 # NOTE: This function causes GIL during execution.COMMENT
LOW…gineExample/MLCEngineExample/MLCEngineExampleApp.swift35 // Step 0: load the engineCOMMENT
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOW…gineExample/MLCEngineExample/MLCEngineExampleApp.swift35 // Step 0: load the engineCOMMENT