Run LLMs with MLX
This report presents the forensic synthetic code analysis of ml-explore/mlx-lm, a Python project with 6,828 GitHub stars. SynthScan v2.0 examined 61,912 lines of code across 224 source files, recording 378 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 6.5 places this repository in the Low 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).
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.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 378 distinct pattern matches across 15 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/server.py | 1178 | def validate_model_parameters(self): | CODE |
| LOW | mlx_lm/server.py | 1523 | def completion_usage_response( | CODE |
| LOW | mlx_lm/generate.py | 468 | def speculative_generate_step( | CODE |
| LOW | mlx_lm/convert.py | 20 | def mixed_quant_predicate_builder( | CODE |
| LOW | mlx_lm/utils.py | 1036 | def does_model_support_input_embeddings(model: nn.Module) -> bool: | CODE |
| LOW | mlx_lm/sample_utils.py | 302 | def repetition_penalty_processor(tokens, logits): | CODE |
| LOW | mlx_lm/sample_utils.py | 334 | def presence_penalty_processor(tokens, logits): | CODE |
| LOW | mlx_lm/sample_utils.py | 363 | def frequency_penalty_processor(tokens, logits): | CODE |
| LOW | mlx_lm/tool_parsers/minimax_m2.py | 27 | def _extract_types_from_schema(schema: Any) -> list[str]: | CODE |
| LOW | mlx_lm/tool_parsers/minimax_m2.py | 88 | def _convert_param_value_with_types(value: str, param_types: list[str]) -> Any: | CODE |
| LOW | mlx_lm/tool_parsers/minimax_m2.py | 152 | def _get_param_types_from_config(param_name: str, param_config: dict) -> list[str]: | CODE |
| LOW | mlx_lm/tool_parsers/glm47.py | 162 | def _parse_plain_text_tool_call(text: str, tools: list[Any] | None): | CODE |
| LOW | mlx_lm/tuner/utils.py | 194 | def print_trainable_parameters(model): | CODE |
| LOW | mlx_lm/models/rope_utils.py | 152 | def yarn_find_correction_range(): | CODE |
| LOW | mlx_lm/models/gemma3n.py | 226 | def compute_router_modalities(self, x: mx.array) -> mx.array: | CODE |
| LOW | mlx_lm/models/gemma4_text.py | 484 | def _project_per_layer_inputs( | CODE |
| LOW | mlx_lm/models/qwen3_next.py | 214 | def fix_query_key_value_ordering( | CODE |
| LOW | mlx_lm/models/gated_delta.py | 136 | def _make_gated_delta_kernel_xtree(): | STRING |
| LOW | mlx_lm/models/gated_delta.py | 231 | def _make_gated_delta_packed_kernel(): | STRING |
| LOW | mlx_lm/models/gated_delta.py | 516 | def gated_delta_kernel_unpacked( | STRING |
| LOW | mlx_lm/models/deepseek_v2.py | 56 | def yarn_find_correction_range( | CODE |
| LOW | mlx_lm/models/base.py | 64 | def quantized_scaled_dot_product_attention( | CODE |
| LOW | mlx_lm/models/base.py | 110 | def scaled_dot_product_attention( | CODE |
| LOW | mlx_lm/models/nemotron-nas.py | 85 | def _ffn_mult_to_intermediate_size(ffn_mult: float, n_embd: int) -> int: | CODE |
| LOW | mlx_lm/chat_templates/deepseek_v32.py | 84 | def tool_calls_from_openai_format(tool_calls): | STRING |
| LOW | tests/test_tuner_trainer.py | 54 | def test_iterate_batches_seed(self): | CODE |
| LOW | tests/test_tuner_utils.py | 26 | def test_quantized_print_trainable_parameters(self): | CODE |
| LOW | tests/test_tuner_utils.py | 63 | def test_print_trainable_parameters(self): | CODE |
| LOW | tests/test_tuner_utils.py | 119 | def test_unknown_tensor_name_raises(self): | CODE |
| LOW | tests/test_tuner_utils.py | 131 | def test_wrong_tensor_shape_raises(self): | CODE |
| LOW | tests/test_tuner_utils.py | 152 | def test_base_weight_tensor_rejected(self): | CODE |
| LOW | tests/test_tuner_utils.py | 164 | def test_valid_dora_adapter_loads(self): | CODE |
| LOW | tests/test_utils.py | 109 | def test_load_model_with_custom_get_classes(self): | CODE |
| LOW⚡ | tests/test_utils.py | 257 | def test_model_file_blocked_by_default(self): | STRING |
| LOW⚡ | tests/test_utils.py | 265 | def test_model_file_loads_with_trust_remote_code(self): | CODE |
| LOW⚡ | tests/test_utils.py | 273 | def test_normal_model_unaffected_by_default(self): | CODE |
| LOW | tests/test_datsets.py | 64 | def test_completions_mask_prompt(self): | CODE |
| LOW | tests/test_generate.py | 42 | def test_generate_with_logit_bias(self): | CODE |
| LOW | tests/test_generate.py | 54 | def test_stream_generate_max_tokens(self): | CODE |
| LOW | tests/test_generate.py | 71 | def test_generate_with_processor(self): | CODE |
| LOW | tests/test_generate.py | 91 | def test_stream_generate_speculative(self): | CODE |
| LOW | tests/test_generate.py | 124 | def test_stream_generate_input_embeddings(self): | CODE |
| LOW | tests/test_generate.py | 148 | def test_stream_generate_input_embeddings_prefill(self): | CODE |
| LOW | tests/test_generate.py | 187 | def test_batch_matches_single(self): | CODE |
| LOW | tests/test_generate.py | 272 | def test_batch_unique_max_toks(self): | CODE |
| LOW | tests/test_generate.py | 317 | def test_batch_sliding_window(self): | CODE |
| LOW | tests/test_generate.py | 367 | def test_batch_generate_with_logits_processors(self): | CODE |
| LOW | tests/test_generate.py | 410 | def test_batch_generate_processor_tokens_match_prompt_on_first_step(self): | CODE |
| LOW | tests/test_generate.py | 429 | def test_batch_processor_survive_a_request_without_it(self): | CODE |
| LOW | tests/test_generate.py | 457 | def test_batch_generate_function_with_logits_processors(self): | CODE |
| LOW | tests/test_generate.py | 474 | def test_batch_generate_with_samplers(self): | CODE |
| LOW | tests/test_generate.py | 506 | def test_batch_generate_with_stop_matchers(self): | CODE |
| LOW | tests/test_generate.py | 538 | def test_batch_continued_generation(self): | CODE |
| LOW | tests/test_generate.py | 618 | def _continued_generation_test_helper(self, model): | CODE |
| LOW | tests/test_generate.py | 676 | def test_batch_continued_generation_ssm(self): | CODE |
| LOW | tests/test_generate.py | 704 | def test_batch_continued_generation_gated_delta(self): | CODE |
| LOW | tests/test_generate.py | 737 | def test_extend_cache_with_empty(self): | CODE |
| LOW | tests/test_generate.py | 757 | def test_remove_prompt_batch_updates_currently_processing(self): | CODE |
| LOW | tests/test_generate.py | 788 | def test_batch_max_kv_size_creates_rotating_cache(self): | CODE |
| LOW | tests/test_generate.py | 805 | def test_batch_max_kv_size_limits_cache_growth(self): | CODE |
| 64 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/server.py | 18 | CODE | |
| LOW | mlx_lm/server.py | 18 | CODE | |
| LOW | mlx_lm/benchmark.py | 10 | CODE | |
| LOW | mlx_lm/tokenizer_utils.py | 3 | CODE | |
| LOW | mlx_lm/__init__.py | 5 | CODE | |
| LOW | mlx_lm/__init__.py | 9 | CODE | |
| LOW | mlx_lm/__init__.py | 10 | CODE | |
| LOW | mlx_lm/__init__.py | 10 | CODE | |
| LOW | mlx_lm/__init__.py | 10 | CODE | |
| LOW | mlx_lm/__init__.py | 11 | CODE | |
| LOW | mlx_lm/share.py | 15 | CODE | |
| LOW | mlx_lm/lora.py | 6 | CODE | |
| LOW | mlx_lm/tool_parsers/pythonic.py | 4 | CODE | |
| LOW | mlx_lm/tool_parsers/pythonic.py | 4 | CODE | |
| LOW | mlx_lm/quant/dynamic_quant.py | 10 | CODE | |
| LOW | mlx_lm/quant/awq.py | 6 | CODE | |
| LOW | mlx_lm/quant/awq.py | 8 | CODE | |
| LOW | mlx_lm/quant/gptq.py | 17 | CODE | |
| LOW | mlx_lm/tuner/__init__.py | 1 | CODE | |
| LOW | mlx_lm/tuner/__init__.py | 1 | CODE | |
| LOW | mlx_lm/tuner/__init__.py | 1 | CODE | |
| LOW | mlx_lm/tuner/__init__.py | 2 | CODE | |
| LOW | mlx_lm/models/phi3.py | 4 | CODE | |
| LOW | mlx_lm/models/apertus.py | 4 | CODE | |
| LOW | mlx_lm/models/bitnet.py | 4 | CODE | |
| LOW | mlx_lm/models/glm.py | 4 | CODE | |
| LOW | mlx_lm/models/glm.py | 4 | CODE | |
| LOW | mlx_lm/models/glm.py | 11 | CODE | |
| LOW | mlx_lm/models/openelm.py | 4 | CODE | |
| LOW | mlx_lm/models/muse_glimmer.py | 16 | CODE | |
| LOW | mlx_lm/models/muse_glimmer.py | 17 | CODE | |
| LOW | mlx_lm/models/bitlinear_layers.py | 5 | CODE | |
| LOW | mlx_lm/models/plamo2.py | 3 | CODE | |
| LOW | mlx_lm/models/solar_open.py | 7 | CODE | |
| LOW | mlx_lm/models/afm7.py | 7 | CODE | |
| LOW | mlx_lm/models/afm7.py | 7 | CODE | |
| LOW | mlx_lm/models/glm4_moe.py | 3 | CODE | |
| LOW | mlx_lm/models/glm4_moe.py | 5 | CODE | |
| LOW | mlx_lm/models/minimax.py | 5 | CODE | |
| LOW | mlx_lm/models/mellum.py | 9 | CODE | |
| LOW | mlx_lm/models/longcat_flash_ngram.py | 4 | CODE | |
| LOW | mlx_lm/models/lfm2-vl.py | 11 | CODE | |
| LOW | mlx_lm/models/lfm2-vl.py | 11 | CODE | |
| LOW | mlx_lm/models/nemotron_h.py | 4 | CODE | |
| LOW | mlx_lm/models/gemma4.py | 8 | CODE | |
| LOW | mlx_lm/models/gemma4.py | 8 | CODE | |
| LOW | mlx_lm/models/phixtral.py | 6 | CODE | |
| LOW | mlx_lm/models/mimo_v2_flash.py | 3 | CODE | |
| LOW | mlx_lm/models/mimo_v2_flash.py | 5 | CODE | |
| LOW | mlx_lm/models/mimo_v2_flash.py | 6 | CODE | |
| LOW | mlx_lm/models/bailing_moe_v3.py | 1 | CODE | |
| LOW | mlx_lm/models/glm_moe_dsa.py | 4 | CODE | |
| LOW | mlx_lm/models/dots1.py | 4 | CODE | |
| LOW | mlx_lm/models/pipeline.py | 3 | CODE | |
| LOW | mlx_lm/models/phimoe.py | 2 | CODE | |
| LOW | mlx_lm/models/gemma4_text.py | 11 | CODE | |
| LOW | mlx_lm/models/qwen3_next.py | 3 | CODE | |
| LOW | mlx_lm/models/qwen3_next.py | 7 | CODE | |
| LOW | mlx_lm/models/deepseek_v3.py | 5 | CODE | |
| LOW | mlx_lm/models/olmo.py | 14 | CODE | |
| 18 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/server.py | 1208 | CODE | |
| LOW | mlx_lm/generate.py | 301 | CODE | |
| LOW | mlx_lm/generate.py | 468 | CODE | |
| LOW | mlx_lm/generate.py | 1542 | CODE | |
| LOW | mlx_lm/convert.py | 85 | CODE | |
| LOW | mlx_lm/sample_utils.py | 10 | CODE | |
| LOW | mlx_lm/tuner/dora.py | 210 | CODE | |
| LOW | mlx_lm/tuner/dora.py | 224 | CODE | |
| LOW | mlx_lm/tuner/lora.py | 280 | CODE | |
| LOW | mlx_lm/models/granitemoe.py | 152 | CODE | |
| LOW | mlx_lm/models/olmo3.py | 163 | CODE | |
| LOW | mlx_lm/models/lille-130m.py | 108 | CODE | |
| LOW | mlx_lm/models/rope_utils.py | 129 | CODE | |
| LOW | mlx_lm/models/phi3.py | 156 | CODE | |
| LOW | mlx_lm/models/apertus.py | 134 | CODE | |
| LOW | mlx_lm/models/bitnet.py | 93 | CODE | |
| LOW | mlx_lm/models/bitnet.py | 143 | CODE | |
| LOW | mlx_lm/models/glm.py | 129 | CODE | |
| LOW | mlx_lm/models/openelm.py | 162 | CODE | |
| LOW | mlx_lm/models/dbrx.py | 186 | CODE | |
| LOW | mlx_lm/models/llama4.py | 205 | CODE | |
| LOW | mlx_lm/models/gemma3_text.py | 161 | CODE | |
| LOW | mlx_lm/models/afm7.py | 303 | CODE | |
| LOW | mlx_lm/models/afm7.py | 327 | CODE | |
| LOW | mlx_lm/models/afm7.py | 383 | CODE | |
| LOW | mlx_lm/models/gemma3n.py | 376 | CODE | |
| LOW | mlx_lm/models/hunyuan_v1_dense.py | 174 | CODE | |
| LOW | mlx_lm/models/olmo2.py | 147 | CODE | |
| LOW | mlx_lm/models/gpt2.py | 108 | CODE | |
| LOW | mlx_lm/models/gpt2.py | 168 | CODE | |
| LOW | mlx_lm/models/internlm2.py | 136 | CODE | |
| LOW | mlx_lm/models/mimo.py | 120 | CODE | |
| LOW | mlx_lm/models/lfm2_moe.py | 274 | CODE | |
| LOW | mlx_lm/models/Klear.py | 183 | CODE | |
| LOW | mlx_lm/models/helium.py | 121 | CODE | |
| LOW | mlx_lm/models/internlm3.py | 175 | CODE | |
| LOW | mlx_lm/models/qwen3_moe.py | 181 | CODE | |
| LOW | mlx_lm/models/starcoder2.py | 109 | CODE | |
| LOW | mlx_lm/models/minicpm.py | 141 | CODE | |
| LOW | mlx_lm/models/nemotron.py | 160 | CODE | |
| LOW | mlx_lm/models/phi3small.py | 238 | CODE | |
| LOW | mlx_lm/models/seed_oss.py | 125 | CODE | |
| LOW | mlx_lm/models/llama.py | 148 | CODE | |
| LOW | mlx_lm/models/jamba.py | 281 | CODE | |
| LOW | mlx_lm/models/qwen3_5.py | 241 | CODE | |
| LOW | mlx_lm/models/gemma2.py | 149 | CODE | |
| LOW | mlx_lm/models/gemma2.py | 201 | CODE | |
| LOW | mlx_lm/models/cohere2.py | 199 | CODE | |
| LOW | mlx_lm/models/lfm2.py | 234 | CODE | |
| LOW | mlx_lm/models/deepseek.py | 197 | CODE | |
| LOW | mlx_lm/models/minicpm3.py | 190 | CODE | |
| LOW | mlx_lm/models/youtu_llm.py | 179 | CODE | |
| LOW | mlx_lm/models/gemma.py | 122 | CODE | |
| LOW | mlx_lm/models/gemma.py | 171 | CODE | |
| LOW | mlx_lm/models/gpt_bigcode.py | 123 | CODE | |
| LOW | mlx_lm/models/qwen3_next.py | 389 | CODE | |
| LOW | mlx_lm/models/ministral3.py | 153 | CODE | |
| LOW | mlx_lm/models/qwen3.py | 126 | CODE | |
| LOW | mlx_lm/models/exaone.py | 114 | CODE | |
| LOW | mlx_lm/models/gpt_neox.py | 175 | CODE | |
| 12 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/server.py | 117 | CODE | |
| LOW | mlx_lm/server.py | 624 | CODE | |
| LOW | mlx_lm/server.py | 868 | CODE | |
| LOW | mlx_lm/server.py | 1320 | CODE | |
| LOW | mlx_lm/generate.py | 224 | CODE | |
| LOW | mlx_lm/generate.py | 468 | CODE | |
| LOW | mlx_lm/generate.py | 1924 | CODE | |
| LOW | mlx_lm/tokenizer_utils.py | 546 | CODE | |
| LOW | mlx_lm/tokenizer_utils.py | 576 | CODE | |
| LOW | mlx_lm/convert.py | 20 | CODE | |
| LOW | mlx_lm/utils.py | 309 | CODE | |
| LOW | mlx_lm/utils.py | 910 | CODE | |
| LOW | mlx_lm/share.py | 122 | CODE | |
| LOW | mlx_lm/share.py | 174 | CODE | |
| LOW | mlx_lm/share.py | 211 | CODE | |
| LOW | mlx_lm/manage.py | 38 | CODE | |
| LOW | mlx_lm/lora.py | 224 | CODE | |
| LOW | mlx_lm/tool_parsers/qwen3_coder.py | 36 | CODE | |
| LOW | mlx_lm/tool_parsers/minimax_m2.py | 27 | CODE | |
| LOW | mlx_lm/tool_parsers/minimax_m2.py | 88 | CODE | |
| LOW | mlx_lm/tool_parsers/minimax_m2.py | 159 | CODE | |
| LOW | mlx_lm/quant/awq.py | 247 | CODE | |
| LOW | mlx_lm/tuner/datasets.py | 177 | CODE | |
| LOW | mlx_lm/tuner/trainer.py | 219 | CODE | |
| LOW | mlx_lm/models/rope_utils.py | 275 | CODE | |
| LOW | mlx_lm/models/hunyuan.py | 294 | CODE | |
| LOW | mlx_lm/models/kimi_linear.py | 495 | CODE | |
| LOW | mlx_lm/models/muse_glimmer.py | 244 | CODE | |
| LOW | mlx_lm/models/gemma3n.py | 380 | CODE | |
| LOW | mlx_lm/models/glm4_moe.py | 317 | CODE | |
| LOW | mlx_lm/models/bailing_moe.py | 346 | CODE | |
| LOW | mlx_lm/models/deepseek_v32.py | 497 | CODE | |
| LOW | mlx_lm/models/olmoe.py | 197 | CODE | |
| LOW | mlx_lm/models/bailing_moe_linear.py | 531 | CODE | |
| LOW | mlx_lm/models/rwkv7.py | 163 | CODE | |
| LOW | mlx_lm/models/nemotron_h.py | 428 | CODE | |
| LOW | mlx_lm/models/cache.py | 1587 | CODE | |
| LOW | mlx_lm/models/phixtral.py | 185 | CODE | |
| LOW | mlx_lm/models/mimo_v2_flash.py | 321 | CODE | |
| LOW | mlx_lm/models/exaone_moe.py | 329 | CODE | |
| LOW | mlx_lm/models/bailing_moe_v3.py | 519 | CODE | |
| LOW | mlx_lm/models/jamba.py | 347 | CODE | |
| LOW | mlx_lm/models/dots1.py | 292 | CODE | |
| LOW | mlx_lm/models/step3p5.py | 406 | CODE | |
| LOW | mlx_lm/models/glm4_moe_lite.py | 381 | CODE | |
| LOW | mlx_lm/models/deepseek.py | 244 | CODE | |
| LOW | mlx_lm/models/phimoe.py | 188 | CODE | |
| LOW | mlx_lm/models/gemma4_text.py | 503 | CODE | |
| LOW | mlx_lm/models/gemma4_text.py | 610 | CODE | |
| LOW | mlx_lm/models/gpt_oss.py | 243 | CODE | |
| LOW | mlx_lm/models/afmoe.py | 354 | CODE | |
| LOW | mlx_lm/models/longcat_flash.py | 391 | CODE | |
| LOW | mlx_lm/models/ministral3.py | 267 | CODE | |
| LOW | mlx_lm/models/deepseek_v3.py | 380 | CODE | |
| LOW | mlx_lm/models/deepseek_v2.py | 430 | CODE | |
| LOW | mlx_lm/models/mixtral.py | 205 | CODE | |
| LOW | mlx_lm/models/qwen2_moe.py | 221 | CODE | |
| LOW | mlx_lm/models/falcon_h1.py | 459 | CODE | |
| LOW | mlx_lm/models/kimi_vl.py | 84 | CODE | |
| LOW | mlx_lm/chat_templates/deepseek_v32.py | 151 | CODE | |
| 4 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | mlx_lm/server.py | 871 | # Define the progress callback | COMMENT |
| MEDIUM | mlx_lm/server.py | 1149 | # Create the completion request | COMMENT |
| MEDIUM | mlx_lm/server.py | 1369 | # Create the token generator | COMMENT |
| MEDIUM | mlx_lm/server.py | 1642 | # Create a list of available models | COMMENT |
| MEDIUM | mlx_lm/generate.py | 364 | # Create the KV cache for generation | COMMENT |
| MEDIUM | mlx_lm/generate.py | 516 | # Create the KV cache for generation | COMMENT |
| MEDIUM | mlx_lm/models/cache.py | 171 | # Create an instance of cls without calling __init__ | COMMENT |
| MEDIUM | mlx_lm/models/minicpm3.py | 128 | # Create the full query and key tensors by combining the parts | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/server.py | 677 | except Exception as e: | CODE |
| LOW | mlx_lm/server.py | 745 | except Exception as e: | CODE |
| LOW | mlx_lm/server.py | 972 | except Exception as e: | CODE |
| LOW | mlx_lm/server.py | 1376 | except Exception as e: | CODE |
| LOW | mlx_lm/share.py | 260 | except Exception as e: | CODE |
| LOW | mlx_lm/tool_parsers/longcat.py | 40 | except Exception: | CODE |
| LOW | mlx_lm/tool_parsers/longcat.py | 45 | except Exception: | CODE |
| LOW | mlx_lm/tool_parsers/kimi_k2.py | 30 | except Exception: | CODE |
| LOW | mlx_lm/tool_parsers/kimi_k2.py | 35 | except Exception: | CODE |
| LOW | mlx_lm/tool_parsers/glm47.py | 45 | except Exception: | CODE |
| LOW | mlx_lm/tool_parsers/glm47.py | 50 | except Exception: | CODE |
| LOW | mlx_lm/tool_parsers/glm47.py | 81 | except Exception: | CODE |
| LOW | tests/test_server.py | 564 | except Exception as e: | CODE |
| MEDIUM | benchmarks/server_benchmark.py | 145 | print(f"Error {response.status}: {error_body}") | CODE |
| LOW | benchmarks/server_benchmark.py | 167 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | mlx_lm/utils.py | 317 | Load and initialize the model from a given path. Args: model_path (Path): The path to load the model f | STRING |
| HIGH | mlx_lm/utils.py | 509 | Load the model and tokenizer from a given path or a huggingface repository. Args: path_or_hf_repo (Pat | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/generate.py | 1814 | # Check if we have sequences and add them to the prompt batch | COMMENT |
| LOW | mlx_lm/perplexity.py | 179 | # Print results | COMMENT |
| LOW | mlx_lm/share.py | 247 | # Check if any node has the data | COMMENT |
| LOW | mlx_lm/models/cache.py | 1609 | # Check if we found a prefix at any point | COMMENT |
| LOW | mlx_lm/models/granitemoehybrid.py | 243 | # Check if RoPE should be used based on position_embedding_type | COMMENT |
| LOW | mlx_lm/models/falcon_h1.py | 460 | # Check if needs sanitization | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | mlx_lm/models/cache.py | 1726 | self._lru.push(model, tokens, cache_type) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | mlx_lm/models/muse_glimmer.py | 5 | # text/agentic inference needs. Architecture verified against Meta's reference | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/models/muse_glimmer.py | 1 | # Copyright © 2026 Apple Inc. | COMMENT |
| LOW | mlx_lm/examples/lora_config.yaml | 1 | # The path to the local model directory or Hugging Face repo. | COMMENT |
| LOW | mlx_lm/examples/lora_config.yaml | 81 | dropout: 0.0 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/models/minimax.py | 308 | # Step 2: Handle MoE expert weights restructuring | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/models/minimax.py | 308 | # Step 2: Handle MoE expert weights restructuring | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/examples/tool_use.py | 15 | # An example tool, make sure to include a docstring and type hints | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/__init__.py | 13 | __all__ = [ | CODE |