Run LLMs with MLX
This report summarizes scanner evidence for ml-explore/mlx-lm, a Python project with 7,267 GitHub stars. SynthScan examined 72,608 lines of code across 241 source files, recording 413 pattern matches distributed across 16 syntactic categories. The legacy adjusted pattern signal is 7.1 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 355 finding(s).
Are imports declared and package/API names verified? 19 finding(s).
Are wrappers, guards, and repeated structures necessary? 296 finding(s).
Which changes need focused human review? 413 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 413 distinct pattern matches across 16 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/server.py | 1234 | def validate_model_parameters(self) -> None: | CODE |
| LOW | mlx_lm/server.py | 1579 | def completion_usage_response( | CODE |
| LOW | mlx_lm/generate.py | 476 | def speculative_generate_step( | CODE |
| LOW | mlx_lm/generate.py | 848 | def _normalize_logits_processors(logits_processors, *, n): | CODE |
| LOW | mlx_lm/tokenizer_utils.py | 313 | def _infer_structural_markers(tokenizer): | CODE |
| LOW | mlx_lm/convert.py | 20 | def mixed_quant_predicate_builder( | CODE |
| LOW | mlx_lm/utils.py | 74 | def maybe_set_recommended_wired_limit() -> Optional[int]: | CODE |
| LOW | mlx_lm/utils.py | 309 | def _compressed_tensors_quantization(quantization_config: dict) -> dict: | CODE |
| LOW | mlx_lm/utils.py | 1206 | def does_model_support_input_embeddings(model: nn.Module) -> bool: | CODE |
| LOW | mlx_lm/sample_utils.py | 294 | def repetition_penalty_processor(tokens, logits): | CODE |
| LOW | mlx_lm/sample_utils.py | 326 | def presence_penalty_processor(tokens, logits): | CODE |
| LOW | mlx_lm/sample_utils.py | 355 | def frequency_penalty_processor(tokens, logits): | CODE |
| LOW | mlx_lm/tool_parsers/minimax_m2.py | 30 | def _extract_types_from_schema(schema: Any) -> list[str]: | CODE |
| LOW | mlx_lm/tool_parsers/minimax_m2.py | 91 | def _convert_param_value_with_types(value: str, param_types: list[str]) -> Any: | CODE |
| LOW | mlx_lm/tool_parsers/minimax_m2.py | 159 | 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/tool_parsers/pythonic.py | 65 | def _parse_pythonic_tool_call(text: str) -> ToolCall | list[ToolCall] | None: | CODE |
| LOW | mlx_lm/tuner/utils.py | 195 | def print_trainable_parameters(model): | CODE |
| LOW | mlx_lm/models/rope_utils.py | 150 | def yarn_find_correction_range(): | CODE |
| LOW | mlx_lm/models/gemma3n.py | 223 | def compute_router_modalities(self, x: mx.array) -> mx.array: | CODE |
| LOW | mlx_lm/models/gemma4_text.py | 486 | def _project_per_layer_inputs( | CODE |
| LOW | mlx_lm/models/qwen3_next.py | 207 | def fix_query_key_value_ordering( | CODE |
| LOW | mlx_lm/models/gated_delta.py | 152 | def _make_gated_delta_kernel_xtree(): | STRING |
| LOW | mlx_lm/models/gated_delta.py | 247 | def _make_gated_delta_packed_kernel(): | STRING |
| LOW | mlx_lm/models/gated_delta.py | 532 | 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 | 83 | def tool_calls_from_openai_format(tool_calls): | STRING |
| LOW | tests/test_tuner_trainer.py | 52 | def test_iterate_batches_seed(self): | CODE |
| LOW | tests/test_tuner_trainer.py | 135 | def test_granitemoehybrid_backward(self): | CODE |
| LOW | tests/test_tuner_trainer.py | 190 | def test_switch_layers_backward(self): | CODE |
| LOW | tests/test_tuner_trainer.py | 206 | def test_group_expert_select_backward(self): | CODE |
| LOW | tests/test_tool_parsing.py | 196 | def test_pythonic_single_quoted_args_with_commas(self): | CODE |
| LOW | tests/test_tool_parsing.py | 278 | def test_pythonic_nested_args(self): | CODE |
| LOW | tests/test_tool_parsing.py | 298 | def test_pythonic_parallel_calls(self): | CODE |
| LOW | tests/test_tool_parsing.py | 308 | def test_pythonic_invalid_calls(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 | 46 | def test_load_config_decodes_tagged_floats(self): | CODE |
| LOW | tests/test_utils.py | 96 | def test_make_shards_oversized_weight(self): | CODE |
| LOW | tests/test_utils.py | 157 | def test_load_model_with_custom_get_classes(self): | CODE |
| LOW | tests/test_utils.py | 283 | def test_infer_quant_config_unknown_packing(self): | CODE |
| LOW | tests/test_utils.py | 294 | def test_load_model_with_mixed_bit_derived_mla_projection(self): | CODE |
| LOW⚡ | tests/test_utils.py | 407 | def test_model_file_blocked_by_default(self): | STRING |
| LOW⚡ | tests/test_utils.py | 415 | def test_model_file_loads_with_trust_remote_code(self): | CODE |
| LOW⚡ | tests/test_utils.py | 423 | def test_normal_model_unaffected_by_default(self): | CODE |
| LOW | tests/test_utils.py | 441 | def test_compressed_tensors_known_formats(self): | CODE |
| LOW | tests/test_utils.py | 455 | def test_compressed_tensors_float_quantized_is_rejected(self): | CODE |
| LOW | tests/test_datsets.py | 64 | def test_completions_mask_prompt(self): | CODE |
| LOW | tests/test_tokenizers.py | 77 | def test_detokenizers_are_independent(self): | CODE |
| LOW | tests/test_tokenizers.py | 102 | def test_naive_detokenizer_holds_back_partial_characters(self): | CODE |
| LOW | tests/test_deepseek_v41.py | 30 | def test_cached_matches_forward(self): | CODE |
| LOW | tests/test_generate.py | 36 | def test_generate_step_processor_sees_prefilled_prompt(self): | CODE |
| LOW | tests/test_generate.py | 58 | def test_generate_with_logit_bias(self): | CODE |
| 123 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | mlx_lm/server.py | 487 | except QueueEmpty: | CODE |
| HIGH | mlx_lm/tokenizer_utils.py | 333 | except (ValueError, TypeError): | CODE |
| HIGH | mlx_lm/utils.py | 373 | except json.JSONDecodeError: | CODE |
| HIGH | mlx_lm/share.py | 259 | except Exception: | CODE |
| HIGH | mlx_lm/tool_parsers/longcat.py | 40 | except Exception: | CODE |
| HIGH | mlx_lm/tool_parsers/longcat.py | 45 | except Exception: | CODE |
| HIGH | mlx_lm/tool_parsers/longcat.py | 56 | except json.JSONDecodeError: | CODE |
| HIGH | mlx_lm/tool_parsers/qwen3_coder.py | 85 | except json.JSONDecodeError: | CODE |
| HIGH | mlx_lm/tool_parsers/minimax_m2.py | 145 | except json.JSONDecodeError: | CODE |
| HIGH | mlx_lm/tool_parsers/kimi_k2.py | 31 | except Exception: | CODE |
| HIGH | mlx_lm/tool_parsers/kimi_k2.py | 36 | except Exception: | CODE |
| HIGH | mlx_lm/tool_parsers/glm47.py | 45 | except Exception: | CODE |
| HIGH | mlx_lm/tool_parsers/glm47.py | 50 | except Exception: | CODE |
| HIGH | mlx_lm/tool_parsers/pythonic.py | 106 | except (ValueError, SyntaxError): | CODE |
| HIGH | mlx_lm/models/cache.py | 1624 | except ValueError: | CODE |
| HIGH | mlx_lm/models/gemma4_text.py | 637 | except (IndexError, ValueError): | CODE |
| HIGH | tests/test_server.py | 686 | except (BrokenPipeError, ConnectionResetError, OSError): | CODE |
| HIGH | tests/test_chat.py | 112 | except SystemExit: | CODE |
| HIGH | tests/test_chat.py | 169 | except SystemExit: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/server.py | 1264 | CODE | |
| LOW | mlx_lm/generate.py | 304 | CODE | |
| LOW | mlx_lm/generate.py | 476 | CODE | |
| LOW | mlx_lm/generate.py | 1523 | CODE | |
| LOW | mlx_lm/convert.py | 85 | CODE | |
| LOW | mlx_lm/sample_utils.py | 13 | 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 | 127 | CODE | |
| LOW | mlx_lm/models/phi3.py | 156 | CODE | |
| LOW | mlx_lm/models/apertus.py | 133 | CODE | |
| LOW | mlx_lm/models/bitnet.py | 92 | CODE | |
| LOW | mlx_lm/models/bitnet.py | 142 | CODE | |
| LOW | mlx_lm/models/glm.py | 128 | CODE | |
| LOW | mlx_lm/models/openelm.py | 162 | CODE | |
| LOW | mlx_lm/models/dbrx.py | 186 | CODE | |
| LOW | mlx_lm/models/llama4.py | 206 | CODE | |
| LOW | mlx_lm/models/gemma3_text.py | 161 | CODE | |
| LOW | mlx_lm/models/afm7.py | 302 | CODE | |
| LOW | mlx_lm/models/afm7.py | 326 | CODE | |
| LOW | mlx_lm/models/afm7.py | 382 | CODE | |
| LOW | mlx_lm/models/gemma3n.py | 375 | 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 | 276 | CODE | |
| LOW | mlx_lm/models/Klear.py | 184 | CODE | |
| LOW | mlx_lm/models/helium.py | 121 | CODE | |
| LOW | mlx_lm/models/internlm3.py | 175 | CODE | |
| LOW | mlx_lm/models/qwen3_moe.py | 182 | 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 | 240 | 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 | 242 | CODE | |
| LOW | mlx_lm/models/deepseek.py | 199 | 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 | 381 | CODE | |
| LOW | mlx_lm/models/ministral3.py | 164 | CODE | |
| LOW | mlx_lm/models/qwen3.py | 137 | CODE | |
| LOW | mlx_lm/models/exaone.py | 114 | CODE | |
| LOW | mlx_lm/models/gpt_neox.py | 175 | CODE | |
| 14 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/server.py | 121 | CODE | |
| LOW | mlx_lm/server.py | 656 | CODE | |
| LOW | mlx_lm/server.py | 904 | CODE | |
| LOW | mlx_lm/server.py | 1376 | CODE | |
| LOW | mlx_lm/generate.py | 476 | CODE | |
| LOW | mlx_lm/generate.py | 1910 | CODE | |
| LOW | mlx_lm/generate.py | 1355 | CODE | |
| LOW | mlx_lm/tokenizer_utils.py | 619 | CODE | |
| LOW | mlx_lm/tokenizer_utils.py | 663 | CODE | |
| LOW | mlx_lm/convert.py | 20 | CODE | |
| LOW | mlx_lm/utils.py | 409 | CODE | |
| LOW | mlx_lm/utils.py | 696 | CODE | |
| LOW | mlx_lm/utils.py | 1080 | CODE | |
| LOW | mlx_lm/share.py | 121 | CODE | |
| LOW | mlx_lm/share.py | 173 | CODE | |
| LOW | mlx_lm/share.py | 210 | CODE | |
| LOW | mlx_lm/manage.py | 40 | CODE | |
| LOW | mlx_lm/lora.py | 225 | CODE | |
| LOW | mlx_lm/tool_parsers/qwen3_coder.py | 37 | CODE | |
| LOW | mlx_lm/tool_parsers/minimax_m2.py | 30 | CODE | |
| LOW | mlx_lm/tool_parsers/minimax_m2.py | 91 | CODE | |
| LOW | mlx_lm/tool_parsers/minimax_m2.py | 166 | CODE | |
| LOW | mlx_lm/quant/awq.py | 248 | CODE | |
| LOW | mlx_lm/tuner/datasets.py | 178 | CODE | |
| LOW | mlx_lm/tuner/trainer.py | 221 | CODE | |
| LOW | mlx_lm/models/rope_utils.py | 291 | CODE | |
| LOW | mlx_lm/models/hunyuan.py | 294 | CODE | |
| LOW | mlx_lm/models/kimi_linear.py | 491 | CODE | |
| LOW | mlx_lm/models/muse_glimmer.py | 245 | CODE | |
| LOW | mlx_lm/models/gemma3n.py | 379 | CODE | |
| LOW | mlx_lm/models/glm4_moe.py | 319 | CODE | |
| LOW | mlx_lm/models/minimax_m3_vl.py | 474 | CODE | |
| LOW | mlx_lm/models/bailing_moe.py | 347 | CODE | |
| LOW | mlx_lm/models/deepseek_v32.py | 485 | CODE | |
| LOW | mlx_lm/models/bailing_hybrid.py | 660 | CODE | |
| LOW | mlx_lm/models/olmoe.py | 197 | CODE | |
| LOW | mlx_lm/models/bailing_moe_linear.py | 529 | CODE | |
| LOW | mlx_lm/models/rwkv7.py | 163 | CODE | |
| LOW | mlx_lm/models/nemotron_h.py | 450 | CODE | |
| LOW | mlx_lm/models/cache.py | 43 | CODE | |
| LOW | mlx_lm/models/cache.py | 82 | CODE | |
| LOW | mlx_lm/models/cache.py | 58 | CODE | |
| LOW | mlx_lm/models/cache.py | 1554 | CODE | |
| LOW | mlx_lm/models/phixtral.py | 187 | CODE | |
| LOW | mlx_lm/models/mimo_v2_flash.py | 323 | CODE | |
| LOW | mlx_lm/models/laguna.py | 352 | CODE | |
| LOW | mlx_lm/models/exaone_moe.py | 330 | CODE | |
| LOW | mlx_lm/models/bailing_moe_v3.py | 514 | CODE | |
| LOW | mlx_lm/models/jamba.py | 347 | CODE | |
| LOW | mlx_lm/models/dots1.py | 296 | CODE | |
| LOW | mlx_lm/models/step3p5.py | 407 | CODE | |
| LOW | mlx_lm/models/glm4_moe_lite.py | 384 | CODE | |
| LOW | mlx_lm/models/deepseek.py | 246 | CODE | |
| LOW | mlx_lm/models/kimi_k3.py | 898 | CODE | |
| LOW | mlx_lm/models/phimoe.py | 216 | CODE | |
| LOW | mlx_lm/models/gemma4_text.py | 505 | CODE | |
| LOW | mlx_lm/models/gemma4_text.py | 612 | CODE | |
| LOW | mlx_lm/models/mistral4.py | 389 | CODE | |
| LOW | mlx_lm/models/gpt_oss.py | 220 | CODE | |
| LOW | mlx_lm/models/afmoe.py | 355 | CODE | |
| 15 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | mlx_lm/server.py | 907 | # Define the progress callback | COMMENT |
| MEDIUM | mlx_lm/server.py | 1205 | # Create the completion request | COMMENT |
| MEDIUM | mlx_lm/server.py | 1425 | # Create the token generator | COMMENT |
| MEDIUM | mlx_lm/server.py | 1702 | # Create a list of available models | COMMENT |
| MEDIUM | mlx_lm/generate.py | 368 | # Create the KV cache for generation | COMMENT |
| MEDIUM | mlx_lm/generate.py | 525 | # Create the KV cache for generation | COMMENT |
| MEDIUM | mlx_lm/models/cache.py | 189 | # 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 | 450 | except Exception as e: | CODE |
| LOW | mlx_lm/server.py | 708 | except Exception as e: | CODE |
| LOW | mlx_lm/server.py | 776 | except Exception as e: | CODE |
| LOW | mlx_lm/server.py | 1010 | except Exception as e: | CODE |
| LOW | mlx_lm/server.py | 1432 | except Exception as e: | CODE |
| MEDIUM | mlx_lm/server.py | 447 | def _run_generate(self): | CODE |
| LOW | mlx_lm/share.py | 259 | except Exception: | 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 | 31 | except Exception: | CODE |
| LOW | mlx_lm/tool_parsers/kimi_k2.py | 36 | 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 | 713 | except Exception as e: | CODE |
| MEDIUM | benchmarks/server_benchmark.py | 146 | print(f"Error {response.status}: {error_body}") | CODE |
| LOW | benchmarks/server_benchmark.py | 168 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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/tool_parsers/laguna.py | 11 | CODE | |
| LOW | mlx_lm/tool_parsers/laguna.py | 11 | CODE | |
| LOW | mlx_lm/tool_parsers/laguna.py | 11 | CODE | |
| LOW | mlx_lm/tuner/__init__.py | 3 | CODE | |
| LOW | mlx_lm/tuner/__init__.py | 3 | CODE | |
| LOW | mlx_lm/tuner/__init__.py | 3 | CODE | |
| LOW | mlx_lm/tuner/__init__.py | 4 | CODE | |
| LOW | mlx_lm/models/solar_open.py | 7 | CODE | |
| LOW | mlx_lm/models/bailing_moe_v3.py | 3 | CODE | |
| LOW | mlx_lm/models/qwen3_next.py | 3 | CODE | |
| LOW | mlx_lm/models/olmo.py | 14 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | mlx_lm/utils.py | 417 | 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 | 648 | 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 |
|---|---|---|---|---|
| HIGH | mlx_lm/models/cache.py | 1695 | self._lru.push(model, tokens, cache_type) | CODE |
| HIGH | tests/test_tool_parsing.py | 282 | 'ingredientList=[{"name": "noodles", "organic": true, "unit": null}], ' | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/generate.py | 1801 | # Check if we have sequences and add them to the prompt batch | COMMENT |
| LOW | mlx_lm/perplexity.py | 180 | # Print results | COMMENT |
| LOW | mlx_lm/share.py | 246 | # Check if any node has the data | COMMENT |
| LOW | mlx_lm/models/cache.py | 1576 | # Check if we found a prefix at any point | COMMENT |
| LOW | mlx_lm/models/granitemoehybrid.py | 253 | # Check if RoPE should be used based on position_embedding_type | COMMENT |
| LOW | mlx_lm/models/falcon_h1.py | 458 | # Check if needs sanitization | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/__init__.py | 13 | __all__ = [ | CODE |
| LOW | mlx_lm/generate_utils.py | 8 | __all__ = ["BatchCounters", "BatchCountersSnapshot", "BatchStats"] | CODE |
| LOW | mlx_lm/tool_parsers/laguna.py | 13 | __all__ = ["parse_tool_call", "tool_call_start", "tool_call_end"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | mlx_lm/models/muse_glimmer.py | 6 | # 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 | examples/lora_config.yaml | 1 | # The path to the local model directory or Hugging Face repo. | COMMENT |
| LOW | examples/lora_config.yaml | 81 | dropout: 0.0 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/models/minimax.py | 309 | # Step 2: Handle MoE expert weights restructuring | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlx_lm/models/minimax.py | 309 | # Step 2: Handle MoE expert weights restructuring | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/tool_use.py | 14 | # An example tool, make sure to include a docstring and type hints | COMMENT |