Repository Analysis

Blaizzy/mlx-vlm

MLX-VLM is a package for inference and fine-tuning of Vision Language Models (VLMs) on your Mac using MLX.

16.7 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of Blaizzy/mlx-vlm, a Python project with 5,436 GitHub stars. SynthScan v2.0 examined 364,108 lines of code across 1459 source files, recording 5662 pattern matches distributed across 19 syntactic categories. The overall adjusted score of 16.7 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).

16.7
Adjusted Score
16.7
Raw Score
100%
Time Factor
2026-08-28
Last Push
5.4K
Stars
Python
Language
364.1K
Lines of Code
1.5K
Files
5.7K
Pattern Hits
2026-08-29
Scan Date
0.04
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 1HIGH 61MEDIUM 302LOW 5298

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 5662 distinct pattern matches across 19 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 Identifiers2378 hits · 1994 pts
SeverityFileLineSnippetContext
LOWREADME.md803def run_disk_eviction_workload() -> None:CODE
LOWexamples/omni.py149 def _voice_activity_detection(self, frame):CODE
LOWexamples/omni.py168 async def _send_transcription_request(CODE
LOWexamples/omni.py253 async def stream_microphone_transcription(CODE
LOWmlx_vlm/reranker_loader.py11def is_sequence_classifier_config(config: dict) -> bool:CODE
LOWmlx_vlm/reranker_loader.py25def load_sequence_classification_model(CODE
LOWmlx_vlm/moe_offload.py93def _group_raw_names_by_layer(names) -> dict:CODE
LOWmlx_vlm/moe_offload.py462def _estimate_kv_reserve_bytes(model, max_kv_size: Optional[int]) -> int:CODE
LOWmlx_vlm/moe_offload.py503def _default_expert_cache_bytes(CODE
LOWmlx_vlm/tokenizer_utils.py406def make_streaming_detokenizer(processor):CODE
LOWmlx_vlm/convert.py58def mixed_quant_predicate_builder(CODE
LOWmlx_vlm/convert.py138def _build_multimodal_awq_run(model, processor, config, calibration_data):CODE
LOWmlx_vlm/turboquant.py1734def _multi_query_prod_score_kernel(CODE
LOWmlx_vlm/turboquant.py1868def _fused_integer_decode_single_tile_kernel(CODE
LOWmlx_vlm/turboquant.py2021def _fully_fused_decode_kernel(CODE
LOWmlx_vlm/turboquant.py2661def _metal_butterfly_wht_inverse(CODE
LOWmlx_vlm/turboquant.py2696def _fused_kv_quantize_kernel(key_bits: int, val_bits: int):CODE
LOWmlx_vlm/turboquant.py3142def _fused_split_decode_kernel(low_bits: int, high_bits: int, repeat_count: int):CODE
LOWmlx_vlm/turboquant.py3355def _compiled_split_decode_kernel(low_bits: int, high_bits: int):CODE
LOWmlx_vlm/turboquant.py4202 def _quantize_unit_with_estimate(CODE
LOWmlx_vlm/turboquant.py4377 def weighted_sum_stats_from_scores(CODE
LOWmlx_vlm/turboquant.py4436 def _dequantize_preconditioned(self, state: TurboQuantPolarState) -> mx.array:CODE
LOWmlx_vlm/turboquant.py4453 def quantize_unit_with_estimate(CODE
LOWmlx_vlm/turboquant.py4931 def weighted_sum_stats_from_scores(CODE
LOWmlx_vlm/turboquant.py5406 def _separate_score_value_decode(CODE
LOWmlx_vlm/turboquant.py5491 def _compiled_split_decode_attention(CODE
LOWmlx_vlm/turboquant.py5620 def _compiled_integer_decode_attention(CODE
LOWmlx_vlm/turboquant.py430def _prod_score_repeat_kernel(repeat_count: int):STRING
LOWmlx_vlm/turboquant.py619def _polar_turbo_score_repeat_kernel(level_bits: tuple[int, ...], repeat_count: int):STRING
LOWmlx_vlm/turboquant.py813def _mse_weighted_rot_repeat_kernel(repeat_count: int):STRING
LOWmlx_vlm/turboquant.py888def _mse_scores_weighted_rot_repeat_kernel(repeat_count: int):STRING
LOWmlx_vlm/turboquant.py976def _mse_scores_weighted_rot_sum_repeat_kernel(repeat_count: int):STRING
LOWmlx_vlm/turboquant.py1424def _metal_mse_weighted_sum_from_scores(STRING
LOWmlx_vlm/turboquant.py1481def _metal_mse_weighted_sum_sum_from_scores(STRING
LOWmlx_vlm/turboquant.py1538def _compiled_integer_decode_kernel(bits: int):STRING
LOWmlx_vlm/turboquant.py1589def _fused_integer_decode_kernel(bits: int, repeat_count: int, key_mse_bits: int = -1):STRING
LOWmlx_vlm/turboquant.py1803def _single_tile_value_weighted_sum_kernel(STRING
LOWmlx_vlm/turboquant.py2625def _metal_butterfly_wht_forward(STRING
LOWmlx_vlm/turboquant.py2821def _fused_norot_quantize_kernel(bits: int):STRING
LOWmlx_vlm/turboquant.py2897def _fused_mse_quantize_kernel(bits: int, use_rht: bool = False):STRING
LOWmlx_vlm/turboquant.py2990def _fused_prod_quantize_kernel(mse_bits: int, use_rht: bool = False):STRING
LOWmlx_vlm/chat_ui.py166def extract_image_from_message(message):CODE
LOWmlx_vlm/chat_ui.py186def extract_text_from_message(message):CODE
LOWmlx_vlm/apc_adapters.py123def _has_explicit_snapshot_contract(cache: Any) -> bool:CODE
LOWmlx_vlm/apc_adapters.py178def reserve_checkpoint_capacity(CODE
LOWmlx_vlm/apc_adapters.py210def register_default_capabilities() -> None:CODE
LOWmlx_vlm/apc_adapters.py727def build_prefix_cache_plan_from_caches(CODE
LOWmlx_vlm/utils.py79def apply_generation_config_defaults(model_config, config: dict):CODE
LOWmlx_vlm/utils.py396def _compressed_tensors_group_weights(CODE
LOWmlx_vlm/utils.py427def _transform_compressed_tensors_mixed_weights(CODE
LOWmlx_vlm/utils.py520def _transform_compressed_tensors_weights(CODE
LOWmlx_vlm/utils.py696def _quantization_path_aliases(CODE
LOWmlx_vlm/utils.py711def _quantization_for_module_path(CODE
LOWmlx_vlm/utils.py723def _drop_modules_without_weights(CODE
LOWmlx_vlm/utils.py1686def estimate_num_image_tokens(processor, height: int, width: int, **size_overrides):CODE
LOWmlx_vlm/utils.py2010def process_inputs_with_fallback(CODE
LOWmlx_vlm/utils.py2491def should_add_special_tokens(model_type: str, processor) -> bool:CODE
LOWmlx_vlm/sample_utils.py408 def repetition_penalty_processor(tokens, logits):CODE
LOWmlx_vlm/sample_utils.py440 def presence_penalty_processor(tokens, logits):CODE
LOWmlx_vlm/sample_utils.py469 def frequency_penalty_processor(tokens, logits):CODE
2318 more matches not shown…
Unused Imports1529 hits · 1420 pts
SeverityFileLineSnippetContext
LOWexamples/nemotron_voicechat_microphone.py3CODE
LOWmlx_vlm/moe_offload.py16CODE
LOWmlx_vlm/apc_coordinator.py9CODE
LOWmlx_vlm/kv_quant.py1CODE
LOWmlx_vlm/turboquant.py1CODE
LOWmlx_vlm/__init__.py8CODE
LOWmlx_vlm/__init__.py9CODE
LOWmlx_vlm/__init__.py9CODE
LOWmlx_vlm/__init__.py9CODE
LOWmlx_vlm/__init__.py9CODE
LOWmlx_vlm/__init__.py9CODE
LOWmlx_vlm/__init__.py9CODE
LOWmlx_vlm/__init__.py9CODE
LOWmlx_vlm/__init__.py18CODE
LOWmlx_vlm/__init__.py18CODE
LOWmlx_vlm/__init__.py19CODE
LOWmlx_vlm/__init__.py19CODE
LOWmlx_vlm/__init__.py19CODE
LOWmlx_vlm/__init__.py20CODE
LOWmlx_vlm/__init__.py21CODE
LOWmlx_vlm/apc_adapters.py3CODE
LOWmlx_vlm/apc.py43CODE
LOWmlx_vlm/apc_storage.py3CODE
LOWmlx_vlm/quant/__init__.py1CODE
LOWmlx_vlm/quant/__init__.py2CODE
LOWmlx_vlm/quant/__init__.py2CODE
LOWmlx_vlm/quant/__init__.py2CODE
LOWmlx_vlm/quant/__init__.py2CODE
LOWmlx_vlm/quant/__init__.py2CODE
LOWmlx_vlm/tests/test_bonsai.py1CODE
LOWmlx_vlm/tests/test_apc_observability.py3CODE
LOWmlx_vlm/tests/test_ideogram4.py1CODE
LOWmlx_vlm/tests/test_apc_quantized.py11CODE
LOWmlx_vlm/tests/test_quant_sdpa_mask_adversarial.py9CODE
LOWmlx_vlm/tests/test_apc_component_adapters.py3CODE
LOWmlx_vlm/tests/test_flux2.py1CODE
LOWmlx_vlm/tests/test_apc_exact_mode.py12CODE
LOWmlx_vlm/tests/test_apc.py1CODE
LOWmlx_vlm/tests/test_apc_semantic_key.py3CODE
LOWmlx_vlm/tests/test_apc_storage.py3CODE
LOWmlx_vlm/tests/test_apc_adapters.py7CODE
LOWmlx_vlm/tests/test_quant_sdpa_mask.py3CODE
LOWmlx_vlm/tests/test_z_image.py1CODE
LOWmlx_vlm/tests/test_mage_flow.py1CODE
LOWmlx_vlm/tests/test_apc_all_models.py10CODE
LOWmlx_vlm/tests/test_gemma4_assistant_masks_static.py3CODE
LOWmlx_vlm/tests/test_ernie_image.py1CODE
LOWmlx_vlm/server/runtime_config.py3CODE
LOWmlx_vlm/server/generation.py11CODE
LOWmlx_vlm/server/generation.py18CODE
LOWmlx_vlm/server/realtime.py3CODE
LOWmlx_vlm/server/__init__.py1CODE
LOWmlx_vlm/server/__init__.py3CODE
LOWmlx_vlm/server/__init__.py5CODE
LOWmlx_vlm/server/__init__.py5CODE
LOWmlx_vlm/server/__init__.py5CODE
LOWmlx_vlm/server/__init__.py5CODE
LOWmlx_vlm/server/__init__.py5CODE
LOWmlx_vlm/server/__init__.py5CODE
LOWmlx_vlm/server/__init__.py5CODE
1469 more matches not shown…
Decorative Section Separators248 hits · 793 pts
SeverityFileLineSnippetContext
MEDIUMagents/grounded_reasoning/mask_ops.py14# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/mask_ops.py16# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/mask_ops.py58# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/mask_ops.py60# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/mask_ops.py97# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/mask_ops.py99# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/mask_ops.py141# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/mask_ops.py143# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/mask_ops.py208# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/mask_ops.py210# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/mask_ops.py289# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/mask_ops.py291# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py379# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py381# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py58# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py60# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py277# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py279# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py396# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py398# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py463# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py465# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py513# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py515# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py924# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py926# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py963 # ── core images ───────────────────────────────────────────────────────────COMMENT
MEDIUMagents/grounded_reasoning/agent.py971 # ── trace steps ──────────────────────────────────────────────────────────COMMENT
MEDIUMagents/grounded_reasoning/agent.py987 # ── assemble JSON ─────────────────────────────────────────────────────────COMMENT
MEDIUMagents/grounded_reasoning/agent.py1010# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py1012# ---------------------------------------------------------------------------COMMENT
MEDIUMagents/grounded_reasoning/agent.py240# ---------------------------------------------------------------------------STRING
MEDIUMagents/grounded_reasoning/agent.py242# ---------------------------------------------------------------------------STRING
MEDIUMagents/grounded_reasoning/agent.py248# ---------------------------------------------------------------------------STRING
MEDIUMagents/grounded_reasoning/agent.py250# ---------------------------------------------------------------------------STRING
MEDIUMmlx_vlm/turboquant.py6135# ── Batch-aware TurboQuant cache for continuous batching ────────────────COMMENT
MEDIUMmlx_vlm/turboquant.py6171 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6173 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6189 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6191 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6245 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6247 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6325 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6327 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6378 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6380 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/tests/test_gemma4_tool_parser.py27 # ── snake_case (regression: must keep working) ────────────────────────COMMENT
MEDIUMmlx_vlm/tests/test_gemma4_tool_parser.py43 # ── hyphenated names (the bug this PR fixes) ──────────────────────────COMMENT
MEDIUMmlx_vlm/tests/test_gemma4_tool_parser.py90 # ── arguments type ────────────────────────────────────────────────────COMMENT
MEDIUMmlx_vlm/tests/test_gemma4_tool_parser.py100 # ── DiffusionGemma payload tolerance ──────────────────────────────────COMMENT
MEDIUMmlx_vlm/tests/test_gemma4_tool_parser.py139 # ── error path ────────────────────────────────────────────────────────COMMENT
MEDIUMmlx_vlm/tests/test_processors.py10# ── Shared mocks ──────────────────────────────────────────────────────────────COMMENT
MEDIUMmlx_vlm/tests/test_processors.py542# ── Base class with shared test_with_image / test_text_only ───────────────────COMMENT
MEDIUMmlx_vlm/tests/test_processors.py588# ── Per-model test classes ────────────────────────────────────────────────────COMMENT
MEDIUMmlx_vlm/tests/test_processors.py2842# ── AutoProcessor patch tests ─────────────────────────────────────────────────COMMENT
MEDIUMmlx_vlm/tests/test_apc_quantized.py61# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/tests/test_apc_quantized.py63# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/tests/test_apc_quantized.py244# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/tests/test_apc_quantized.py246# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/tests/test_apc_quantized.py312# ---------------------------------------------------------------------------COMMENT
188 more matches not shown…
Deep Nesting458 hits · 426 pts
SeverityFileLineSnippetContext
LOWagents/grounded_reasoning/agent.py416CODE
LOWagents/grounded_reasoning/agent.py518CODE
LOWagents/grounded_reasoning/agent.py317CODE
LOWexamples/omni.py110CODE
LOWexamples/omni.py168CODE
LOWexamples/omni.py253CODE
LOWexamples/utils.py26CODE
LOWexamples/nemotron_voicechat_microphone.py65CODE
LOWexamples/nemotron_voicechat_microphone.py202CODE
LOWmlx_vlm/moe_offload.py180CODE
LOWmlx_vlm/moe_offload.py215CODE
LOWmlx_vlm/moe_offload.py682CODE
LOWmlx_vlm/moe_offload.py738CODE
LOWmlx_vlm/tokenizer_utils.py453CODE
LOWmlx_vlm/convert.py266CODE
LOWmlx_vlm/turboquant.py2230CODE
LOWmlx_vlm/turboquant.py5843CODE
LOWmlx_vlm/chat_ui.py80CODE
LOWmlx_vlm/chat_ui.py166CODE
LOWmlx_vlm/chat_ui.py186CODE
LOWmlx_vlm/chat_ui.py208CODE
LOWmlx_vlm/apc_adapters.py97CODE
LOWmlx_vlm/apc_adapters.py246CODE
LOWmlx_vlm/apc_adapters.py284CODE
LOWmlx_vlm/chat.py134CODE
LOWmlx_vlm/chat.py155CODE
LOWmlx_vlm/utils.py168CODE
LOWmlx_vlm/utils.py787CODE
LOWmlx_vlm/utils.py1278CODE
LOWmlx_vlm/utils.py1619CODE
LOWmlx_vlm/utils.py1718CODE
LOWmlx_vlm/utils.py2034CODE
LOWmlx_vlm/utils.py2320CODE
LOWmlx_vlm/prompt_utils.py132CODE
LOWmlx_vlm/prompt_utils.py190CODE
LOWmlx_vlm/prompt_utils.py596CODE
LOWmlx_vlm/prompt_utils.py831CODE
LOWmlx_vlm/prompt_utils.py635CODE
LOWmlx_vlm/quant_utils.py164CODE
LOWmlx_vlm/lora.py35CODE
LOWmlx_vlm/lora.py63CODE
LOWmlx_vlm/apc.py177CODE
LOWmlx_vlm/apc.py969CODE
LOWmlx_vlm/apc.py1215CODE
LOWmlx_vlm/apc.py1444CODE
LOWmlx_vlm/apc.py2803CODE
LOWmlx_vlm/apc.py2993CODE
LOWmlx_vlm/apc.py3318CODE
LOWmlx_vlm/gliner.py160CODE
LOWmlx_vlm/tool_parsers/qwen3_coder.py37CODE
LOWmlx_vlm/tool_parsers/minimax_m2.py28CODE
LOWmlx_vlm/tool_parsers/minimax_m2.py89CODE
LOWmlx_vlm/tool_parsers/minimax_m2.py160CODE
LOWmlx_vlm/tool_parsers/gemma4.py11CODE
LOWmlx_vlm/tool_parsers/gemma4.py71CODE
LOWmlx_vlm/tool_parsers/minimax_m3.py32CODE
LOWmlx_vlm/tool_parsers/minimax_m3.py133CODE
LOWmlx_vlm/tool_parsers/pythonic.py57CODE
LOWmlx_vlm/quant/calibration.py95CODE
LOWmlx_vlm/quant/calibration.py129CODE
398 more matches not shown…
Modern Structural Boilerplate325 hits · 323 pts
SeverityFileLineSnippetContext
LOWexamples/omni.py27logger = logging.getLogger(__name__)CODE
LOWmlx_vlm/structured.py82 def _setup(self, batch_size: int) -> None:CODE
LOWmlx_vlm/lora.py29logger = logging.getLogger(__name__)CODE
LOWmlx_vlm/apc_storage.py87 def set_kv(self, keys: List[mx.array], values: List[mx.array]) -> None:CODE
LOWmlx_vlm/gliner.py292__all__ = ["GLiNER2", "load_gliner"]CODE
LOWmlx_vlm/quant/__init__.py10__all__ = [CODE
LOWmlx_vlm/tests/sanitize_invariants.py34__all__ = ["assert_sanitize_idempotent"]CODE
LOWmlx_vlm/tests/cache_invariants.py36__all__ = ["assert_cached_forward_matches_full"]CODE
LOWmlx_vlm/server/__init__.py190__all__ = [CODE
LOWmlx_vlm/server/embeddings.py15logger = logging.getLogger(__name__)CODE
LOWmlx_vlm/server/reranking.py20logger = logging.getLogger(__name__)CODE
LOWmlx_vlm/models/exact_speculative_verify.py258__all__ = [CODE
LOWmlx_vlm/models/dots1/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/solar_open/solar_open.py5__all__ = ["Model"]CODE
LOWmlx_vlm/models/solar_open/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/llama4/processing_llama4.py303__all__ = ["Llama4Processor"]CODE
LOWmlx_vlm/models/pixtral/processing_pixtral.py209__all__ = ["PixtralProcessor"]CODE
LOWmlx_vlm/models/pixtral/image_processing_pixtral.py305__all__ = [CODE
LOWmlx_vlm/models/laguna/__init__.py6__all__ = ["LagunaProcessor", "Model", "ModelConfig"]CODE
LOWmlx_vlm/models/laguna/processing_laguna.py76__all__ = ["LagunaProcessor"]CODE
LOWmlx_vlm/models/falcon_ocr/layout.py9logger = logging.getLogger(__name__)CODE
LOWmlx_vlm/models/falcon_ocr/processing_falcon_ocr.py400__all__ = [CODE
LOWmlx_vlm/models/olmo3/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/gemma4_text/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/ministral3/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/cohere/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/gemma3_embedding/config.py3__all__ = ["ModelConfig"]CODE
LOWmlx_vlm/models/gemma3_embedding/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/starcoder2/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/gpt_oss/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/plamo2vl/__init__.py7__all__ = [CODE
LOWmlx_vlm/models/olmoe/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/gemma/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/colqwen2_5/config.py6__all__ = ["ModelConfig", "TextConfig", "VisionConfig"]CODE
LOWmlx_vlm/models/colqwen2_5/__init__.py5__all__ = [CODE
LOWmlx_vlm/models/mllama/processing_mllama.py278__all__ = ["MllamaProcessor"]CODE
LOWmlx_vlm/models/nemotron_nas/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/olmo2/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/zaya1_vl/__init__.py7__all__ = [CODE
LOWmlx_vlm/models/zaya1_vl/processing_zaya1_vl.py132__all__ = ["Zaya1VLProcessor"]CODE
LOWmlx_vlm/models/ideogram4/__init__.py3__all__ = ["Ideogram4ImageGenerationModel", "load"]CODE
LOWmlx_vlm/models/ideogram4/model.py128__all__ = [CODE
LOWmlx_vlm/models/lfm2_embedding/config.py3__all__ = ["ModelConfig"]CODE
LOWmlx_vlm/models/lfm2_embedding/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/plamo/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/qwen3_next/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/gpt_neox/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/minimax_m3/__init__.py5__all__ = ["LanguageModel", "Model", "ModelConfig", "TextConfig"]CODE
LOWmlx_vlm/models/exaone4/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/mellum/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/granite/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/gemma2/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/mixtral/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOW…dels/falcon_perception/processing_falcon_perception.py359__all__ = [CODE
LOWmlx_vlm/models/hunyuan_vl/processing_hunyuan_vl.py620__all__ = [CODE
LOWmlx_vlm/models/mimo/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/longcat_flash/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/olmo/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/phi3/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/gemma3/processing_gemma3.py228__all__ = ["Gemma3Processor"]CODE
265 more matches not shown…
Excessive Try-Catch Wrapping253 hits · 265 pts
SeverityFileLineSnippetContext
LOWagents/grounded_reasoning/agent.py374 except Exception as e:CODE
LOWexamples/omni.py95 except Exception as e:CODE
LOWexamples/omni.py229 except Exception as e:CODE
LOWexamples/omni.py237 except Exception as e:CODE
LOWexamples/omni.py330 except Exception as e:CODE
LOWmlx_vlm/moe_offload.py246 except Exception:CODE
LOWmlx_vlm/moe_offload.py492 except Exception:CODE
LOWmlx_vlm/moe_offload.py510 except Exception:CODE
LOWmlx_vlm/moe_offload.py606 except Exception:CODE
LOWmlx_vlm/tokenizer_utils.py323 except Exception:CODE
MEDIUMmlx_vlm/tokenizer_utils.py246def finalize(self):CODE
LOWmlx_vlm/convert.py252 except Exception:CODE
LOWmlx_vlm/convert.py426 except Exception as exc:CODE
LOWmlx_vlm/chat_ui.py109 except Exception:CODE
LOWmlx_vlm/chat_ui.py124 except Exception:CODE
LOWmlx_vlm/chat_ui.py132 except Exception as e:CODE
MEDIUMmlx_vlm/chat_ui.py133 print(f"Error scanning cache: {e}")CODE
LOWmlx_vlm/chat_ui.py153 except Exception as e:CODE
LOWmlx_vlm/apc_adapters.py783 except Exception:CODE
LOWmlx_vlm/chat.py92 except Exception as e:CODE
LOWmlx_vlm/chat.py185 except Exception as e:CODE
LOWmlx_vlm/chat.py388 except Exception as e:CODE
LOWmlx_vlm/utils.py1654 except Exception as e:CODE
LOWmlx_vlm/utils.py1885 except Exception as e:CODE
LOWmlx_vlm/utils.py2030 except Exception as e:CODE
LOWmlx_vlm/lora.py75 except Exception:CODE
LOWmlx_vlm/lora.py85 except Exception as e:CODE
MEDIUMmlx_vlm/apc.py2797def _writer_loop(self) -> None:CODE
LOWmlx_vlm/apc.py144 except Exception:CODE
LOWmlx_vlm/apc.py195 except Exception:CODE
LOWmlx_vlm/apc.py376 except Exception:CODE
LOWmlx_vlm/apc.py981 except Exception:CODE
LOWmlx_vlm/apc.py1002 except Exception:CODE
LOWmlx_vlm/apc.py1122 except Exception:CODE
LOWmlx_vlm/apc.py1833 except Exception:CODE
LOWmlx_vlm/apc.py1964 except Exception as e:CODE
LOWmlx_vlm/apc.py2644 except Exception:CODE
LOWmlx_vlm/apc.py2819 except Exception as e:CODE
LOWmlx_vlm/apc.py3187 except Exception as e:CODE
LOWmlx_vlm/apc.py3454 except Exception as e:CODE
LOWmlx_vlm/apc.py4039 except Exception:CODE
LOWmlx_vlm/apc.py4066 except Exception:CODE
LOWmlx_vlm/apc.py4074 except Exception:CODE
LOWmlx_vlm/apc.py4303 except Exception:CODE
LOWmlx_vlm/apc.py4320 except Exception:CODE
LOWmlx_vlm/apc.py4330 except Exception as exc:CODE
LOWmlx_vlm/apc.py4410 except Exception as exc:CODE
LOWmlx_vlm/apc.py4515 except Exception as e:CODE
LOWmlx_vlm/apc_storage.py18 except Exception:CODE
LOWmlx_vlm/tool_parsers/longcat.py41 except Exception:CODE
LOWmlx_vlm/tool_parsers/longcat.py46 except Exception:CODE
LOWmlx_vlm/tool_parsers/kimi_k2.py31 except Exception:CODE
LOWmlx_vlm/tool_parsers/kimi_k2.py36 except Exception:CODE
LOWmlx_vlm/tool_parsers/glm47.py46 except Exception:CODE
LOWmlx_vlm/tool_parsers/glm47.py51 except Exception:CODE
LOWmlx_vlm/tool_parsers/glm47.py82 except Exception:CODE
LOWmlx_vlm/evals/mmmu.py65 except Exception:CODE
LOWmlx_vlm/evals/mmmu.py155 except Exception:CODE
LOWmlx_vlm/evals/mmmu.py257 except Exception as e:CODE
LOWmlx_vlm/evals/mmmu.py266 except Exception as e:CODE
193 more matches not shown…
AI Structural Patterns231 hits · 224 pts
SeverityFileLineSnippetContext
LOWexamples/omni.py31CODE
LOWmlx_vlm/convert.py266CODE
LOWmlx_vlm/utils.py2034CODE
LOWmlx_vlm/sample_utils.py10CODE
LOWmlx_vlm/apc.py226CODE
LOWmlx_vlm/tests/test_processors.py1989CODE
LOWmlx_vlm/tests/test_processors.py1938CODE
LOWmlx_vlm/server/generation.py503CODE
LOWmlx_vlm/server/generation.py987CODE
LOWmlx_vlm/models/rope_utils.py256CODE
LOWmlx_vlm/models/rope_utils.py1166CODE
LOWmlx_vlm/models/kernels.py470CODE
LOWmlx_vlm/models/interpolate.py117CODE
LOWmlx_vlm/models/llama4/processing_llama4.py137CODE
LOWmlx_vlm/models/llama4/vision.py360CODE
LOWmlx_vlm/models/llama4/language.py189CODE
LOWmlx_vlm/models/pixtral/processing_pixtral.py33CODE
LOWmlx_vlm/models/pixtral/language.py107CODE
LOWmlx_vlm/models/pixtral/image_processing_pixtral.py166CODE
LOWmlx_vlm/models/olmo3/language.py125CODE
LOWmlx_vlm/models/ministral3/language.py115CODE
LOWmlx_vlm/models/starcoder2/language.py96CODE
LOWmlx_vlm/models/plamo2vl/processing.py173CODE
LOWmlx_vlm/models/gemma/language.py108CODE
LOWmlx_vlm/models/mllama/language.py287CODE
LOWmlx_vlm/models/olmo2/language.py105CODE
LOWmlx_vlm/models/qwen3_next/language.py344CODE
LOWmlx_vlm/models/gpt_neox/language.py150CODE
LOWmlx_vlm/models/exaone4/language.py106CODE
LOWmlx_vlm/models/llava_bunny/language.py102CODE
LOWmlx_vlm/models/granite/language.py94CODE
LOWmlx_vlm/models/gemma2/language.py133CODE
LOWmlx_vlm/models/mixtral/language.py127CODE
LOWmlx_vlm/models/youtu_vl/language.py281CODE
LOWmlx_vlm/models/hunyuan_vl/vision.py93CODE
LOWmlx_vlm/models/hunyuan_vl/language.py311CODE
LOWmlx_vlm/models/hunyuan_vl/processing_hunyuan_vl.py83CODE
LOWmlx_vlm/models/sam3_1/generate.py508CODE
LOWmlx_vlm/models/sam3_1/generate.py655CODE
LOWmlx_vlm/models/kimi_k3/processing_kimi_k3.py174CODE
LOWmlx_vlm/models/kimi_k3/processing_kimi_k3.py322CODE
LOWmlx_vlm/models/llmjpvl/language.py115CODE
LOWmlx_vlm/models/phi3/language.py123CODE
LOWmlx_vlm/models/gemma3/language.py176CODE
LOWmlx_vlm/models/inkling/processing_inkling.py208CODE
LOWmlx_vlm/models/inkling/audio_feature_extractor.py21CODE
LOWmlx_vlm/models/gemma4/gemma4.py70CODE
LOWmlx_vlm/models/gemma4/processing_gemma4.py113CODE
LOWmlx_vlm/models/gemma4/processing_gemma4.py276CODE
LOWmlx_vlm/models/gemma4/language.py549CODE
LOWmlx_vlm/models/gemma4/audio_feature_extractor.py118CODE
LOWmlx_vlm/models/molmo/vision.py111CODE
LOWmlx_vlm/models/molmo/processing_molmo.py165CODE
LOWmlx_vlm/models/qwen2/language.py94CODE
LOWmlx_vlm/models/flux2/pipeline.py63CODE
LOWmlx_vlm/models/flux2/transformer/transformer.py21CODE
LOWmlx_vlm/models/flux2/qwen/mlp.py17CODE
LOWmlx_vlm/models/flux2/qwen/text_encoder.py10CODE
LOWmlx_vlm/models/minicpmv4_6/processing_minicpmv4_6.py117CODE
LOWmlx_vlm/models/minicpmv4_6/processing_minicpmv4_6.py1381CODE
171 more matches not shown…
Cross-Language Confusion33 hits · 180 pts
SeverityFileLineSnippetContext
HIGHmlx_vlm/turboquant.py2732 float total_sq = (sg_id == 0 && sg_lid < 8) ? sg_norms[sg_lid] : 0.0f;CODE
HIGHmlx_vlm/turboquant.py2734 if (sg_id == 0 && sg_lid == 0) sg_norms[0] = total_sq;CODE
HIGHmlx_vlm/turboquant.py2922 float total_sq = (sg_id == 0 && sg_lid < n_sg) ? sg_norms[sg_lid] : 0.0f;CODE
HIGHmlx_vlm/turboquant.py2925 if (sg_id == 0 && sg_lid == 0) sg_norms[0] = total_sq;CODE
HIGHmlx_vlm/chat_ui.py386 return savedModel || server_model;CODE
HIGHmlx_vlm/utils.py989 # text-only quants of unified VLM families set vision_config to null,STRING
HIGHmlx_vlm/tool_parsers/gemma4.py42 - bare literals (numbers, booleans, null) via json.loadsSTRING
HIGHmlx_vlm/models/kernels.py67 if (x_out >= (uint)out_w || y_out >= (uint)out_h || bc_idx >= (uint)(batch_size * channels))CODE
HIGHmlx_vlm/models/kernels.py326 if (x_out >= (uint)out_w || y_out >= (uint)out_h || bc_idx >= (uint)(batch_size * channels))CODE
HIGHmlx_vlm/models/kernels.py336 if (align_corners && out_w > 1 && out_h > 1) {CODE
HIGHmlx_vlm/models/kernels.py538 I_nw = iy_nw >= 0 && iy_nw <= H - 1 && ix_nw >= 0 && ix_nw <= W - 1 ? I_nw : 0;CODE
HIGHmlx_vlm/models/kernels.py539 I_ne = iy_ne >= 0 && iy_ne <= H - 1 && ix_ne >= 0 && ix_ne <= W - 1 ? I_ne : 0;CODE
HIGHmlx_vlm/models/kernels.py540 I_sw = iy_sw >= 0 && iy_sw <= H - 1 && ix_sw >= 0 && ix_sw <= W - 1 ? I_sw : 0;CODE
HIGHmlx_vlm/models/kernels.py541 I_se = iy_se >= 0 && iy_se <= H - 1 && ix_se >= 0 && ix_se <= W - 1 ? I_se : 0;CODE
HIGHmlx_vlm/models/inkling/language.py73 if (i >= LQ || j >= S || bh >= B * H) return;CODE
HIGHmlx_vlm/models/inkling/language.py79 } else if (SLIDING > 0 && dist >= (int)SLIDING) {CODE
HIGHmlx_vlm/models/inkling/language.py120 } else if (SLIDING > 0 && dist >= (int)SLIDING) {CODE
HIGHmlx_vlm/models/inkling/language.py255 if (c >= C || b >= B) return;CODE
HIGHmlx_vlm/models/inkling/language.py565 if (lane == (uint)wl && lt >= 0 && sc[lt] == gb) taken[lt] = true;CODE
HIGHmlx_vlm/models/inkling/language.py646 if (sg == 0 && lane == 0) {CODE
HIGHmlx_vlm/models/minimax_m3_vl/language.py319 bool valid = block_idx >= 0 && key_pos < key_length && key_pos <= qpos;CODE
HIGHmlx_vlm/models/nemotron_voicechat/tts.py461 cond = mx.concatenate([cond[:batch_size], null], axis=0)CODE
HIGHmlx_vlm/models/nemotron_voicechat/streaming.py321 mel = self._mel_stream.push(frame)CODE
HIGHmlx_vlm/models/nemotron_voicechat/streaming.py322 chunks = self._conformer_stream.push(mel, emit_partial=True)CODE
HIGHmlx_vlm/models/qwen3_5/speculative_verifier.py300 if (simd_gid == 0 && simd_lid == 0) {CODE
HIGHmlx_vlm/models/qwen3_5/speculative_verifier.py470 if (simd_gid == 0 && simd_lid == 0) {CODE
HIGHmlx_vlm/models/qwen3_5/speculative_verifier.py622 if (n < N_SIZE && rounded > best_value) {CODE
HIGHmlx_vlm/models/qwen3_5/speculative_verifier.py635 if (simd_gid == 0 && simd_lid == 0) {CODE
HIGHmlx_vlm/models/qwen3_5/speculative_verifier.py674 "if (n < N_SIZE && rounded > best_value) {",CODE
HIGHmlx_vlm/models/qwen3_5/gated_delta.py716 bool use_intermediate = step >= 0 && step < T;CODE
HIGHmlx_vlm/models/qwen3_5/gated_delta.py735 bool use_intermediate = step >= 0 && step < T;CODE
HIGHmlx_vlm/quantization/one_bit.py71 if (lane == 0 && output_row < output_dims) {CODE
HIGHmlx_vlm/quantization/one_bit.py193 if (output_row < M && output_column + element < N) {CODE
Redundant / Tautological Comments97 hits · 152 pts
SeverityFileLineSnippetContext
LOWexamples/utils.py38 # Check if bboxes is a list of dictionariesCOMMENT
LOWmlx_vlm/utils.py1728 # Check if ffmpeg is needed for certain formatsCOMMENT
LOWmlx_vlm/evals/mmmu.py102 # Check if this is a multiple choice question (answer is A-F or I)COMMENT
LOWmlx_vlm/evals/mmmu.py129 # Check if match is correctCOMMENT
LOWmlx_vlm/evals/mmstar.py153 # Print resultsCOMMENT
LOWmlx_vlm/evals/math_vista.py53 # Check if it's a choice letterCOMMENT
LOWmlx_vlm/evals/math_vista.py62 # Check if it's directly one of the choicesCOMMENT
LOWmlx_vlm/models/cache.py2633 # Check if all caches are emptyCOMMENT
LOWmlx_vlm/models/base.py437 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/base.py440 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/base.py445 # Check if the shape has 3 dimensionsCOMMENT
LOWmlx_vlm/models/base.py448 # Check if out_channels is the largestCOMMENT
LOWmlx_vlm/models/llama4/vision.py13 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/llama4/vision.py19 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/pixtral/vision.py12 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/pixtral/vision.py18 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/plamo2vl/vision.py15 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/plamo2vl/vision.py21 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/mllama/vision.py12 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/mllama/vision.py18 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/moondream2/image_crops.py81 # Check if we need local cropsCOMMENT
LOWmlx_vlm/models/llava_bunny/vision.py14 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/llava_bunny/vision.py20 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/moondream3/image_crops.py81 # Check if we need local cropsCOMMENT
LOWmlx_vlm/models/llmjpvl/vision.py15 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/llmjpvl/vision.py21 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/gemma3/vision.py15 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/gemma3/vision.py21 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/kimi_k25/vision.py34 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/kimi_k25/vision.py40 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/deepseek_vl_v2/vision.py14 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/deepseek_vl_v2/vision.py20 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/qwen2_5_vl/vision.py13 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/qwen2_5_vl/vision.py22 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/qwen2_5_vl/language.py451 # Check if mask shape matches input shape (for chunked prefill compatibility)COMMENT
LOWmlx_vlm/models/lfm2_vl/processing_lfm2_vl.py492 # Check if we got the fast image processor and need to replace it with the slow oneCOMMENT
LOWmlx_vlm/models/lfm2_vl/processing_lfm2_vl.py786 # Check if image_rows/cols/sizes are present (numpy processor with tiling)COMMENT
LOWmlx_vlm/models/glm_ocr/language.py470 # Check if mask shape matches input shape (for chunked prefill compatibility)COMMENT
LOWmlx_vlm/models/fastvlm/vision.py497 # Check if SE-ReLU is requestedCOMMENT
LOWmlx_vlm/models/paligemma/vision.py15 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/paligemma/vision.py21 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/phi3_v/vision.py15 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/phi3_v/vision.py21 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/phi3_v/processing_phi3_v.py447 # Check if images and text inputs are reversed for BCCOMMENT
LOWmlx_vlm/models/kimi_vl/processing_kimi_vl.py45 # Check if arguments are swapped (text passed as images, images passed as text)COMMENT
LOWmlx_vlm/models/kimi_vl/processing_kimi_vl.py364 # Check if images and text inputs are reversed for BCCOMMENT
LOWmlx_vlm/models/kimi_vl/vision.py28 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/kimi_vl/vision.py34 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/deepseekocr_2/vision.py12 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/deepseekocr_2/vision.py18 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/deepseekocr_2/deepseekocr_2.py85 # Check if we have valid pixel valuesCOMMENT
LOWmlx_vlm/models/deepseekocr_2/deepseekocr_2.py95 # Check if we have valid patches (non-zero)COMMENT
LOWmlx_vlm/models/idefics3/vision.py14 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/idefics3/vision.py20 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/deepseekocr/vision.py15 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/deepseekocr/vision.py21 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/z_image/model.py81 # Check if local path with Z-Image layoutCOMMENT
LOWmlx_vlm/models/idefics2/vision.py14 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/idefics2/vision.py20 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/llava_next/vision.py14 # Check if the shape has 4 dimensionsCOMMENT
37 more matches not shown…
Cross-File Repetition23 hits · 115 pts
SeverityFileLineSnippetContext
HIGHmlx_vlm/models/hunyuan_vl/processing_hunyuan_vl.py0return combined input names from tokenizer and image processor.STRING
HIGHmlx_vlm/models/glm_ocr/processing.py0return combined input names from tokenizer and image processor.STRING
HIGHmlx_vlm/models/fastvlm/processing.py0return combined input names from tokenizer and image processor.STRING
HIGHmlx_vlm/models/glm4v_moe/processing.py0return combined input names from tokenizer and image processor.STRING
HIGHmlx_vlm/models/glm4v/processing.py0return combined input names from tokenizer and image processor.STRING
HIGHmlx_vlm/models/paddleocr_vl/processing_paddleocr_vl.py0return combined input names from tokenizer and image processor.STRING
HIGHmlx_vlm/models/qwen2_5_vl/qwen2_5_vl.py0merge image features into input embeddings at image token positions. args: image_token_id: the token id for image placehSTRING
HIGHmlx_vlm/models/glm4v_moe/glm4v_moe.py0merge image features into input embeddings at image token positions. args: image_token_id: the token id for image placehSTRING
HIGHmlx_vlm/models/glm4v/glm4v.py0merge image features into input embeddings at image token positions. args: image_token_id: the token id for image placehSTRING
HIGHmlx_vlm/models/glm_ocr/processing.py0processor for glm-4v that wraps an image processor and tokenizer. handles: - image preprocessing via image_processor - tSTRING
HIGHmlx_vlm/models/glm4v_moe/processing.py0processor for glm-4v that wraps an image processor and tokenizer. handles: - image preprocessing via image_processor - tSTRING
HIGHmlx_vlm/models/glm4v/processing.py0processor for glm-4v that wraps an image processor and tokenizer. handles: - image preprocessing via image_processor - tSTRING
HIGHmlx_vlm/models/glm_ocr/processing.py0process images/videos and text for the model. args: images: single image or list of images (pil.image, np.ndarray, etc.)STRING
HIGHmlx_vlm/models/glm4v_moe/processing.py0process images/videos and text for the model. args: images: single image or list of images (pil.image, np.ndarray, etc.)STRING
HIGHmlx_vlm/models/glm4v/processing.py0process images/videos and text for the model. args: images: single image or list of images (pil.image, np.ndarray, etc.)STRING
HIGHcomputer_use/gui_agent_voice.py0format the action as a dictionary with the following keys: {'action': 'action_type', 'value': 'element', 'position': [x,STRING
HIGHcomputer_use/autonomous_gui_agent.py0format the action as a dictionary with the following keys: {'action': 'action_type', 'value': 'element', 'position': [x,STRING
HIGHcomputer_use/gui_agent.py0format the action as a dictionary with the following keys: {'action': 'action_type', 'value': 'element', 'position': [x,STRING
HIGHcomputer_use/autonomous_gui_agent_voice.py0format the action as a dictionary with the following keys: {'action': 'action_type', 'value': 'element', 'position': [x,STRING
HIGHcomputer_use/gui_agent_voice.py01. `click`: click on an element, value is not applicable and the position [x,y] is required. 2. `input`: type a string iSTRING
HIGHcomputer_use/gui_agent.py01. `click`: click on an element, value is not applicable and the position [x,y] is required. 2. `input`: type a string iSTRING
HIGHcomputer_use/autonomous_gui_agent.py01. `click`: click on an element, value is not applicable and the position [x,y] is required. 2. `input`: type a string iSTRING
HIGHcomputer_use/autonomous_gui_agent_voice.py01. `click`: click on an element, value is not applicable and the position [x,y] is required. 2. `input`: type a string iSTRING
Self-Referential Comments21 hits · 61 pts
SeverityFileLineSnippetContext
MEDIUMmlx_vlm/tests/test_kv_cache_quantization.py147 # Create a mock for maybe_quantize_kv_cacheCOMMENT
MEDIUMmlx_vlm/tests/test_kv_cache_quantization.py160 # Create a proper mock cacheCOMMENT
MEDIUMmlx_vlm/tests/test_kv_cache_quantization.py59 # Create a return_value attribute for tests that need to modify itCOMMENT
MEDIUMmlx_vlm/tests/test_kv_cache_quantization.py436 # Create a longer input sequenceCOMMENT
MEDIUMmlx_vlm/tests/test_kv_cache_quantization.py477 # Create a mock prompt cacheCOMMENT
MEDIUMmlx_vlm/tests/test_apc_quantized.py862 # Create a 2-row batch cache with different values per rowCOMMENT
MEDIUMmlx_vlm/tests/test_models.py6445 # Create the modelCOMMENT
MEDIUMmlx_vlm/models/cache.py130 # Create an instance of cls without calling __init__COMMENT
MEDIUMmlx_vlm/models/kernels.py400 # Create the kernelSTRING
MEDIUMmlx_vlm/models/llama4/language.py260 # Create a mask for the chunked attentionCOMMENT
MEDIUMmlx_vlm/models/llava_bunny/llava_bunny.py152 # Create a final embedding of shapeCOMMENT
MEDIUMmlx_vlm/models/granite_vision/granite_vision.py137 # Create a final embedding of shapeCOMMENT
MEDIUMmlx_vlm/models/lfm2_vl/processing_lfm2_vl.py690 # Create the NumPy processor with the same configCOMMENT
MEDIUMmlx_vlm/models/fastvlm/vision.py607 """This class implements global pooling with linear projection."""STRING
MEDIUMmlx_vlm/models/llava_next/llava_next.py121 # Create a final embedding of shapeCOMMENT
MEDIUMmlx_vlm/models/sam3d_body/mhr_head.py330 # Create a mapping: for each output column d, which input column k provides it?COMMENT
MEDIUMmlx_vlm/models/multi_modality/multi_modality.py320 # Create a final embedding of shapeCOMMENT
MEDIUMmlx_vlm/generate/ar.py339 # Create the KV cache for generationCOMMENT
MEDIUMmlx_vlm/trainer/lora.py52 # Create a new Linear layer with the updated parametersCOMMENT
MEDIUMcomputer_use/autonomous_gui_agent.py77 # Create a canvas for the circleCOMMENT
MEDIUMcomputer_use/autonomous_gui_agent_voice.py77 # Create a canvas for the circleCOMMENT
Verbosity Indicators22 hits · 27 pts
SeverityFileLineSnippetContext
LOWmlx_vlm/turboquant.py2744 // Step 2: Unit vector → sharedCOMMENT
LOWmlx_vlm/turboquant.py2749 // Step 3: Rotate (1 dim per thread, 256 FMAs)COMMENT
LOWmlx_vlm/turboquant.py2757 // Step 4: Comparison-based quantizeCOMMENT
LOWmlx_vlm/turboquant.py2912 // Step 1: Load & compute norm (2-stage cross-simdgroup reduction)COMMENT
LOWmlx_vlm/turboquant.py2932 // Step 2: Unit vector → shared for rotationCOMMENT
LOWmlx_vlm/turboquant.py2937 // Step 3: Rotate — 1 dim per thread, 256 FMAs (was 2048 at TG=32)COMMENT
LOWmlx_vlm/turboquant.py2945 // Step 4: Comparison-based quantizeCOMMENT
LOWmlx_vlm/turboquant.py2955 // Step 5: Pack indices — thread-per-word, race-free, no atomics.COMMENT
LOWmlx_vlm/turboquant.py5445 # Step 1: Key scoring — polymorphic (works for both Prod and MSE keys)COMMENT
LOWmlx_vlm/turboquant.py5451 # Step 2: Precompute softmax weights (avoids exp() in value kernel)COMMENT
LOWmlx_vlm/turboquant.py5454 # Step 3: Single-tile value weighted sum with precomputed weightsCOMMENT
LOWmlx_vlm/turboquant.py2719 // Step 1: Load vector elementCOMMENT
LOWmlx_vlm/turboquant.py2772 // Step 5: Pack indices — thread-per-word, race-free, no atomics.COMMENT
LOWmlx_vlm/turboquant.py3073 " // Step 5: Pack MSE indices",CODE
LOWmlx_vlm/turboquant.py3083 " // Step 6: Residual norm",CODE
LOWmlx_vlm/turboquant.py3090 " // Step 7: QJL projection (rotated_residual @ combined_proj_t)",CODE
LOWmlx_vlm/turboquant.py3003 " // Step 1: Load & compute norm",CODE
LOWmlx_vlm/turboquant.py3058 " // Step 4: MSE quantize + compute rotated residual",CODE
LOWmlx_vlm/turboquant.py3109 " // Step 8: Pack sign bits (1 bit per dim)",CODE
LOWmlx_vlm/models/sam3_1/generate.py828 # Step 1: Backbone — always use pre-computed from previous frameCOMMENT
LOWmlx_vlm/models/sam3_1/generate.py833 # Step 2: Detect or propagateCOMMENT
LOWmlx_vlm/models/minimax/language.py300 # Step 2: Handle MoE expert weights restructuringCOMMENT
Structural Annotation Overuse22 hits · 26 pts
SeverityFileLineSnippetContext
LOWmlx_vlm/turboquant.py2744 // Step 2: Unit vector → sharedCOMMENT
LOWmlx_vlm/turboquant.py2749 // Step 3: Rotate (1 dim per thread, 256 FMAs)COMMENT
LOWmlx_vlm/turboquant.py2757 // Step 4: Comparison-based quantizeCOMMENT
LOWmlx_vlm/turboquant.py2912 // Step 1: Load & compute norm (2-stage cross-simdgroup reduction)COMMENT
LOWmlx_vlm/turboquant.py2932 // Step 2: Unit vector → shared for rotationCOMMENT
LOWmlx_vlm/turboquant.py2937 // Step 3: Rotate — 1 dim per thread, 256 FMAs (was 2048 at TG=32)COMMENT
LOWmlx_vlm/turboquant.py2945 // Step 4: Comparison-based quantizeCOMMENT
LOWmlx_vlm/turboquant.py2955 // Step 5: Pack indices — thread-per-word, race-free, no atomics.COMMENT
LOWmlx_vlm/turboquant.py5445 # Step 1: Key scoring — polymorphic (works for both Prod and MSE keys)COMMENT
LOWmlx_vlm/turboquant.py5451 # Step 2: Precompute softmax weights (avoids exp() in value kernel)COMMENT
LOWmlx_vlm/turboquant.py5454 # Step 3: Single-tile value weighted sum with precomputed weightsCOMMENT
LOWmlx_vlm/turboquant.py2719 // Step 1: Load vector elementCOMMENT
LOWmlx_vlm/turboquant.py2772 // Step 5: Pack indices — thread-per-word, race-free, no atomics.COMMENT
LOWmlx_vlm/turboquant.py3073 " // Step 5: Pack MSE indices",CODE
LOWmlx_vlm/turboquant.py3083 " // Step 6: Residual norm",CODE
LOWmlx_vlm/turboquant.py3090 " // Step 7: QJL projection (rotated_residual @ combined_proj_t)",CODE
LOWmlx_vlm/turboquant.py3003 " // Step 1: Load & compute norm",CODE
LOWmlx_vlm/turboquant.py3058 " // Step 4: MSE quantize + compute rotated residual",CODE
LOWmlx_vlm/turboquant.py3109 " // Step 8: Pack sign bits (1 bit per dim)",CODE
LOWmlx_vlm/models/sam3_1/generate.py828 # Step 1: Backbone — always use pre-computed from previous frameCOMMENT
LOWmlx_vlm/models/sam3_1/generate.py833 # Step 2: Detect or propagateCOMMENT
LOWmlx_vlm/models/minimax/language.py300 # Step 2: Handle MoE expert weights restructuringCOMMENT
Docstring Block Structure5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHmlx_vlm/utils.py788 Load and initialize the model from a given path. Args: model_path (Path): The path to load the model fSTRING
HIGHmlx_vlm/utils.py1176 Load the model and tokenizer from a given path or a huggingface repository. Args: path_or_hf_repo (strSTRING
HIGHmlx_vlm/utils.py1279Load model configuration from a path or Hugging Face repo. Args: model_path: Local path or Hugging Face repSTRING
HIGHmlx_vlm/tests/sanitize_invariants.py70Assert that ``sanitize()`` is a no-op on its own output. Args: model: the model (or submodule) whose ``saniSTRING
HIGHmlx_vlm/tests/cache_invariants.py49Assert cached, chunked prefill matches a single full forward. Args: model: a model exposing ``make_cache()`STRING
Modern AI Meta-Vocabulary5 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUMmlx_vlm/models/gemma4/README.md70- Thinking output uses `<|channel>...<channel|>` delimiters between reasoning and the final answer (see [Thinking mode](CODE
MEDIUMmlx_vlm/models/gemma4/README.md112### Thinking mode (chain-of-thought)COMMENT
MEDIUMmlx_vlm/models/deepseek_vl_v2/conversation.py33 # The number of few shot examplesCOMMENT
MEDIUMmlx_vlm/models/deepseekocr/conversation.py33 # The number of few shot examplesCOMMENT
MEDIUMmlx_vlm/speculative/drafters/mtp_split.py161 # --- shared orchestration (do not override) ---COMMENT
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALmlx_vlm/models/diffusion_gemma/diffusion_gemma.py43 logits = self._parent.model.decoder.embed_tokens.as_linear(hidden_states)CODE
AI Slop Vocabulary4 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMmlx_vlm/evals/mmstar.py121 # Use comprehensive extractionCOMMENT
LOWmlx_vlm/models/hunyuan_vl/language.py436 # Fallback: just use sequential positionsCOMMENT
MEDIUMmlx_vlm/models/florence2/language.py448 # Normalize it to decoder_input_ids so encoder-decoder decoding stays robustCOMMENT
LOWmlx_vlm/models/phi4mm/phi4mm.py481 # weights, so just return.COMMENT
Over-Commented Block6 hits · 5 pts
SeverityFileLineSnippetContext
LOWmlx_vlm/turboquant.py2821def _fused_norot_quantize_kernel(bits: int):COMMENT
LOWmlx_vlm/apc.py1061 # block_hash -> (shard_path, block_idx_in_shard)COMMENT
LOWmlx_vlm/models/gemma3n/audio.py161 ) # Shape [F, N, H]COMMENT
LOWmlx_vlm/models/qwen3_5/language.py661# of 896 threads, so requesting 1024 raises:COMMENT
LOWmlx_vlm/models/sam3d_body/mhr_body.py281COMMENT
LOWmlx_vlm/speculative/drafters/glm4_moe_lite_mtp/split.py1import argparseCOMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWmlx_vlm/tests/test_models.py7942 # TODO: Add test for vision model. Ensure I can pass input type and shapes.COMMENT