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.

17.0 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,160 GitHub stars. SynthScan v2.0 examined 250,610 lines of code across 822 source files, recording 3697 pattern matches distributed across 19 syntactic categories. The overall adjusted score of 17.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).

17.0
Adjusted Score
17.0
Raw Score
100%
Time Factor
2026-07-14
Last Push
5.2K
Stars
Python
Language
250.6K
Lines of Code
822
Files
3.7K
Pattern Hits
2026-07-14
Scan Date
0.05
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 43MEDIUM 304LOW 3349

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 3697 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 Identifiers1385 hits · 1183 pts
SeverityFileLineSnippetContext
LOWREADME.md663def 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/tokenizer_utils.py406def make_streaming_detokenizer(processor):CODE
LOWmlx_vlm/convert.py74def mixed_quant_predicate_builder(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.py4188 def _quantize_unit_with_estimate(CODE
LOWmlx_vlm/turboquant.py4363 def weighted_sum_stats_from_scores(CODE
LOWmlx_vlm/turboquant.py4422 def _dequantize_preconditioned(self, state: TurboQuantPolarState) -> mx.array:CODE
LOWmlx_vlm/turboquant.py4439 def quantize_unit_with_estimate(CODE
LOWmlx_vlm/turboquant.py4917 def weighted_sum_stats_from_scores(CODE
LOWmlx_vlm/turboquant.py5388 def _separate_score_value_decode(CODE
LOWmlx_vlm/turboquant.py5473 def _compiled_split_decode_attention(CODE
LOWmlx_vlm/turboquant.py5602 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.py168def extract_image_from_message(message):CODE
LOWmlx_vlm/chat_ui.py188def extract_text_from_message(message):CODE
LOWmlx_vlm/utils.py67def apply_generation_config_defaults(model_config, config: dict):CODE
LOWmlx_vlm/utils.py256def _transform_compressed_tensors_weights(CODE
LOWmlx_vlm/utils.py1531def process_inputs_with_fallback(CODE
LOWmlx_vlm/sample_utils.py294 def repetition_penalty_processor(tokens, logits):CODE
LOWmlx_vlm/sample_utils.py326 def presence_penalty_processor(tokens, logits):CODE
LOWmlx_vlm/sample_utils.py355 def frequency_penalty_processor(tokens, logits):CODE
LOWmlx_vlm/structured.py146 def _activate_if_thinking_done(self, token_id: int) -> bool:CODE
LOWmlx_vlm/structured.py155 def _delegate_process_last_token(CODE
LOWmlx_vlm/structured.py173 def _last_token_from_input_ids(self, input_ids: mx.array) -> int | None:CODE
LOWmlx_vlm/structured.py206def build_json_schema_logits_processor(tokenizer, schema: str | dict[str, Any]):CODE
LOWmlx_vlm/prompt_utils.py123def extract_text_from_content(content: Any) -> str:CODE
LOWmlx_vlm/prompt_utils.py171def _normalize_tool_call_arguments(message: Dict[str, Any]) -> Dict[str, Any]:CODE
LOWmlx_vlm/prompt_utils.py385 def _format_list_with_image_type(CODE
LOWmlx_vlm/prompt_utils.py651 def _messages_to_plain_prompt() -> str:CODE
LOWmlx_vlm/lora.py29def transform_dataset_to_messages(dataset, model_type, custom_prompt_format=None):CODE
LOWmlx_vlm/apc.py151def _clone_cache_entry_for_apc(CODE
LOWmlx_vlm/apc.py280def _clone_prompt_cache_for_apc(CODE
LOWmlx_vlm/apc.py301def _clone_layer_major_kv_cache_for_apc(CODE
LOWmlx_vlm/apc.py325def _cache_entry_supports_exact_apc(c: Any) -> bool:CODE
LOWmlx_vlm/apc.py350def _cache_entry_supports_block_apc(c: Any) -> bool:CODE
LOWmlx_vlm/apc.py406def multimodal_token_ids_from_config(config: Any) -> set[int]:CODE
LOWmlx_vlm/apc.py460def prefix_leaves_text_only_suffix(CODE
LOWmlx_vlm/apc.py468def prefix_contains_media_tokens(CODE
1325 more matches not shown…
Unused Imports987 hits · 908 pts
SeverityFileLineSnippetContext
LOWmlx_vlm/turboquant.py1CODE
LOWmlx_vlm/__init__.py6CODE
LOWmlx_vlm/__init__.py7CODE
LOWmlx_vlm/__init__.py7CODE
LOWmlx_vlm/__init__.py7CODE
LOWmlx_vlm/__init__.py7CODE
LOWmlx_vlm/__init__.py7CODE
LOWmlx_vlm/__init__.py7CODE
LOWmlx_vlm/__init__.py7CODE
LOWmlx_vlm/__init__.py16CODE
LOWmlx_vlm/__init__.py16CODE
LOWmlx_vlm/__init__.py17CODE
LOWmlx_vlm/__init__.py17CODE
LOWmlx_vlm/__init__.py17CODE
LOWmlx_vlm/__init__.py18CODE
LOWmlx_vlm/__init__.py19CODE
LOWmlx_vlm/apc.py41CODE
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_flux2.py1CODE
LOWmlx_vlm/tests/test_apc_exact_mode.py12CODE
LOWmlx_vlm/tests/test_apc.py1CODE
LOWmlx_vlm/tests/test_apc_adapters.py7CODE
LOWmlx_vlm/tests/test_quant_sdpa_mask.py3CODE
LOWmlx_vlm/tests/test_gemma4_assistant_masks_static.py3CODE
LOWmlx_vlm/server/generation.py11CODE
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
LOWmlx_vlm/server/__init__.py5CODE
LOWmlx_vlm/server/__init__.py5CODE
LOWmlx_vlm/server/__init__.py5CODE
LOWmlx_vlm/server/__init__.py17CODE
LOWmlx_vlm/server/__init__.py17CODE
LOWmlx_vlm/server/__init__.py18CODE
LOWmlx_vlm/server/__init__.py19CODE
LOWmlx_vlm/server/__init__.py19CODE
LOWmlx_vlm/server/__init__.py20CODE
LOWmlx_vlm/server/__init__.py21CODE
LOWmlx_vlm/server/__init__.py23CODE
LOWmlx_vlm/server/__init__.py23CODE
LOWmlx_vlm/server/__init__.py23CODE
LOWmlx_vlm/server/__init__.py23CODE
LOWmlx_vlm/server/__init__.py23CODE
LOWmlx_vlm/server/__init__.py23CODE
LOWmlx_vlm/server/__init__.py23CODE
LOWmlx_vlm/server/__init__.py23CODE
LOWmlx_vlm/server/__init__.py23CODE
LOWmlx_vlm/server/__init__.py23CODE
LOWmlx_vlm/server/__init__.py23CODE
LOWmlx_vlm/server/__init__.py23CODE
927 more matches not shown…
Decorative Section Separators246 hits · 790 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.py6107# ── Batch-aware TurboQuant cache for continuous batching ────────────────COMMENT
MEDIUMmlx_vlm/turboquant.py6139 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6141 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6153 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6155 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6209 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6211 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6289 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6291 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6337 # ------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/turboquant.py6339 # ------------------------------------------------------------------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.py2272# ── AutoProcessor patch tests ─────────────────────────────────────────────────COMMENT
MEDIUMmlx_vlm/tests/test_apc_quantized.py53# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/tests/test_apc_quantized.py55# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/tests/test_apc_quantized.py236# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/tests/test_apc_quantized.py238# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_vlm/tests/test_apc_quantized.py299# ---------------------------------------------------------------------------COMMENT
186 more matches not shown…
Deep Nesting348 hits · 321 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
LOWmlx_vlm/tokenizer_utils.py453CODE
LOWmlx_vlm/turboquant.py2230CODE
LOWmlx_vlm/turboquant.py5825CODE
LOWmlx_vlm/chat_ui.py82CODE
LOWmlx_vlm/chat_ui.py168CODE
LOWmlx_vlm/chat_ui.py188CODE
LOWmlx_vlm/chat_ui.py210CODE
LOWmlx_vlm/chat.py134CODE
LOWmlx_vlm/chat.py155CODE
LOWmlx_vlm/utils.py462CODE
LOWmlx_vlm/utils.py860CODE
LOWmlx_vlm/utils.py1239CODE
LOWmlx_vlm/utils.py1555CODE
LOWmlx_vlm/utils.py1835CODE
LOWmlx_vlm/prompt_utils.py123CODE
LOWmlx_vlm/prompt_utils.py171CODE
LOWmlx_vlm/prompt_utils.py559CODE
LOWmlx_vlm/prompt_utils.py794CODE
LOWmlx_vlm/prompt_utils.py598CODE
LOWmlx_vlm/lora.py29CODE
LOWmlx_vlm/lora.py57CODE
LOWmlx_vlm/apc.py794CODE
LOWmlx_vlm/apc.py1049CODE
LOWmlx_vlm/apc.py1318CODE
LOWmlx_vlm/apc.py1545CODE
LOWmlx_vlm/apc.py1570CODE
LOWmlx_vlm/apc.py2194CODE
LOWmlx_vlm/apc.py2792CODE
LOWmlx_vlm/apc.py2964CODE
LOWmlx_vlm/apc.py3288CODE
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/evals/mmmu.py64CODE
LOWmlx_vlm/evals/mmmu.py240CODE
LOWmlx_vlm/evals/mmstar.py17CODE
LOWmlx_vlm/evals/ocrbench.py310CODE
LOWmlx_vlm/evals/math_vista.py31CODE
LOWmlx_vlm/evals/math_vista.py361CODE
LOWmlx_vlm/tests/test_kv_cache_quantization.py199CODE
LOWmlx_vlm/tests/test_kv_cache_quantization.py243CODE
LOWmlx_vlm/tests/test_kv_cache_quantization.py288CODE
LOWmlx_vlm/tests/test_processors.py1113CODE
LOWmlx_vlm/tests/test_processors.py130CODE
LOWmlx_vlm/tests/test_processors.py157CODE
LOWmlx_vlm/tests/test_processors.py1141CODE
LOWmlx_vlm/tests/test_server_audio.py343CODE
LOWmlx_vlm/tests/test_apc_exact_mode.py195CODE
288 more matches not shown…
Excessive Try-Catch Wrapping231 hits · 259 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/tokenizer_utils.py323 except Exception:CODE
MEDIUMmlx_vlm/tokenizer_utils.py246def finalize(self):CODE
LOWmlx_vlm/chat_ui.py111 except Exception:CODE
LOWmlx_vlm/chat_ui.py126 except Exception:CODE
LOWmlx_vlm/chat_ui.py134 except Exception as e:CODE
MEDIUMmlx_vlm/chat_ui.py135 print(f"Error scanning cache: {e}")CODE
LOWmlx_vlm/chat_ui.py155 except Exception as e:CODE
LOWmlx_vlm/chat.py92 except Exception as e:CODE
LOWmlx_vlm/chat.py185 except Exception as e:CODE
LOWmlx_vlm/chat.py358 except Exception as e:CODE
LOWmlx_vlm/utils.py1215 except Exception as e:CODE
LOWmlx_vlm/utils.py1406 except Exception as e:CODE
LOWmlx_vlm/utils.py1551 except Exception as e:CODE
LOWmlx_vlm/lora.py69 except Exception:CODE
LOWmlx_vlm/lora.py79 except Exception as e:CODE
LOWmlx_vlm/apc.py385 except Exception:CODE
LOWmlx_vlm/apc.py806 except Exception:CODE
LOWmlx_vlm/apc.py827 except Exception:CODE
LOWmlx_vlm/apc.py1247 except Exception as e:CODE
LOWmlx_vlm/apc.py1636 except Exception:CODE
LOWmlx_vlm/apc.py2807 except Exception as e:CODE
LOWmlx_vlm/apc.py3157 except Exception as e:CODE
LOWmlx_vlm/apc.py3429 except Exception as e:CODE
LOWmlx_vlm/apc.py3895 except Exception:CODE
LOWmlx_vlm/apc.py3922 except Exception:CODE
LOWmlx_vlm/apc.py3930 except Exception:CODE
LOWmlx_vlm/apc.py3989 except Exception:CODE
LOWmlx_vlm/apc.py4035 except Exception:CODE
LOWmlx_vlm/apc.py4045 except Exception as exc:CODE
LOWmlx_vlm/apc.py4125 except Exception as exc:CODE
LOWmlx_vlm/apc.py4202 except Exception as e: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.py60 except Exception:CODE
LOWmlx_vlm/evals/mmmu.py150 except Exception:CODE
LOWmlx_vlm/evals/mmmu.py252 except Exception as e:CODE
LOWmlx_vlm/evals/mmmu.py261 except Exception as e:CODE
LOWmlx_vlm/evals/mmmu.py434 except Exception as e:CODE
LOWmlx_vlm/evals/mmmu.py482 except Exception as e:CODE
MEDIUMmlx_vlm/evals/mmmu.py483 print(f"Error during inference:", question, images, "error message:", e)CODE
LOWmlx_vlm/evals/ocrbench.py378 except Exception as e:CODE
LOWmlx_vlm/evals/ocrbench.py441 except Exception as e:CODE
LOWmlx_vlm/evals/math_vista.py142 except Exception:CODE
LOWmlx_vlm/evals/math_vista.py149 except Exception:CODE
LOWmlx_vlm/evals/math_vista.py167 except Exception:CODE
LOWmlx_vlm/evals/math_vista.py175 except Exception:CODE
LOWmlx_vlm/evals/math_vista.py185 except Exception:CODE
LOWmlx_vlm/evals/math_vista.py201 except Exception:CODE
LOWmlx_vlm/evals/math_vista.py208 except Exception:CODE
LOWmlx_vlm/evals/math_vista.py224 except Exception:CODE
171 more matches not shown…
AI Structural Patterns171 hits · 166 pts
SeverityFileLineSnippetContext
LOWexamples/omni.py31CODE
LOWmlx_vlm/convert.py145CODE
LOWmlx_vlm/utils.py1555CODE
LOWmlx_vlm/sample_utils.py10CODE
LOWmlx_vlm/tests/test_processors.py1667CODE
LOWmlx_vlm/tests/test_processors.py1616CODE
LOWmlx_vlm/server/generation.py516CODE
LOWmlx_vlm/server/generation.py925CODE
LOWmlx_vlm/server/app.py915CODE
LOWmlx_vlm/models/rope_utils.py134CODE
LOWmlx_vlm/models/rope_utils.py1006CODE
LOWmlx_vlm/models/kernels.py468CODE
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.py117CODE
LOWmlx_vlm/models/pixtral/image_processing_pixtral.py166CODE
LOWmlx_vlm/models/mllama/language.py285CODE
LOWmlx_vlm/models/llava_bunny/language.py112CODE
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.py507CODE
LOWmlx_vlm/models/sam3_1/generate.py654CODE
LOWmlx_vlm/models/gemma3/language.py173CODE
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.py554CODE
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.py105CODE
LOWmlx_vlm/models/flux2/pipeline.py60CODE
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
LOWmlx_vlm/models/minicpmv4_6/minicpmv4_6.py428CODE
LOWmlx_vlm/models/kimi_k25/vision.py134CODE
LOW…m/models/granite4_vision/processing_granite4_vision.py21CODE
LOWmlx_vlm/models/granite4_vision/language.py114CODE
LOWmlx_vlm/models/granite4_vision/qformer.py74CODE
LOWmlx_vlm/models/granite4_vision/qformer.py115CODE
LOW…x_vlm/models/minimax_m3_vl/processing_minimax_m3_vl.py286CODE
LOW…x_vlm/models/minimax_m3_vl/processing_minimax_m3_vl.py445CODE
LOW…x_vlm/models/minimax_m3_vl/processing_minimax_m3_vl.py835CODE
LOWmlx_vlm/models/lfm2/language.py250CODE
LOWmlx_vlm/models/qwen3/language.py111CODE
LOWmlx_vlm/models/deepseek_vl_v2/vision.py30CODE
LOW…_vlm/models/deepseek_vl_v2/processing_deepsek_vl_v2.py116CODE
LOWmlx_vlm/models/deepseek_vl_v2/language.py51CODE
LOWmlx_vlm/models/deepseek_vl_v2/language.py451CODE
LOWmlx_vlm/models/minicpmo/processing_minicpmo.py119CODE
LOWmlx_vlm/models/minicpmo/processing_minicpmo.py485CODE
LOWmlx_vlm/models/minicpmo/processing_minicpmo.py597CODE
111 more matches not shown…
Redundant / Tautological Comments91 hits · 142 pts
SeverityFileLineSnippetContext
LOWexamples/utils.py38 # Check if bboxes is a list of dictionariesCOMMENT
LOWmlx_vlm/utils.py1249 # Check if ffmpeg is needed for certain formatsCOMMENT
LOWmlx_vlm/evals/mmmu.py97 # Check if this is a multiple choice question (answer is A-F or I)COMMENT
LOWmlx_vlm/evals/mmmu.py124 # Check if match is correctCOMMENT
LOWmlx_vlm/evals/mmstar.py148 # Print resultsCOMMENT
LOWmlx_vlm/evals/math_vista.py48 # Check if it's a choice letterCOMMENT
LOWmlx_vlm/evals/math_vista.py57 # Check if it's directly one of the choicesCOMMENT
LOWmlx_vlm/models/cache.py2384 # Check if all caches are emptyCOMMENT
LOWmlx_vlm/models/base.py380 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/base.py383 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/base.py388 # Check if the shape has 3 dimensionsCOMMENT
LOWmlx_vlm/models/base.py391 # 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/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.py13 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/llava_bunny/vision.py19 # 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/gemma3/vision.py13 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/gemma3/vision.py19 # 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.py455 # Check if mask shape matches input shape (for chunked prefill compatibility)COMMENT
LOWmlx_vlm/models/lfm2_vl/processing_lfm2_vl.py280 # 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.py548 # Check if image_rows/cols/sizes are present (fast processor case)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.py13 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/paligemma/vision.py19 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/phi3_v/vision.py14 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/phi3_v/vision.py20 # 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.py12 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/idefics3/vision.py18 # 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/idefics2/vision.py13 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/idefics2/vision.py19 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/llava_next/vision.py13 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/llava_next/vision.py19 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/aya_vision/vision.py14 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_vlm/models/aya_vision/vision.py20 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_vlm/models/glm4v_moe/vision.py13 # Check if the shape has 4 or 5 dimensionsCOMMENT
LOWmlx_vlm/models/glm4v_moe/vision.py16 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
31 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
Modern Structural Boilerplate116 hits · 114 pts
SeverityFileLineSnippetContext
LOWexamples/omni.py27logger = logging.getLogger(__name__)CODE
LOWmlx_vlm/structured.py28 def _setup(self, batch_size: int) -> None:CODE
LOWmlx_vlm/lora.py23logger = logging.getLogger(__name__)CODE
LOWmlx_vlm/server/__init__.py184__all__ = [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__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/falcon_ocr/layout.py9logger = logging.getLogger(__name__)CODE
LOWmlx_vlm/models/falcon_ocr/processing_falcon_ocr.py399__all__ = [CODE
LOWmlx_vlm/models/mllama/processing_mllama.py278__all__ = ["MllamaProcessor"]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.py126__all__ = [CODE
LOWmlx_vlm/models/minimax_m3/__init__.py5__all__ = ["LanguageModel", "Model", "ModelConfig", "TextConfig"]CODE
LOW…dels/falcon_perception/processing_falcon_perception.py358__all__ = [CODE
LOWmlx_vlm/models/hunyuan_vl/processing_hunyuan_vl.py620__all__ = [CODE
LOWmlx_vlm/models/gemma3/processing_gemma3.py228__all__ = ["Gemma3Processor"]CODE
LOWmlx_vlm/models/nemotron_h/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/gemma4/processing_gemma4.py1037__all__ = ["Gemma4ImageProcessor", "Gemma4Processor", "Gemma4VideoProcessor"]CODE
LOWmlx_vlm/models/gemma4/audio_feature_extractor.py371__all__ = ["Gemma4AudioFeatureExtractor"]CODE
LOWmlx_vlm/models/deepseek_v32/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/qwen2/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/flux2/__init__.py8__all__ = ["Flux2ImageEditModel", "Flux2ImageGenerationModel", "load", "load_edit"]CODE
LOWmlx_vlm/models/flux2/model.py251__all__ = [CODE
LOWmlx_vlm/models/flux2/tokenizer.py76__all__ = ["Flux2Tokenizer", "TokenizerOutput"]CODE
LOWmlx_vlm/models/flux2/transformer/__init__.py3__all__ = ["Flux2Transformer"]CODE
LOWmlx_vlm/models/flux2/qwen/__init__.py3__all__ = ["Qwen3TextEncoder"]CODE
LOWmlx_vlm/models/flux2/vae/__init__.py3__all__ = ["Flux2VAE"]CODE
LOWmlx_vlm/models/flux2/vae/encoder/__init__.py3__all__ = ["Flux2Encoder"]CODE
LOWmlx_vlm/models/flux2/vae/decoder/__init__.py3__all__ = ["Flux2Decoder"]CODE
LOWmlx_vlm/models/flux2/vae/common/__init__.py8__all__ = [CODE
LOWmlx_vlm/models/minicpmv4_6/__init__.py11__all__ = [CODE
LOW…m/models/granite4_vision/processing_granite4_vision.py226__all__ = ["Granite4VisionProcessor"]CODE
LOW…x_vlm/models/minimax_m3_vl/processing_minimax_m3_vl.py1071__all__ = [CODE
LOWmlx_vlm/models/minimax_m3_vl/__init__.py12__all__ = [CODE
LOWmlx_vlm/models/lfm2/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/qwen3/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/gemma3_text/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_vlm/models/minicpmo/__init__.py7__all__ = [CODE
LOW…vlm/models/granite_vision/processing_granite_vision.py233__all__ = ["GraniteVisionProcessor"]STRING
LOWmlx_vlm/models/hrm_text/processing_hrm_text.py128__all__ = [CODE
LOW…vlm/models/gemma4_unified/processing_gemma4_unified.py452__all__ = [CODE
LOWmlx_vlm/models/gemma4_unified/__init__.py14__all__ = [CODE
LOWmlx_vlm/models/diffusion_gemma/__init__.py6__all__ = [CODE
LOW…m/models/diffusion_gemma/processing_diffusion_gemma.py190__all__ = ["DiffusionGemma4Processor"]CODE
LOWmlx_vlm/models/diffusion_gemma/visualizer.py139__all__ = [CODE
LOWmlx_vlm/models/qwen2_5_vl/processing_qwen2_5_vl.py203__all__ = ["Qwen2_5_VLProcessor"]CODE
LOWmlx_vlm/models/gemma3n/processing_gemma3n.py234__all__ = ["Gemma3nProcessor"]CODE
LOWmlx_vlm/models/glm_ocr/processing.py467__all__ = ["GlmOcrProcessor", "Glm46VImageProcessor", "smart_resize"]CODE
LOWmlx_vlm/models/fastvlm/processing.py501__all__ = ["FastVLMImageProcessor", "FastVLMProcessor"]CODE
LOWmlx_vlm/models/dots_ocr/processing_dots_ocr.py85__all__ = ["DotsVLProcessor"]CODE
LOWmlx_vlm/models/paligemma/processing_paligemma.py20logger = logging.getLogger(__name__)CODE
LOWmlx_vlm/models/paligemma/processing_paligemma.py338__all__ = ["PaliGemmaProcessor"]CODE
LOWmlx_vlm/models/bonsai/__init__.py4__all__ = ["BonsaiImage", "BonsaiVariant", "get_variant", "list_variants"]CODE
LOWmlx_vlm/models/bonsai/model.py134__all__ = [CODE
LOWmlx_vlm/models/bonsai/weights.py112def _set_nested_value(tree: dict, path: str, value: mx.array) -> None:CODE
LOWmlx_vlm/models/bonsai/klein_fast/__init__.py27__all__ = [CODE
LOWmlx_vlm/models/bonsai/klein_fast/loader.py255__all__ = [CODE
56 more matches not shown…
Cross-Language Confusion17 hits · 102 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.py388 return savedModel || server_model;CODE
HIGHmlx_vlm/tool_parsers/gemma4.py42 - bare literals (numbers, booleans, null) via json.loadsSTRING
HIGHmlx_vlm/models/kernels.py65 if (x_out >= (uint)out_w || y_out >= (uint)out_h || bc_idx >= (uint)(batch_size * channels))CODE
HIGHmlx_vlm/models/kernels.py324 if (x_out >= (uint)out_w || y_out >= (uint)out_h || bc_idx >= (uint)(batch_size * channels))CODE
HIGHmlx_vlm/models/kernels.py334 if (align_corners && out_w > 1 && out_h > 1) {CODE
HIGHmlx_vlm/models/kernels.py536 I_nw = iy_nw >= 0 && iy_nw <= H - 1 && ix_nw >= 0 && ix_nw <= W - 1 ? I_nw : 0;CODE
HIGHmlx_vlm/models/kernels.py537 I_ne = iy_ne >= 0 && iy_ne <= H - 1 && ix_ne >= 0 && ix_ne <= W - 1 ? I_ne : 0;CODE
HIGHmlx_vlm/models/kernels.py538 I_sw = iy_sw >= 0 && iy_sw <= H - 1 && ix_sw >= 0 && ix_sw <= W - 1 ? I_sw : 0;CODE
HIGHmlx_vlm/models/kernels.py539 I_se = iy_se >= 0 && iy_se <= H - 1 && ix_se >= 0 && ix_se <= W - 1 ? I_se : 0;CODE
HIGHmlx_vlm/models/minimax_m3_vl/language.py315 bool valid = block_idx >= 0 && key_pos < key_length && key_pos <= qpos;CODE
HIGHmlx_vlm/models/qwen3_5/language.py421 if (simd_gid == 0 && simd_lid == 0) {CODE
HIGHmlx_vlm/models/qwen3_5/gated_delta.py456 bool use_intermediate = step >= 0 && step < T;CODE
HIGHmlx_vlm/models/qwen3_5/gated_delta.py475 bool use_intermediate = step >= 0 && step < T;CODE
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.py849 # Create a 2-row batch cache with different values per rowCOMMENT
MEDIUMmlx_vlm/tests/test_models.py3380 # Create the modelCOMMENT
MEDIUMmlx_vlm/server/app.py894 # Create a list of available modelsCOMMENT
MEDIUMmlx_vlm/models/cache.py114 # Create an instance of cls without calling __init__COMMENT
MEDIUMmlx_vlm/models/kernels.py398 # 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/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.py290 # 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 Indicators21 hits · 25 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.py5427 # Step 1: Key scoring — polymorphic (works for both Prod and MSE keys)COMMENT
LOWmlx_vlm/turboquant.py5433 # Step 2: Precompute softmax weights (avoids exp() in value kernel)COMMENT
LOWmlx_vlm/turboquant.py5436 # 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.py821 # Step 1: Backbone — always use pre-computed from previous frameCOMMENT
LOWmlx_vlm/models/sam3_1/generate.py826 # Step 2: Detect or propagateCOMMENT
Structural Annotation Overuse21 hits · 24 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.py5427 # Step 1: Key scoring — polymorphic (works for both Prod and MSE keys)COMMENT
LOWmlx_vlm/turboquant.py5433 # Step 2: Precompute softmax weights (avoids exp() in value kernel)COMMENT
LOWmlx_vlm/turboquant.py5436 # 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.py821 # Step 1: Backbone — always use pre-computed from previous frameCOMMENT
LOWmlx_vlm/models/sam3_1/generate.py826 # Step 2: Detect or propagateCOMMENT
Docstring Block Structure3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHmlx_vlm/utils.py463 Load and initialize the model from a given path. Args: model_path (Path): The path to load the model fSTRING
HIGHmlx_vlm/utils.py758 Load the model and tokenizer from a given path or a huggingface repository. Args: path_or_hf_repo (strSTRING
HIGHmlx_vlm/utils.py861Load model configuration from a path or Hugging Face repo. Args: model_path: Local path or Hugging Face repSTRING
Modern AI Meta-Vocabulary4 hits · 11 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
AI Slop Vocabulary5 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMmlx_vlm/evals/mmstar.py116 # Use comprehensive extractionCOMMENT
LOWmlx_vlm/models/hunyuan_vl/language.py436 # Fallback: just use sequential positionsCOMMENT
LOWmlx_vlm/models/lfm2_vl/processing_lfm2_vl.py571 # (no tiling support, just add image tokens)COMMENT
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
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
Over-Commented Block5 hits · 4 pts
SeverityFileLineSnippetContext
LOWmlx_vlm/turboquant.py2821def _fused_norot_quantize_kernel(bits: int):COMMENT
LOWmlx_vlm/apc.py2861 # If free RAM (best-effort reading) drops below this, skip diskCOMMENT
LOWmlx_vlm/apc.py2881 # Number of disk blocks to coalesce into one direct byte-range read.COMMENT
LOWmlx_vlm/models/gemma3n/audio.py161 ) # Shape [F, N, H]COMMENT
LOWmlx_vlm/models/sam3d_body/mhr_body.py281COMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWmlx_vlm/tests/test_models.py4644 # TODO: Add test for vision model. Ensure I can pass input type and shapes.COMMENT