MCPcopy Create free account

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

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

↓ 1 callersMethodbpe
(self, text)
clip/tokenizer.py:39
↓ 1 callersMethodbpe
(self, text)
stable_diffusion/stable_diffusion/tokenizer.py:35
↓ 1 callersFunctionbuild_all_layer_point_grids
Generates point grids for all crop layers.
segment_anything/segment_anything/utils/amg.py:191
↓ 1 callersFunctionbuild_parser
()
lora/lora.py:23
↓ 1 callersFunctionbuild_parser
()
whisper/mlx_whisper/cli.py:15
↓ 1 callersFunctionbuild_point_grid
Generates a 2D grid of points evenly spaced in [0,1]x[0,1].
segment_anything/segment_anything/utils/amg.py:181
↓ 1 callersFunctioncalculate_stability_score
Computes the stability score for a batch of masks. The stability score is the IoU between the binary masks obtained by thresholding the p
segment_anything/segment_anything/utils/amg.py:152
↓ 1 callersFunctioncategorical
(logits, temp)
whisper/mlx_whisper/decoding.py:251
↓ 1 callersFunctioncenter_crop
(image: Image, size: Tuple[int, int])
clip/image_processor.py:76
↓ 1 callersFunctionclip_loss
(logits: mx.array)
clip/model.py:76
↓ 1 callersFunctioncoco_encode_rle
(uncompressed_rle: Dict[str, Any])
segment_anything/segment_anything/utils/amg.py:296
↓ 1 callersFunctioncompare_models
()
encodec/test.py:33
↓ 1 callersFunctioncompare_processors
()
encodec/test.py:12
↓ 1 callersFunctioncompression_ratio
(text)
whisper/mlx_whisper/decoding.py:15
↓ 1 callersFunctioncompute_loss_and_accumulate_grads
(x, t5_feat, clip_feat, guidance, prev_grads)
flux/dreambooth.py:210
↓ 1 callersFunctioncompute_loss_and_grads
(x, t5_feat, clip_feat, guidance)
flux/dreambooth.py:204
↓ 1 callersMethodcompute_time_embedding
Compute time embeddings for TeaCache. Returns (t_emb, e0). t_emb: [1, dim] (pre-projection, used by head) e0: [1, 6*dim] (projected, u
video/wan2.1/wan/model.py:104
↓ 1 callersFunctionconvert
(model_path)
segment_anything/convert.py:44
↓ 1 callersFunctionconvert
(bert_model: str, mlx_model: str)
bert/convert.py:22
↓ 1 callersFunctionconvert
(tf, config)
llms/mixtral/convert.py:18
↓ 1 callersFunctionconvert
(model_name, dtype)
llms/speculative_decoding/convert.py:46
↓ 1 callersFunctionconvert
( upload: bool, model: str, dtype: str = None, )
encodec/convert.py:121
↓ 1 callersMethodconvert_model_output
(self, model_output, sample)
video/wan2.1/wan/sampler.py:101
↓ 1 callersFunctionconvert_single
(k, v)
llms/mixtral/convert.py:19
↓ 1 callersFunctioncreate_additive_causal_mask
(N: int, offset: int = 0)
llms/speculative_decoding/model.py:233
↓ 1 callersFunctioncreate_sin_embedding
(positions: mx.array, dim: int, max_period: float = 10000)
musicgen/musicgen.py:186
↓ 1 callersFunctioncreate_umt5_xxl_encoder
()
video/wan2.1/wan/t5.py:180
↓ 1 callersFunctiondecode
(codes, scales, mask)
encodec/example.py:28
↓ 1 callersMethoddecode
(self, z: mx.array)
flux/flux/autoencoder.py:352
↓ 1 callersMethoddecode
( self, inputs: mx.array, memory: mx.array, )
llms/speculative_decoding/model.py:307
↓ 1 callersFunctiondecode_with_fallback
(segment: mx.array)
whisper/mlx_whisper/transcribe.py:207
↓ 1 callersMethoddevice
(self)
whisper/mlx_whisper/torch_whisper.py:266
↓ 1 callersFunctiondownload
(hf_repo)
segment_anything/convert.py:34
↓ 1 callersFunctiondownload_and_save
(save_dir)
transformer_lm/datasets.py:77
↓ 1 callersFunctiondownload_and_save
(save_file)
mnist/mnist.py:26
↓ 1 callersFunctiondownload_cora
Downloads the cora dataset into a local cora folder.
gcn/datasets.py:16
↓ 1 callersFunctiondtw
(x: np.ndarray)
whisper/mlx_whisper/timing.py:98
↓ 1 callersFunctiondtw_cpu
(x: np.ndarray)
whisper/mlx_whisper/timing.py:73
↓ 1 callersFunctionembed
(t5_model: str)
t5/hf_t5.py:6
↓ 1 callersFunctionencode
(feats, mask)
encodec/example.py:22
↓ 1 callersMethodencode
(self, x: mx.array)
flux/flux/autoencoder.py:347
↓ 1 callersMethodencode
(self, s: str)
llms/gguf_llm/models.py:229
↓ 1 callersMethodencode
(self, inputs: mx.array)
llms/speculative_decoding/model.py:292
↓ 1 callersMethodencode_dataset
Encode the images & prompt in the latent space to prepare for training.
flux/flux/trainer.py:79
↓ 1 callersFunctionenumerate_labels
Converts the labels from the original string form to the integer [0:MaxLabels-1]
gcn/datasets.py:51
↓ 1 callersMethodeos_id
(self)
t5/t5.py:24
↓ 1 callersFunctioneval_fn
(X, y)
mnist/main.py:75
↓ 1 callersFunctioneval_fn
(model, x, y)
speechcommands/main.py:55
↓ 1 callersFunctioneval_fn
(model, inp, tgt)
cifar/main.py:33
↓ 1 callersFunctionfeats
(n_mels: int = 80)
whisper/benchmark.py:41
↓ 1 callersFunctionfetch_from_hub
(hf_repo: str)
encodec/convert.py:17
↓ 1 callersFunctionfew_shot_generate
(args)
llms/llama/llama.py:243
↓ 1 callersMethodfinalize
Finalize search and return the final candidate sequences Parameters ---------- tokens : mx.array, shape = (n_audio, n_group,
whisper/mlx_whisper/decoding.py:225
↓ 1 callersFunctionfind_alignment
( model: "Whisper", tokenizer: Tokenizer, text_tokens: List[int], mel: mx.array, num_frame
whisper/mlx_whisper/timing.py:112
↓ 1 callersFunctionformat_timestamp
( seconds: float, always_include_hours: bool = False, decimal_marker: str = "." )
whisper/mlx_whisper/writers.py:9
↓ 1 callersFunctionforward_mlx
(model, mels, tokens)
whisper/test.py:71
↓ 1 callersFunctionforward_torch
(model, mels, tokens)
whisper/test.py:63
↓ 1 callersMethodforward_with_cross_qk
(self, mel, tokens)
whisper/mlx_whisper/whisper.py:250
↓ 1 callersMethodfrom_base
( linear: nn.Linear, r: int = 8, dropout: float = 0.0, scale: float = 1.0,
flux/flux/lora.py:11
↓ 1 callersMethodfuse
(self)
flux/flux/lora.py:28
↓ 1 callersMethodfuse_lora_layers
(self)
flux/flux/flux.py:241
↓ 1 callersFunctiongenerate
(model, prompt, tokenizer, args)
lora/lora.py:303
↓ 1 callersFunctiongenerate
(prompt: mx.array, model: Mixtral, temp: Optional[float] = 0.0)
llms/mixtral/mixtral.py:224
↓ 1 callersFunctiongenerate
( model: models.Model, tokenizer: models.GGUFTokenizer, prompt: str, max_tokens: int, temp
llms/gguf_llm/generate.py:10
↓ 1 callersFunctiongenerate
(prompt: mx.array, model: Mistral, temp: Optional[float] = 0.0)
llms/mistral/mistral.py:192
↓ 1 callersFunctiongenerate
(prompt: str, model: T5, tokenizer: Tokenizer, temp: Optional[float] = 0.0)
musicgen/t5.py:431
↓ 1 callersFunctiongenerate
( model, out_file, num_samples=128, )
cvae/main.py:66
↓ 1 callersFunctiongenerate
(prompt: str, model: T5, tokenizer: Tokenizer, temp: Optional[float] = 0.0)
t5/t5.py:431
↓ 1 callersFunctiongenerate
(t5_model: str)
t5/hf_t5.py:25
↓ 1 callersMethodgenerate
Generates masks for the given image. Arguments: image (np.ndarray): The image to generate masks for, in HWC uint8 format
segment_anything/segment_anything/automatic_mask_generator.py:129
↓ 1 callersMethodgenerate
( self, prompt, max_tokens: int = 100, )
llms/speculative_decoding/decoder.py:69
↓ 1 callersFunctiongenerate_crop_boxes
Generates a list of crop boxes of different sizes. Each layer has (2**i)**2 boxes for the ith layer.
segment_anything/segment_anything/utils/amg.py:202
↓ 1 callersMethodgenerate_images
( self, text: str, n_images: int = 1, num_steps: int = 35, guidance: f
flux/flux/flux.py:164
↓ 1 callersMethodgenerate_latents
( self, text: str, n_images: int = 1, num_steps: int = 50, cfg_weight:
stable_diffusion/stable_diffusion/__init__.py:102
↓ 1 callersMethodgenerate_latents_from_image
( self, image, text: str, n_images: int = 1, strength: float = 0.8,
stable_diffusion/stable_diffusion/__init__.py:131
↓ 1 callersFunctiongenerate_text
(input_ids, pixel_values, model, processor, max_tokens, temperature)
llava/generate.py:101
↓ 1 callersFunctionget_amg_kwargs
(args)
segment_anything/main.py:163
↓ 1 callersFunctionget_cifar10
(batch_size, root=None)
clip/linear_probe.py:14
↓ 1 callersFunctionget_cifar10
(batch_size, root=None)
cifar/dataset.py:6
↓ 1 callersFunctionget_config
(metadata: dict)
llms/gguf_llm/models.py:208
↓ 1 callersFunctionget_encoding
(name: str = "gpt2", num_languages: int = 99)
whisper/mlx_whisper/tokenizer.py:333
↓ 1 callersMethodget_image_features
(self, x: mx.array)
clip/model.py:311
↓ 1 callersMethodget_model
(cls, model_path: str, dtype: mx.Dtype)
whisper/mlx_whisper/transcribe.py:55
↓ 1 callersFunctionget_model_path
(path_or_hf_repo: str, force_download: bool = False)
clip/convert.py:66
↓ 1 callersFunctionget_moons_dataset
Get two moons dataset with given noise level.
normalizing_flow/main.py:15
↓ 1 callersMethodget_num_quantizers_for_bandwidth
Return num_quantizers based on specified target bandwidth.
encodec/encodec.py:431
↓ 1 callersMethodget_num_quantizers_for_bandwidth
Return num_quantizers based on specified target bandwidth.
musicgen/encodec.py:431
↓ 1 callersFunctionget_rope_dimensions
Get the dimension split for 3D RoPE. - Frame: d - 4*(d//6) - Height: 2*(d//6) - Width: 2*(d//6)
video/wan2.1/wan/rope.py:16
↓ 1 callersFunctionget_start
(segments: List[dict])
whisper/mlx_whisper/writers.py:30
↓ 1 callersFunctionget_writer
( output_format: str, output_dir: str )
whisper/mlx_whisper/writers.py:246
↓ 1 callersFunctiongrad_accumulate_and_step
(x, t5_feat, clip_feat, guidance, prev_grads)
flux/dreambooth.py:218
↓ 1 callersFunctionhanning
(size)
whisper/mlx_whisper/audio.py:102
↓ 1 callersFunctionhf_to_pt
(weights, config)
whisper/convert.py:112
↓ 1 callersMethodindex_for_timestep
(self, timestep, schedule_timesteps=None)
video/wan2.1/wan/sampler.py:293
↓ 1 callersFunctionis_box_near_crop_edge
Filter masks at the edge of a crop, but not at the edge of the original image.
segment_anything/segment_anything/utils/amg.py:72
↓ 1 callersMethoditerate
(self, batch_size)
flux/flux/trainer.py:86
↓ 1 callersFunctioniterate_batches
(batch_size, context_size, dataset)
transformer_lm/main.py:48
↓ 1 callersFunctionload
(args)
lora/lora.py:151
↓ 1 callersFunctionload
Load all three splits of the WikiSQL dataset.
lora/data/wikisql.py:14
↓ 1 callersFunctionload
(model_dir: str)
clip/clip.py:8
← previousnext →301–400 of 1,187, ranked by callers