MCPcopy Create free account

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

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

Methodmake_cache
(self)
mlx_lm/models/qwen3_5.py:304
Methodmake_cache
(self)
mlx_lm/models/qwen3_5.py:522
Methodmake_cache
(self)
mlx_lm/models/rwkv7.py:431
Methodmake_cache
(self)
mlx_lm/models/llama.py:266
Methodmake_cache
(self)
mlx_lm/models/lfm2.py:312
Methodmake_cache
(self)
mlx_lm/models/olmo3.py:229
Methodmake_cache
(self)
mlx_lm/models/gemma3.py:62
Methodmake_cache
(self)
mlx_lm/models/baichuan_m1.py:222
Methodmake_cache
(self)
mlx_lm/models/gemma4.py:91
Methodmake_cache
(self)
mlx_lm/models/iquestloopcoder.py:283
Methodmake_cache
(self)
mlx_lm/models/llama4.py:317
Methodmake_cache
(self)
mlx_lm/models/deepseek_v32.py:653
Methodmake_cache
(self)
mlx_lm/models/gemma3_text.py:247
Methodmake_cache
(self)
mlx_lm/models/mamba.py:210
Methodmake_cache
(self)
mlx_lm/models/ministral3.py:325
Methodmake_cache
(self)
mlx_lm/models/falcon_h1.py:496
Methodmake_cache
(self)
mlx_lm/models/granitemoehybrid.py:495
Methodmake_cache
(self)
mlx_lm/models/nemotron-nas.py:394
Methodmake_cache
(self)
mlx_lm/models/jamba.py:338
Methodmake_cache
(self, batch_size: int = 1)
mlx_lm/models/mamba2.py:253
Methodmake_cache
(self)
mlx_lm/models/gemma3n.py:554
Methodmake_cache
(self)
mlx_lm/models/gemma3n.py:583
Methodmake_cache
(self)
mlx_lm/models/longcat_flash_ngram.py:208
Methodmake_cache
(self)
mlx_lm/models/longcat_flash.py:451
Methodmake_cache
(self)
mlx_lm/models/plamo2.py:459
Methodmake_cache
(self)
mlx_lm/models/afmoe.py:381
Methodmake_cache
(self)
mlx_lm/models/nemotron_h.py:529
Methodmake_cache
(self)
mlx_lm/models/exaone4.py:208
Methodmake_mask
(self, *args, **kwargs)
mlx_lm/models/cache.py:219
Methodmake_mask
(self, *args, **kwargs)
mlx_lm/models/cache.py:314
Methodmake_mask
(self, N: int)
mlx_lm/models/cache.py:691
Functionmake_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
Functionmaybe_quantize_kv_cache
(prompt_cache, quantized_kv_start, kv_group_size, kv_bits)
mlx_lm/generate.py:299
Methodmerge
(_, caches)
mlx_lm/models/cache.py:581
Methodmerge
(cls, caches)
mlx_lm/models/cache.py:702
Methodmerge
(cls, caches)
mlx_lm/models/cache.py:865
Methodmerge
(cls, caches)
mlx_lm/models/cache.py:1089
Methodmerge
(cls, caches)
mlx_lm/models/cache.py:1436
Methodmeta_state
(self)
mlx_lm/models/cache.py:138
Methodmeta_state
(self)
mlx_lm/models/cache.py:299
Methodmeta_state
(self)
mlx_lm/models/cache.py:532
Methodmeta_state
(self)
mlx_lm/models/cache.py:797
Methodmeta_state
(self)
mlx_lm/models/cache.py:839
Methodmeta_state
(self)
mlx_lm/models/cache.py:1306
Functionmixed_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
Methodmock_score_fn
(batch)
tests/test_evaluate.py:34
Functionmultiply
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
Methodn_kv_heads
(self)
mlx_lm/models/gemma4_text.py:659
Methodnbytes
(self)
tests/test_server.py:81
Methodnbytes
Return the size of this cache in bytes
mlx_lm/models/cache.py:159
Methodnbytes
(self)
mlx_lm/models/cache.py:226
Methodnbytes
(self)
mlx_lm/models/cache.py:321
Methodnbytes
(self)
mlx_lm/models/cache.py:404
Methodnbytes
(self)
mlx_lm/models/cache.py:588
Methodnbytes
(self)
mlx_lm/models/cache.py:727
Methodnbytes
(self)
mlx_lm/models/cache.py:808
Methodnbytes
(self)
mlx_lm/models/cache.py:891
Methodnbytes
(self)
mlx_lm/models/cache.py:1127
Methodnbytes
(self)
mlx_lm/models/cache.py:1481
Methodnbytes
(self)
mlx_lm/models/cache.py:1671
Methodnext
Generate the next batch of tokens. Returns: List of Response objects for each sequence in the batch.
mlx_lm/generate.py:1405
Functionno_bos_or_eos
(sequence: List, bos: int, eos: int)
mlx_lm/tokenizer_utils.py:651
Methodnum_experts
(self)
mlx_lm/models/switch_layers.py:72
Methodnum_experts
(self)
mlx_lm/models/switch_layers.py:117
Methodon_train_loss_report
Called to report training loss at specified intervals.
mlx_lm/tuner/callbacks.py:18
Methodon_train_loss_report
(self, train_info: dict)
mlx_lm/tuner/callbacks.py:88
Methodon_val_loss_report
Called to report validation loss at specified intervals or the beginning.
mlx_lm/tuner/callbacks.py:22
Methodon_val_loss_report
(self, val_info: dict)
mlx_lm/tuner/callbacks.py:95
Methodoutput_dims
(self)
mlx_lm/models/afm7.py:109
Methodoutput_dims
(self)
mlx_lm/models/afm7.py:134
Methodoutput_dims
(self)
mlx_lm/models/switch_layers.py:68
Methodoutput_dims
(self)
mlx_lm/models/switch_layers.py:113
Methodpad
(c)
mlx_lm/models/cache.py:1392
Functionparse_tool_call
(text: str, tools: Any | None = None)
mlx_lm/tool_parsers/mistral.py:14
Functionparse_tool_call
(text: str, tools: list | None = None)
mlx_lm/tool_parsers/minimax_m2.py:159
Functionparse_tool_call
(text: str, _: Optional[Any] = None)
mlx_lm/tool_parsers/function_gemma.py:11
Functionparse_tool_call
(text, tools=None)
mlx_lm/tool_parsers/json_tools.py:10
Functionparse_tool_call
(text: str, _: Optional[Any] = None)
mlx_lm/tool_parsers/gemma4.py:55
Functionparse_tool_call
(text: str, tools: list[Any] | None = None)
mlx_lm/tool_parsers/longcat.py:50
Functionparse_tool_call
Parse a GLM 4.7 tool call string into a name and arguments dict.
mlx_lm/tool_parsers/glm47.py:208
Functionparse_tool_call
( model_output: str, tools: Optional[Any] = None, )
mlx_lm/tool_parsers/qwen3_coder.py:108
Functionparse_tool_call
(text: str, tools: Any | None = None)
mlx_lm/tool_parsers/pythonic.py:20
Functionparse_tool_call
(text: str, tools: Any | None = None)
mlx_lm/tool_parsers/kimi_k2.py:56
Methodpipeline
(self, group)
mlx_lm/models/deepseek_v32.py:426
Methodpipeline
(self, group)
mlx_lm/models/ministral3.py:177
Methodpipeline_layers
(self)
mlx_lm/models/pipeline.py:15
Methodpop
(self)
mlx_lm/models/cache.py:1649
Methodpower_of_2_slopes
(n)
mlx_lm/models/bailing_moe_linear.py:263
Methodpredicate
(path, _)
mlx_lm/models/gpt_oss.py:329
Methodpredicate
(k)
mlx_lm/models/kimi_k25.py:80
Methodpredicate
(path, _)
mlx_lm/models/qwen3_next.py:486
Methodpredicate
(k)
mlx_lm/models/minimax.py:382
Methodpredicate
(path, _)
mlx_lm/models/gemma4_text.py:643
Methodpredicate
(path, _)
mlx_lm/models/bailing_moe_linear.py:570
Methodpredicate
(path, _)
mlx_lm/models/lfm2_moe.py:375
Methodpredicate
(path, _)
mlx_lm/models/qwen3_moe.py:250
Methodpredicate
(k)
mlx_lm/models/glm4_moe.py:400
Methodpredicate
(k)
mlx_lm/models/mimo_v2_flash.py:372
Methodpredicate
(path: str)
mlx_lm/models/kimi_linear.py:595
Methodpredicate
(k)
mlx_lm/models/step3p5.py:444
← previousnext →2,101–2,200 of 2,622, ranked by callers