MCPcopy Create free account

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

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

Methodchunk_stride
(self)
encodec/encodec.py:631
Methodchunk_stride
(self)
musicgen/encodec.py:631
Functiondecode
(model, mels)
whisper/benchmark.py:55
Functiondecode
Performs decoding of 30-second audio segment(s), provided as Mel spectrogram(s). Parameters ---------- model: Whisper the Wh
whisper/mlx_whisper/decoding.py:709
Methoddecode
(self, embed_ind)
encodec/encodec.py:395
Methoddecode
(self, embed_ind)
encodec/encodec.py:411
Methoddecode
Decode the given codes to the quantized representation.
encodec/encodec.py:460
Methoddecode
(self, x_t)
stable_diffusion/stable_diffusion/__init__.py:166
Methoddecode
(self, t: List[int], with_sep: bool = True)
musicgen/t5.py:40
Methoddecode
(self, embed_ind)
musicgen/encodec.py:395
Methoddecode
(self, embed_ind)
musicgen/encodec.py:411
Methoddecode
Decode the given codes to the quantized representation.
musicgen/encodec.py:460
Methoddecode
Decode latents to video frames. Args: latents: [F, H, W, C] latent tensor (channels-last) Returns:
video/wan2.1/wan/pipeline.py:394
Methoddecode
(self, t: List[int], with_sep: bool = True)
t5/t5.py:40
Methoddecoder_start_id
(self)
llms/speculative_decoding/decoder.py:22
Methoddecoder_start_id
(self)
musicgen/t5.py:28
Methoddecoder_start_id
(self)
t5/t5.py:28
Functiondetect_language
Detect the spoken language in the audio, and return them as list of strings, along with the ids of the most probable language tokens and the
whisper/mlx_whisper/decoding.py:20
Methodembed_audio
(self, mel: torch.Tensor)
whisper/mlx_whisper/torch_whisper.py:254
Methodembed_audio
(self, mel)
whisper/mlx_whisper/whisper.py:244
Methodencode
(self, text)
flux/flux/tokenizers.py:110
Methodencode
(self, hidden_states)
encodec/encodec.py:388
Methodencode
(self, hidden_states)
encodec/encodec.py:408
Methodencode
Encode a given input array with the specified frame rate at the given bandwidth. The RVQ encode method sets the appropriate number of
encodec/encodec.py:441
Methodencode
(self, s: str)
musicgen/t5.py:31
Methodencode
(self, hidden_states)
musicgen/encodec.py:388
Methodencode
(self, hidden_states)
musicgen/encodec.py:408
Methodencode
Encode a given input array with the specified frame rate at the given bandwidth. The RVQ encode method sets the appropriate number of
musicgen/encodec.py:441
Methodencode
(self, x)
cvae/vae.py:168
Methodencode
(self, s: str)
t5/t5.py:31
Methodensure_models_are_loaded
(self)
stable_diffusion/stable_diffusion/__init__.py:193
Methodeos
(self)
flux/flux/tokenizers.py:31
Methodeos
(self)
flux/flux/tokenizers.py:150
Methodeos
(self)
clip/tokenizer.py:32
Methodeos
(self)
stable_diffusion/stable_diffusion/tokenizer.py:28
Methodeos_id
(self)
llms/mistral/mistral.py:156
Methodeos_id
(self)
llms/speculative_decoding/decoder.py:18
Methodeos_id
(self)
musicgen/t5.py:24
Methodeos_token
(self)
flux/flux/tokenizers.py:35
Methodeos_token
(self)
flux/flux/tokenizers.py:157
Methodeos_token
(self)
clip/tokenizer.py:36
Methodeos_token
(self)
stable_diffusion/stable_diffusion/tokenizer.py:32
Methodeos_token_id
(self)
llms/gguf_llm/models.py:233
Methodeot
(self)
whisper/mlx_whisper/tokenizer.py:178
Functioneverything
(model_path)
whisper/benchmark.py:59
Functionfashion_mnist
(save_dir="/tmp")
mnist/mnist.py:70
Functionfetch_from_hub
(hf_path: str)
lora/utils.py:16
Methodfinalize
(self, tokens: mx.array, sum_logprobs: mx.array)
whisper/mlx_whisper/decoding.py:280
Methodforward
(self, x: Tensor)
whisper/mlx_whisper/torch_whisper.py:29
Methodforward
( self, x: Tensor, xa: Optional[Tensor] = None, mask: Optional[Tensor] = None,
whisper/mlx_whisper/torch_whisper.py:69
Methodforward
( self, x: Tensor, xa: Optional[Tensor] = None, mask: Optional[Tensor] = None,
whisper/mlx_whisper/torch_whisper.py:127
Methodforward
x : torch.Tensor, shape = (batch_size, n_mels, n_ctx) the mel spectrogram of the audio
whisper/mlx_whisper/torch_whisper.py:155
Methodforward
x : torch.LongTensor, shape = (batch_size, <= n_ctx) the text tokens xa : torch.Tensor, shape = (batch_size, n_audio_ctx,
whisper/mlx_whisper/torch_whisper.py:194
Methodforward
( self, mel: torch.Tensor, tokens: torch.Tensor )
whisper/mlx_whisper/torch_whisper.py:260
Methodforward_and_log_det
(self, x: mx.array)
normalizing_flow/bijectors.py:21
Methodforward_and_log_det
Transforms masked indices of `x` conditioned on unmasked indices using bijector.
normalizing_flow/bijectors.py:50
Functionforward_fn
(gcn, x, adj, y, train_mask, weight_decay)
gcn/main.py:29
Methodfrom_dict
(cls, config)
flux/flux/clip.py:22
Methodfrom_dict
(cls, params)
llava/language.py:26
Methodfrom_dict
(cls, params)
llava/vision.py:27
Methodfrom_dict
(cls, params)
llms/gguf_llm/models.py:41
Methodfrom_pretrained
(path: str)
clip/tokenizer.py:110
Methodfrom_pretrained
(path: str)
clip/image_processor.py:54
Methodfrom_pretrained
(cls, path_or_repo: str)
musicgen/encodec.py:677
Functiongenerate
Generate text based on the given prompt and model. Args: prompt (mx.array): The input prompt. model (nn.Module): The model t
lora/utils.py:175
Functiongenerate
(prompt: mx.array, model: Model, temp: float = 0.0)
llms/gguf_llm/models.py:313
Methodgenerate_latents
( self, text: str, n_images: int = 1, num_steps: int = 2, cfg_weight:
stable_diffusion/stable_diffusion/__init__.py:231
Methodgenerate_latents_from_image
( self, image, text: str, n_images: int = 1, strength: float = 0.8,
stable_diffusion/stable_diffusion/__init__.py:269
Methodget_image_embedding
Returns the image embeddings for the currently set image, with shape 1xCxHxW, where C is the embedding dimension and (H,W) are
segment_anything/segment_anything/predictor.py:148
Methodget_text_features
(self, x: mx.array)
clip/model.py:308
Methodinstall_hooks
(layer: nn.Module)
whisper/mlx_whisper/torch_whisper.py:302
Methodinstall_kv_cache_hooks
The `MultiHeadAttention` module optionally accepts `kv_cache` which stores the key and value tensors calculated for the previous posi
whisper/mlx_whisper/torch_whisper.py:277
Methodinverse_and_log_det
(self, y: mx.array)
normalizing_flow/bijectors.py:27
Methodinverse_and_log_det
Transforms masked indices of `y` conditioned on unmasked indices using bijector.
normalizing_flow/bijectors.py:56
Methodis_multilingual
(self)
whisper/mlx_whisper/torch_whisper.py:270
Methodis_multilingual
(self)
whisper/mlx_whisper/whisper.py:258
Methoditerate_subtitles
()
whisper/mlx_whisper/writers.py:92
Functionkwt1
(**kwargs)
speechcommands/kwt.py:170
Functionkwt2
(**kwargs)
speechcommands/kwt.py:185
Functionkwt3
(**kwargs)
speechcommands/kwt.py:200
Methodlanguage_token
Returns the token id corresponding to the value of the `language` field
whisper/mlx_whisper/tokenizer.py:214
Functionllama
(model_path, *, dtype: str)
llms/llama/convert.py:25
Functionload
(model_path)
segment_anything/segment_anything/sam.py:193
Functionload
(path_or_hf_repo: str, tokenizer_config={})
lora/utils.py:129
Functionload
(gguf_file: str, repo: Optional[str] = None)
llms/gguf_llm/models.py:257
Functionload_dataset
(dataname)
transformer_lm/datasets.py:12
Methodlogits
(self, tokens: torch.Tensor, audio_features: torch.Tensor)
whisper/mlx_whisper/torch_whisper.py:257
Methodlogits
(self, tokens, audio_features)
whisper/mlx_whisper/whisper.py:247
Functionloss_fn
(model, X, y)
mnist/main.py:34
Functionloss_fn
(model, x)
normalizing_flow/main.py:29
Functionloss_fn
(model, X)
cvae/main.py:44
Functionmap_clip_text_encoder_weights
(key, value)
stable_diffusion/stable_diffusion/model_io.py:98
Functionmap_unet_weights
(key, value)
stable_diffusion/stable_diffusion/model_io.py:49
Functionmap_vae_weights
(key, value)
stable_diffusion/stable_diffusion/model_io.py:126
Methodmax_time
(self)
stable_diffusion/stable_diffusion/sampler.py:53
Functionmodel_forward
(model, mels, tokens)
whisper/benchmark.py:49
Methodno_speech
(self)
whisper/mlx_whisper/tokenizer.py:202
Methodno_timestamps
(self)
whisper/mlx_whisper/tokenizer.py:206
Methodnon_speech_tokens
Returns the list of tokens to suppress in order to avoid any speaker tags or non-speech annotations, to prevent sampling texts that a
whisper/mlx_whisper/tokenizer.py:244
Functionnormalize
(x)
speechcommands/main.py:28
← previousnext →1,001–1,100 of 1,187, ranked by callers