Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ml-explore/mlx-lm
/ functions
Functions
2,622 in github.com/ml-explore/mlx-lm
⨍
Functions
2,622
◇
Types & classes
816
↳
Endpoints
9
Method
make_cache
(self)
mlx_lm/models/qwen3_5.py:304
Method
make_cache
(self)
mlx_lm/models/qwen3_5.py:522
Method
make_cache
(self)
mlx_lm/models/rwkv7.py:431
Method
make_cache
(self)
mlx_lm/models/llama.py:266
Method
make_cache
(self)
mlx_lm/models/lfm2.py:312
Method
make_cache
(self)
mlx_lm/models/olmo3.py:229
Method
make_cache
(self)
mlx_lm/models/gemma3.py:62
Method
make_cache
(self)
mlx_lm/models/baichuan_m1.py:222
Method
make_cache
(self)
mlx_lm/models/gemma4.py:91
Method
make_cache
(self)
mlx_lm/models/iquestloopcoder.py:283
Method
make_cache
(self)
mlx_lm/models/llama4.py:317
Method
make_cache
(self)
mlx_lm/models/deepseek_v32.py:653
Method
make_cache
(self)
mlx_lm/models/gemma3_text.py:247
Method
make_cache
(self)
mlx_lm/models/mamba.py:210
Method
make_cache
(self)
mlx_lm/models/ministral3.py:325
Method
make_cache
(self)
mlx_lm/models/falcon_h1.py:496
Method
make_cache
(self)
mlx_lm/models/granitemoehybrid.py:495
Method
make_cache
(self)
mlx_lm/models/nemotron-nas.py:394
Method
make_cache
(self)
mlx_lm/models/jamba.py:338
Method
make_cache
(self, batch_size: int = 1)
mlx_lm/models/mamba2.py:253
Method
make_cache
(self)
mlx_lm/models/gemma3n.py:554
Method
make_cache
(self)
mlx_lm/models/gemma3n.py:583
Method
make_cache
(self)
mlx_lm/models/longcat_flash_ngram.py:208
Method
make_cache
(self)
mlx_lm/models/longcat_flash.py:451
Method
make_cache
(self)
mlx_lm/models/plamo2.py:459
Method
make_cache
(self)
mlx_lm/models/afmoe.py:381
Method
make_cache
(self)
mlx_lm/models/nemotron_h.py:529
Method
make_cache
(self)
mlx_lm/models/exaone4.py:208
Method
make_mask
(self, *args, **kwargs)
mlx_lm/models/cache.py:219
Method
make_mask
(self, *args, **kwargs)
mlx_lm/models/cache.py:314
Method
make_mask
(self, N: int)
mlx_lm/models/cache.py:691
Function
make_repetition_penalty
Make repetition penalty processor. Paper: https://arxiv.org/abs/1909.05858 Args: penalty (float): The repetition penalty factor
mlx_lm/sample_utils.py:282
Function
maybe_quantize_kv_cache
(prompt_cache, quantized_kv_start, kv_group_size, kv_bits)
mlx_lm/generate.py:299
Method
merge
(_, caches)
mlx_lm/models/cache.py:581
Method
merge
(cls, caches)
mlx_lm/models/cache.py:702
Method
merge
(cls, caches)
mlx_lm/models/cache.py:865
Method
merge
(cls, caches)
mlx_lm/models/cache.py:1089
Method
merge
(cls, caches)
mlx_lm/models/cache.py:1436
Method
meta_state
(self)
mlx_lm/models/cache.py:138
Method
meta_state
(self)
mlx_lm/models/cache.py:299
Method
meta_state
(self)
mlx_lm/models/cache.py:532
Method
meta_state
(self)
mlx_lm/models/cache.py:797
Method
meta_state
(self)
mlx_lm/models/cache.py:839
Method
meta_state
(self)
mlx_lm/models/cache.py:1306
Function
mixed_quant_predicate
Implements mixed quantization predicates with similar choices to, for example, llama.cpp's Q4_K_M. Ref: https://github.com/ggerganov/llama.cpp
mlx_lm/convert.py:48
Method
mock_score_fn
(batch)
tests/test_evaluate.py:34
Function
multiply
A function that multiplies two numbers Args: a: The first number to multiply b: The second number to multiply
mlx_lm/examples/tool_use.py:16
Method
n_kv_heads
(self)
mlx_lm/models/gemma4_text.py:659
Method
nbytes
(self)
tests/test_server.py:81
Method
nbytes
Return the size of this cache in bytes
mlx_lm/models/cache.py:159
Method
nbytes
(self)
mlx_lm/models/cache.py:226
Method
nbytes
(self)
mlx_lm/models/cache.py:321
Method
nbytes
(self)
mlx_lm/models/cache.py:404
Method
nbytes
(self)
mlx_lm/models/cache.py:588
Method
nbytes
(self)
mlx_lm/models/cache.py:727
Method
nbytes
(self)
mlx_lm/models/cache.py:808
Method
nbytes
(self)
mlx_lm/models/cache.py:891
Method
nbytes
(self)
mlx_lm/models/cache.py:1127
Method
nbytes
(self)
mlx_lm/models/cache.py:1481
Method
nbytes
(self)
mlx_lm/models/cache.py:1671
Method
next
Generate the next batch of tokens. Returns: List of Response objects for each sequence in the batch.
mlx_lm/generate.py:1405
Function
no_bos_or_eos
(sequence: List, bos: int, eos: int)
mlx_lm/tokenizer_utils.py:651
Method
num_experts
(self)
mlx_lm/models/switch_layers.py:72
Method
num_experts
(self)
mlx_lm/models/switch_layers.py:117
Method
on_train_loss_report
Called to report training loss at specified intervals.
mlx_lm/tuner/callbacks.py:18
Method
on_train_loss_report
(self, train_info: dict)
mlx_lm/tuner/callbacks.py:88
Method
on_val_loss_report
Called to report validation loss at specified intervals or the beginning.
mlx_lm/tuner/callbacks.py:22
Method
on_val_loss_report
(self, val_info: dict)
mlx_lm/tuner/callbacks.py:95
Method
output_dims
(self)
mlx_lm/models/afm7.py:109
Method
output_dims
(self)
mlx_lm/models/afm7.py:134
Method
output_dims
(self)
mlx_lm/models/switch_layers.py:68
Method
output_dims
(self)
mlx_lm/models/switch_layers.py:113
Method
pad
(c)
mlx_lm/models/cache.py:1392
Function
parse_tool_call
(text: str, tools: Any | None = None)
mlx_lm/tool_parsers/mistral.py:14
Function
parse_tool_call
(text: str, tools: list | None = None)
mlx_lm/tool_parsers/minimax_m2.py:159
Function
parse_tool_call
(text: str, _: Optional[Any] = None)
mlx_lm/tool_parsers/function_gemma.py:11
Function
parse_tool_call
(text, tools=None)
mlx_lm/tool_parsers/json_tools.py:10
Function
parse_tool_call
(text: str, _: Optional[Any] = None)
mlx_lm/tool_parsers/gemma4.py:55
Function
parse_tool_call
(text: str, tools: list[Any] | None = None)
mlx_lm/tool_parsers/longcat.py:50
Function
parse_tool_call
Parse a GLM 4.7 tool call string into a name and arguments dict.
mlx_lm/tool_parsers/glm47.py:208
Function
parse_tool_call
( model_output: str, tools: Optional[Any] = None, )
mlx_lm/tool_parsers/qwen3_coder.py:108
Function
parse_tool_call
(text: str, tools: Any | None = None)
mlx_lm/tool_parsers/pythonic.py:20
Function
parse_tool_call
(text: str, tools: Any | None = None)
mlx_lm/tool_parsers/kimi_k2.py:56
Method
pipeline
(self, group)
mlx_lm/models/deepseek_v32.py:426
Method
pipeline
(self, group)
mlx_lm/models/ministral3.py:177
Method
pipeline_layers
(self)
mlx_lm/models/pipeline.py:15
Method
pop
(self)
mlx_lm/models/cache.py:1649
Method
power_of_2_slopes
(n)
mlx_lm/models/bailing_moe_linear.py:263
Method
predicate
(path, _)
mlx_lm/models/gpt_oss.py:329
Method
predicate
(k)
mlx_lm/models/kimi_k25.py:80
Method
predicate
(path, _)
mlx_lm/models/qwen3_next.py:486
Method
predicate
(k)
mlx_lm/models/minimax.py:382
Method
predicate
(path, _)
mlx_lm/models/gemma4_text.py:643
Method
predicate
(path, _)
mlx_lm/models/bailing_moe_linear.py:570
Method
predicate
(path, _)
mlx_lm/models/lfm2_moe.py:375
Method
predicate
(path, _)
mlx_lm/models/qwen3_moe.py:250
Method
predicate
(k)
mlx_lm/models/glm4_moe.py:400
Method
predicate
(k)
mlx_lm/models/mimo_v2_flash.py:372
Method
predicate
(path: str)
mlx_lm/models/kimi_linear.py:595
Method
predicate
(k)
mlx_lm/models/step3p5.py:444
← previous
next →
2,101–2,200 of 2,622, ranked by callers