MCPcopy Create free account

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

Functions1,187 in github.com/ml-explore/mlx-examples

↓ 105 callersMethoditems
(self)
segment_anything/segment_anything/utils/amg.py:35
↓ 38 callersMethodupdate
Specify how to select the next token, based on the current trace and logits Parameters ---------- tokens : mx.array, shape =
whisper/mlx_whisper/decoding.py:195
↓ 32 callersMethodquantize
(self, hidden_states)
encodec/encodec.py:377
↓ 30 callersMethodpad
(self)
flux/flux/tokenizers.py:128
↓ 14 callersMethodfrom_pretrained
(path_or_hf_repo: str)
llava/llava.py:131
↓ 13 callersFunctionprint_zero
(group, *args, **kwargs)
flux/generate_interactive.py:12
↓ 12 callersMethoddecode
(self, token_ids: List[int], **kwargs)
whisper/mlx_whisper/tokenizer.py:166
↓ 12 callersMethodfrom_pretrained
(path: str)
clip/model.py:355
↓ 12 callersMethodrank
Given a list of groups of samples and their cumulative log probabilities, return the indices of the samples in each group to select a
whisper/mlx_whisper/decoding.py:155
↓ 11 callersMethodfrom_pretrained
( cls, path_or_repo: str, dtype: mx.Dtype = mx.bfloat16 )
t5/t5.py:406
↓ 10 callersMethod__init__
( self, input_size: int, hidden_size: int, bias: bool = True, )
encodec/encodec.py:63
↓ 10 callersMethod__init__
( self, input_size: int, hidden_size: int, bias: bool = True, )
musicgen/encodec.py:63
↓ 10 callersMethoddecode
(self, t: List[int])
llms/mixtral/mixtral.py:196
↓ 10 callersMethoddecode
Decodes the given frames into an output audio waveform. Note that the output might be a bit bigger than the input. In that c
encodec/encodec.py:637
↓ 10 callersMethodencode
(self, text, **kwargs)
whisper/mlx_whisper/tokenizer.py:163
↓ 10 callersMethodgenerate
(self, x, temp=1.0)
llms/llama/llama.py:146
↓ 8 callersMethodencode
Encodes the input audio waveform into discrete codes. Args: input_values (mx.array): The input audio waveform with shape
encodec/encodec.py:510
↓ 7 callersMethod__init__
(self, dim: int)
flux/flux/layers.py:89
↓ 7 callersFunctioncreate_cache_entry
Build temporal cache from the last CACHE_T frames of x, merging with existing cache.
video/wan2.1/wan/vae_layers.py:22
↓ 7 callersMethodencode
(self, inputs: mx.array)
musicgen/t5.py:319
↓ 7 callersMethodfrom_linear
(linear: nn.Linear, rank: int = 8)
lora/models.py:51
↓ 7 callersMethodfrom_pretrained
(cls, path_or_repo: str)
encodec/encodec.py:677
↓ 7 callersMethodreset
(self)
whisper/mlx_whisper/decoding.py:150
↓ 6 callersMethod__init__
( self, resolution: int, in_channels: int, ch: int, ch_mult: list[int]
flux/flux/autoencoder.py:128
↓ 6 callersMethod__init__
(self, config: CLIPTextConfig)
clip/model.py:138
↓ 6 callersMethod__init__
(self, config: VisionConfig)
llava/vision.py:92
↓ 6 callersMethod__init__
(self, config: T5Config)
llms/speculative_decoding/model.py:282
↓ 6 callersMethod__init__
(self, config)
musicgen/t5.py:310
↓ 6 callersMethod__init__
(self, config)
t5/t5.py:310
↓ 6 callersFunction_hf_download
(repo_id: str, filename: str)
video/wan2.1/wan/utils.py:73
↓ 6 callersFunction_lambda64
(alpha: mx.array, sigma: mx.array)
video/wan2.1/wan/sampler.py:18
↓ 6 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
video/wan2.1/wan/sampler.py:98
↓ 6 callersMethoddecode
(self, t: List[int])
llms/speculative_decoding/decoder.py:36
↓ 6 callersMethodfilter
(self, keep: mx.array)
segment_anything/segment_anything/utils/amg.py:38
↓ 6 callersMethodformat_timestamp
(self, seconds: float)
whisper/mlx_whisper/writers.py:180
↓ 6 callersMethodfrom_pretrained
( cls, path_or_repo: str, dtype: mx.Dtype = mx.bfloat16 )
musicgen/t5.py:406
↓ 6 callersMethodrepeat
(a)
llms/llama/llama.py:66
↓ 5 callersMethod__init__
(self, dim, hidden_dim)
lora/models.py:193
↓ 5 callersMethod__init__
(self, config: UNetConfig)
stable_diffusion/stable_diffusion/unet.py:273
↓ 5 callersFunction_check_key
(key: str, part: str)
stable_diffusion/stable_diffusion/model_io.py:178
↓ 5 callersMethodencode
(self, s: str)
llms/mixtral/mixtral.py:193
↓ 5 callersMethodencode
(self, s: str)
llms/speculative_decoding/decoder.py:25
↓ 5 callersMethodencode
(self, inputs: mx.array)
t5/t5.py:319
↓ 5 callersMethodgenerate
Generates a waveform conditioned on `text`. Args: text (str): The text to condition generation on. max_steps
musicgen/musicgen.py:249
↓ 5 callersMethodreset_cache
(self)
llms/speculative_decoding/model.py:304
↓ 5 callersMethodsigmas
(self, t)
stable_diffusion/stable_diffusion/sampler.py:67
↓ 4 callersMethod__init__
(self, embed_dim, out_chans)
segment_anything/segment_anything/image_encoder.py:96
↓ 4 callersMethod__init__
(self, config: T5Config)
flux/flux/t5.py:228
↓ 4 callersMethod__init__
( self, input_res, patch_res, num_classes, dim, depth,
speechcommands/kwt.py:105
↓ 4 callersMethod__init__
(self, dim, hidden_dim)
llava/language.py:112
↓ 4 callersMethod__init__
(self, args: ModelArgs)
llms/mixtral/mixtral.py:145
↓ 4 callersMethod__init__
(self, dim, hidden_dim)
llms/gguf_llm/models.py:113
↓ 4 callersMethod__init__
(self, dims: ModelDimensions)
whisper/mlx_whisper/torch_whisper.py:220
↓ 4 callersMethod__init__
(self, dims: ModelDimensions, dtype: mx.Dtype = mx.float16)
whisper/mlx_whisper/whisper.py:202
↓ 4 callersMethod__init__
( self, in_channels: int, out_channels: int, block_out_channels: List[int] = [
stable_diffusion/stable_diffusion/vae.py:96
↓ 4 callersMethod__init__
( self, dim: int, out_dim: int, patch_size: Tuple[int, int, int], eps:
video/wan2.1/wan/layers.py:233
↓ 4 callersMethod__init__
( self, vocab_size, dim, dim_attn, dim_ffn, num_heads,
video/wan2.1/wan/t5.py:127
↓ 4 callersMethod_denoising_loop
( self, x_T, T, conditioning, num_steps: int = 50, cfg_weight:
stable_diffusion/stable_diffusion/__init__.py:84
↓ 4 callersFunction_load_weights
Unified loader for safetensors, sharded index, and .pth files.
video/wan2.1/wan/utils.py:79
↓ 4 callersMethodcat
(self, new_stats: "MaskData")
segment_anything/segment_anything/utils/amg.py:53
↓ 4 callersMethoddecode
(self, z)
stable_diffusion/stable_diffusion/vae.py:256
↓ 4 callersMethoddecode
( self, inputs: mx.array, memory: mx.array, cache=None, )
musicgen/t5.py:322
↓ 4 callersMethoddecode
Decodes the given frames into an output audio waveform. Note that the output might be a bit bigger than the input. In that c
musicgen/encodec.py:637
↓ 4 callersMethoddecode
( self, inputs: mx.array, memory: mx.array, cache=None, )
t5/t5.py:322
↓ 4 callersMethodencode
(self, text, pad=True)
flux/flux/tokenizers.py:175
↓ 4 callersFunctionprint_zero
(group, *args, **kwargs)
cifar/main.py:26
↓ 4 callersFunctionsample
(logits)
llms/mixtral/mixtral.py:225
↓ 4 callersMethodsanitize
Remap PyTorch VAE keys to MLX format.
video/wan2.1/wan/vae.py:417
↓ 4 callersFunctiontimer
(fn, *args)
whisper/benchmark.py:28
↓ 4 callersFunctionto_array
(dataset)
transformer_lm/datasets.py:31
↓ 4 callersFunctiontoc
(msg, start)
llms/llama/llama.py:202
↓ 3 callersMethod__init__
(self, config)
bert/model.py:92
↓ 3 callersMethod__init__
(self, args: ModelArgs)
llms/llama/llama.py:127
↓ 3 callersMethod__init__
(self, args: ModelArgs)
llms/mistral/mistral.py:116
↓ 3 callersMethod__init__
(self, head_dim, n_kv_heads)
musicgen/musicgen.py:30
↓ 3 callersMethod__init__
(self, num_latent_dims, input_shape, max_num_filters)
cvae/vae.py:155
↓ 3 callersMethod__init__
(self, dim: int, mid_dim: int)
video/wan2.1/wan/clip.py:60
↓ 3 callersMethod__init__
(self, dim, mode)
video/wan2.1/wan/vae_layers.py:99
↓ 3 callersFunction_attention
(q: mx.array, k: mx.array, v: mx.array, pe: mx.array)
flux/flux/layers.py:36
↓ 3 callersMethod_encode_text
Encode text prompt with T5. Returns [512, 4096].
video/wan2.1/wan/pipeline.py:87
↓ 3 callersFunction_get_end
(segments: List[dict])
whisper/mlx_whisper/transcribe.py:43
↓ 3 callersFunction_linspace
(a, b, num)
stable_diffusion/stable_diffusion/sampler.py:8
↓ 3 callersFunction_load_safetensor_weights
(mapper, model, weight_file, float16: bool = False)
stable_diffusion/stable_diffusion/model_io.py:171
↓ 3 callersMethod_make_layer
(self, block, in_dims, dims, num_blocks, stride)
cifar/resnet.py:84
↓ 3 callersMethod_merge_input_ids_with_image_features
( self, image_features, inputs_embeds, input_ids )
llava/llava.py:103
↓ 3 callersFunction_normalize_tuple
(value, n)
video/wan2.1/wan/vae_layers.py:16
↓ 3 callersFunction_save_model
(save_dir, weights, config)
whisper/test.py:26
↓ 3 callersMethod_separate_heads
(self, x: mx.array, num_heads: int)
segment_anything/segment_anything/transformer.py:203
↓ 3 callersMethod_tokenize
(self, tokenizer, text: str, negative_text: Optional[str] = None)
stable_diffusion/stable_diffusion/__init__.py:34
↓ 3 callersFunctionbox_area
Computes the area of a set of bounding boxes, which are specified by their (x1, y1, x2, y2) coordinates. Args: boxes (mx.array[N
segment_anything/segment_anything/automatic_mask_generator.py:368
↓ 3 callersFunctionconvert
(name_or_path: str, dtype: mx.Dtype = mx.float16)
whisper/convert.py:232
↓ 3 callersMethoddecode
(self, x, latent_size: Tuple[int, int] = (64, 64))
flux/flux/flux.py:157
↓ 3 callersMethoddecode
Decode latent to video. Args: z: Latent tensor [F, H, W, C] (channels-last) Returns: Video tensor [
video/wan2.1/wan/vae.py:329
↓ 3 callersMethodencode
(self, x)
stable_diffusion/stable_diffusion/vae.py:260
↓ 3 callersMethodencode
Encodes the input audio waveform into discrete codes. Args: input_values (mx.array): The input audio waveform with shape
musicgen/encodec.py:510
↓ 3 callersMethodfrom_dict
(cls, params)
llava/llava.py:29
↓ 3 callersMethodgenerate_latents
( self, text: str, n_images: int = 1, num_steps: int = 35, guidance: f
flux/flux/flux.py:128
↓ 3 callersFunctionget_tokenizer
( multilingual: bool, *, num_languages: int = 99, language: Optional[str] = None, task: Op
whisper/mlx_whisper/tokenizer.py:370
↓ 3 callersFunctionis_segment_anomaly
(segment: Optional[dict])
whisper/mlx_whisper/transcribe.py:333
↓ 3 callersFunctionloss_fn
(y_hat, y, weight_decay=0.0, parameters=None)
gcn/main.py:14
next →1–100 of 1,187, ranked by callers