MCPcopy Create free account

hub / github.com/ml-explore/mlx-lm / functions

Functions2,622 in github.com/ml-explore/mlx-lm

↓ 1 callersMethod_next_request
(self, timeout=None)
mlx_lm/server.py:472
↓ 1 callersFunction_normalize
(x, norm2, w, eps)
mlx_lm/models/minimax.py:44
↓ 1 callersFunction_pad_inputs
(inputs)
mlx_lm/evaluate.py:48
↓ 1 callersFunction_parse_json_tool_call
(text: str, tools: list[Any] | None)
mlx_lm/tool_parsers/glm47.py:78
↓ 1 callersFunction_parse_key_value_pairs
( text: str, func_name: str, tools: list[Any] | None, string_args: set[str] | None = None, )
mlx_lm/tool_parsers/glm47.py:127
↓ 1 callersFunction_parse_plain_text_tool_call
(text: str, tools: list[Any] | None)
mlx_lm/tool_parsers/glm47.py:162
↓ 1 callersFunction_parse_xml_function_call
(function_call_str: str, tools: Optional[Any])
mlx_lm/tool_parsers/qwen3_coder.py:82
↓ 1 callersFunction_precise_swiglu
(h, gate, x)
mlx_lm/models/qwen3_next.py:59
↓ 1 callersMethod_process_prompt
(self, prompt, step_size: int = 2048)
mlx_lm/evaluate.py:97
↓ 1 callersMethod_process_sequence
(self, x, conv_cache, state_cache)
mlx_lm/models/mamba.py:124
↓ 1 callersMethod_process_sequence
(self, x, conv_state, ssm_state)
mlx_lm/models/jamba.py:196
↓ 1 callersMethod_project_per_layer_inputs
( self, input_embeddings: mx.array, per_layer_inputs: Optional[mx.array] = None, )
mlx_lm/models/gemma4_text.py:484
↓ 1 callersFunction_right_pad_prompts
(prompts, max_length=None)
mlx_lm/generate.py:808
↓ 1 callersFunction_rstrip_until
Limit a string <s> to the first occurrence of any substring in untils.
mlx_lm/evaluate.py:33
↓ 1 callersFunction_run_http_server
( host: str, port: int, response_generator, server_class=ThreadingHTTPServer, handler_clas
mlx_lm/server.py:1702
↓ 1 callersMethod_serve_single
(self, request)
mlx_lm/server.py:922
↓ 1 callersMethod_set_stream_headers
(self, status_code: int = 200)
mlx_lm/server.py:1091
↓ 1 callersMethod_share_request
(self, request)
mlx_lm/server.py:504
↓ 1 callersMethod_shift_right
(self, x: mx.array, n: int)
mlx_lm/models/longcat_flash_ngram.py:84
↓ 1 callersFunction_silu_mul
(gate: mx.array, up: mx.array)
mlx_lm/models/iquestloopcoder.py:24
↓ 1 callersMethod_ssm
( self, hidden_states: mx.array, B: mx.array, C: mx.array, dt: mx.arra
mlx_lm/models/falcon_h1.py:270
↓ 1 callersMethod_ssm
( self, hidden_states: mx.array, B: mx.array, C: mx.array, dt: mx.arra
mlx_lm/models/granitemoehybrid.py:157
↓ 1 callersMethod_ssm
( self, hidden_states: mx.array, B: mx.array, C: mx.array, dt: mx.arra
mlx_lm/models/mamba2.py:131
↓ 1 callersMethod_ssm
( self, x: mx.array, B: mx.array, C: mx.array, dt: mx.array, c
mlx_lm/models/plamo2.py:139
↓ 1 callersMethod_ssm
( self, hidden_states: mx.array, B: mx.array, C: mx.array, dt: mx.arra
mlx_lm/models/nemotron_h.py:168
↓ 1 callersFunction_step
(dtx, dtA, B, C, state, mask)
mlx_lm/models/ssm.py:157
↓ 1 callersFunction_step_trie
One step in the Aho-Corasick trie.
mlx_lm/generate.py:934
↓ 1 callersFunction_transform_awq_weights
( weights: Dict[str, mx.array], quantization_config: Dict[str, Any], )
mlx_lm/utils.py:83
↓ 1 callersMethod_update_concat
(self, keys, values)
mlx_lm/models/cache.py:449
↓ 1 callersMethod_update_concat
(self, keys, values)
mlx_lm/models/cache.py:1169
↓ 1 callersMethod_update_in_place
(self, keys, values)
mlx_lm/models/cache.py:469
↓ 1 callersMethod_update_in_place
(self, keys, values)
mlx_lm/models/cache.py:1208
↓ 1 callersMethod_wkv7
(self, r, w, k, v, a, b, state)
mlx_lm/models/rwkv7.py:295
↓ 1 callersFunction_wkv7_step_ops
(r, w, k, v, a, b, state)
mlx_lm/models/rwkv7.py:41
↓ 1 callersMethodadd_eos_token
(self, token: str)
mlx_lm/tokenizer_utils.py:348
↓ 1 callersMethodadded_tokens
(self)
mlx_lm/gguf.py:77
↓ 1 callersFunctionaggregate_expert_outputs
(expert_outputs, scores)
mlx_lm/models/bailing_moe.py:54
↓ 1 callersMethodall_tokens
(self)
mlx_lm/gguf.py:90
↓ 1 callersFunctionapply_scale
(prev_op, layers, scales)
mlx_lm/quant/awq.py:247
↓ 1 callersFunctionask_for_confirmation
Ask user for confirmation with Y/N prompt. Returns True for Y/yes, False for N/no/empty.
mlx_lm/manage.py:23
↓ 1 callersMethodattend
( self, x: mx.array, mask: Optional[mx.array] = None, cache: Optional[Any] = N
mlx_lm/models/olmo.py:68
↓ 1 callersFunctionavg
(k)
mlx_lm/benchmark.py:160
↓ 1 callersFunctionawq_quantize
( model, inputs: mx.array, awq_config: AWQConfig, group_size: int = 64, bits: int = 3,
mlx_lm/quant/awq.py:399
↓ 1 callersFunctionbitnet_quantize
(model, quantization_config: dict)
mlx_lm/models/bitlinear_layers.py:9
↓ 1 callersFunctionbuild_parser
()
mlx_lm/lora.py:81
↓ 1 callersFunctioncategorical_sampling
(logits, temp)
mlx_lm/sample_utils.py:278
↓ 1 callersFunctionclip_block
( block: nn.Module, no_clip_keys: list[str], quantize_func: Callable, group_size: int, n_g
mlx_lm/quant/awq.py:377
↓ 1 callersMethodcompletion_usage_response
( self, prompt_token_count: Optional[int] = None, completion_token_count: Optional[int
mlx_lm/server.py:1554
↓ 1 callersFunctioncompute_dwq_targets
( model, save_dir, train_data, valid_data, batch_size, max_seq_length, seed, )
mlx_lm/quant/dwq.py:29
↓ 1 callersFunctioncompute_g
(A_log, a, dt_bias)
mlx_lm/models/gated_delta.py:9
↓ 1 callersFunctioncompute_inverse_hessian
(H)
mlx_lm/quant/gptq.py:78
↓ 1 callersFunctioncompute_mup_vector
(args)
mlx_lm/models/falcon_h1.py:97
↓ 1 callersFunctionconfigure_parser
Configures and returns the argument parser for the script. Returns: argparse.ArgumentParser: Configured argument parser.
mlx_lm/convert.py:178
↓ 1 callersFunctionconvert_chat
(messages: List[dict], role_mapping: Optional[dict] = None)
mlx_lm/server.py:94
↓ 1 callersMethodcorrect
(self, predictions: mx.array, activated: mx.array)
mlx_lm/models/gemma3n.py:260
↓ 1 callersFunctioncreate_model_card
Uploads the model to Hugging Face hub. Args: path (Union[str, Path]): Local path to the model. hf_path (Union[str, Path, Non
mlx_lm/utils.py:622
↓ 1 callersFunctiondefaults_for_mode
(mode, group_size, bits)
mlx_lm/utils.py:800
↓ 1 callersFunctiondist_split
(x: mx.array, group: mx.distributed.Group)
mlx_lm/quant/awq.py:185
↓ 1 callersFunctiondoes_model_support_input_embeddings
Check if the model supports input_embeddings in its call signature. Args: model (nn.Module): The model to check. Returns:
mlx_lm/utils.py:979
↓ 1 callersFunctiondrop_thinking_messages
( messages: List[Dict[str, Any]], last_user_idx: Optional[int] = None )
mlx_lm/chat_templates/deepseek_v32.py:286
↓ 1 callersFunctiondwq_quantize
( model, target_fn, opt, train_data, valid_data, batch_size, max_seq_length, s
mlx_lm/quant/dwq.py:69
↓ 1 callersFunctionencode_arguments_to_dsml
(tool_call: Dict[str, str])
mlx_lm/chat_templates/deepseek_v32.py:94
↓ 1 callersFunctionencode_messages
( messages: List[Dict[str, Any]], thinking_mode: str = "thinking", context: Optional[List[Dict[str
mlx_lm/chat_templates/deepseek_v32.py:307
↓ 1 callersFunctionestimate_sensitivities
( model, data, low_bits, low_group_size, high_bits, high_group_size, batch_size: i
mlx_lm/quant/dynamic_quant.py:38
↓ 1 callersFunctionestimate_threshold
( model, sensitivities, target_bpw, low_bits, low_group_size, high_bits, high_grou
mlx_lm/quant/dynamic_quant.py:109
↓ 1 callersFunctioneval_ppl
Evaluate perplexity on a dataset with standard error calculation. Args: model: The model to evaluate data: Tokenized data te
mlx_lm/perplexity.py:53
↓ 1 callersFunctionevaluate_model
(args, model: nn.Module, test_set)
mlx_lm/lora.py:305
↓ 1 callersMethodexecute_matmul_kernel
(self, x, packed_weights)
mlx_lm/models/bitlinear_layers.py:121
↓ 1 callersMethodextend
In-place extend this cache with the other cache.
mlx_lm/models/cache.py:1035
↓ 1 callersMethodextend
In-place extend this cache with the other cache.
mlx_lm/models/cache.py:1369
↓ 1 callersMethodextract_cache
(self, idx: int)
mlx_lm/generate.py:1380
↓ 1 callersMethodfilter
(self, keep: List[int])
mlx_lm/generate.py:1105
↓ 1 callersMethodfilter
In-place filter to keep just the given indices in the cache.
mlx_lm/models/cache.py:1016
↓ 1 callersMethodfilter
In-place filter to keep just the given indices in the cache.
mlx_lm/models/cache.py:1359
↓ 1 callersMethodfix_query_key_value_ordering
( self, mixed_qkvz: mx.array, mixed_ba: mx.array )
mlx_lm/models/qwen3_next.py:214
↓ 1 callersFunctionfma
(a, b, c)
mlx_lm/models/jamba.py:123
↓ 1 callersFunctionformat_bw
(x)
mlx_lm/share.py:112
↓ 1 callersMethodfrom_dict
(cls, params)
mlx_lm/models/qwen2_vl.py:20
↓ 1 callersMethodfrom_dict
(cls, params)
mlx_lm/models/qwen3_vl.py:20
↓ 1 callersMethodfrom_dict
(cls, data: dict)
mlx_lm/models/nemotron-nas.py:71
↓ 1 callersMethodfrom_state
(cls, state, meta_state)
mlx_lm/models/cache.py:895
↓ 1 callersFunctiongegelu
(x, limit)
mlx_lm/models/phi3small.py:53
↓ 1 callersFunctiongegelu_impl
(a_gelu, a_linear, limit)
mlx_lm/models/phi3small.py:38
↓ 1 callersFunctiongelu_topk
(inputs, std_multiplier)
mlx_lm/models/gemma3n.py:164
↓ 1 callersMethodgenerate
Transition from prompt processing to generation. Args: tokens: Final tokens for each sequence to start generation.
mlx_lm/generate.py:1172
↓ 1 callersMethodgenerate
( self, request: CompletionRequest, generation_args: GenerationArguments, prog
mlx_lm/server.py:1026
↓ 1 callersMethodget_per_layer_inputs
(self, input_ids: mx.array)
mlx_lm/models/gemma3n.py:526
↓ 1 callersFunctionget_reporting_callbacks
( report_to: str = None, project_name: str = None, log_dir: str = None, config: str = None, )
mlx_lm/tuner/callbacks.py:109
↓ 1 callersFunctiongptq_error
(w, d, scales, biases)
mlx_lm/quant/gptq.py:89
↓ 1 callersFunctiongptq_quantize
( model, data, bits, group_size, fallback_bits, fallback_group_size, batch_size=8,
mlx_lm/quant/gptq.py:52
↓ 1 callersFunctiongroup_expert_select
( gates: mx.array, e_score_correction_bias: mx.array, top_k: int, n_group: int, topk_group
mlx_lm/models/bailing_moe_linear.py:329
↓ 1 callersFunctiongroup_expert_select
( gates, e_score_correction_bias, top_k, n_group, topk_group, routed_scaling_factor,
mlx_lm/models/glm4_moe.py:132
↓ 1 callersFunctiongroup_expert_select
( gates, e_score_correction_bias, top_k, n_group, topk_group, routed_scaling_factor,
mlx_lm/models/mimo_v2_flash.py:148
↓ 1 callersFunctiongroup_expert_select
( gates, e_score_correction_bias, top_k, n_group, topk_group, routed_scaling_factor,
mlx_lm/models/exaone_moe.py:53
↓ 1 callersFunctiongroup_expert_select
( gates, e_score_correction_bias, top_k, n_group, topk_group, routed_scaling_factor,
mlx_lm/models/glm4_moe_lite.py:198
↓ 1 callersFunctiongroup_expert_select
( gates, e_score_correction_bias, top_k, n_group, topk_group, routed_scaling_factor,
mlx_lm/models/deepseek_v3.py:193
↓ 1 callersFunctiongroup_expert_select
( gates, e_score_correction_bias, top_k, n_group, topk_group, routed_scaling_factor,
mlx_lm/models/deepseek_v32.py:283
↓ 1 callersFunctiongroup_expert_select
( gates, e_score_correction_bias, top_k, n_group, topk_group, routed_scaling_factor,
mlx_lm/models/dots1.py:105
↓ 1 callersFunctiongroup_expert_select
( gates, e_score_correction_bias, top_k, n_group, topk_group, routed_scaling_factor,
mlx_lm/models/bailing_moe.py:162
↓ 1 callersFunctiongroup_expert_select
( gates, e_score_correction_bias, top_k, n_group, topk_group, routed_scaling_factor,
mlx_lm/models/nemotron_h.py:314
← previousnext →401–500 of 2,622, ranked by callers