MCPcopy Create free account

hub / github.com/AMAP-ML/EMF / functions

Functions947 in github.com/AMAP-ML/EMF

↓ 1 callersFunctionmasked_var
Compute variance of tensor with masked values.
trl/trl/core.py:51
↓ 1 callersFunctionmaybe_zero_3
(param, ignore_status=False, name=None)
blip3o/train/blip3o_trainer.py:31
↓ 1 callersFunctionmean_pooling
(model_output, attention_mask)
trl/examples/scripts/bco.py:92
↓ 1 callersFunctionmeanflow_sampler
MeanFlow sampler supporting both single-step and multi-step generation Based on Eq.(12): z_r = z_t - (t-r)u(z_t, r, t) For single-st
blip3o/model/language_model/meanflow_sampler.py:4
↓ 1 callersFunctionmerge_models
Merge two models using mergekit Args: config (`MergeConfig`): The merge configuration. out_path (`str`): The output path for
trl/trl/mergekit_utils.py:262
↓ 1 callersFunctionnanmax
Compute the maximum value of a tensor, ignoring NaNs. This function only supports 1D tensors. Args: tensor (`torch.Tensor`): Input t
trl/trl/trainer/grpo_trainer.py:310
↓ 1 callersFunctionnanmin
Compute the minimum value of a tensor, ignoring NaNs. This function only supports 1D tensors. Args: tensor (`torch.Tensor`): Input t
trl/trl/trainer/grpo_trainer.py:295
↓ 1 callersFunctionnanstd
Compute the standard deviation of a tensor, ignoring NaNs. This function only supports 1D tensors. Args: tensor (`torch.Tensor`):
trl/trl/trainer/grpo_trainer.py:217
↓ 1 callersMethodnull_ref_context
Context manager for handling null reference model (that is, peft adapter manipulation).
trl/trl/trainer/ppo_trainer.py:319
↓ 1 callersFunctionnumpy_to_pil
Convert a NumPy array of shape (batch, height, width, channels) to a list of PIL Images.
blip3o/model/language_model/blip3o_qwen_inference.py:24
↓ 1 callersFunctionnumpy_to_pil
Convert a NumPy array of shape (batch, height, width, channels) to a list of PIL Images.
blip3o/model/language_model/blip3o_qwen_grpo.py:26
↓ 1 callersMethododds_ratio_loss
Compute ORPO's odds ratio (OR) loss for a batch of policy and reference model log probabilities. Args: policy_chosen_logps:
trl/trl/trainer/orpo_trainer.py:634
↓ 1 callersMethodon_after_inner_forward
(self, wrapper_module: nn.Module, original_module: nn.Module)
trl/trl/models/utils.py:445
↓ 1 callersMethodon_after_outer_forward
(self, wrapper_module: nn.Module, original_module: nn.Module)
trl/trl/models/utils.py:448
↓ 1 callersFunctionpack_dataset
r""" Pack sequences in a dataset into chunks of size `seq_length`. Args: dataset (`Dataset` or `DatasetDict`): Dataset to
trl/trl/data_utils.py:570
↓ 1 callersMethodparse_tool_call
Parse request string. Expected format: <request><tool_name>query<call>
trl/trl/environment/base_environment.py:351
↓ 1 callersFunctionpermute
(v: Optional[Sequence])
trl/trl/trainer/grpo_trainer.py:285
↓ 1 callersFunctionpipeline_step
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `list[str]`, *optional*): The prompt or prompts to guid
trl/trl/models/modeling_sd_base.py:326
↓ 1 callersFunctionpipeline_step_with_grad
r""" Function to get RGB image with gradients attached to the model weights. Args: prompt (`str` or `list[str]`, *optional*, defaults
trl/trl/models/modeling_sd_base.py:534
↓ 1 callersMethodprediction_step
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/reward_trainer.py:298
↓ 1 callersFunctionprefill
(model, cond_idx: torch.Tensor, input_pos: torch.Tensor, cfg_scale: float, **sampling_kwargs)
tok/ar_dtok/generate.py:77
↓ 1 callersFunctionprepare_dataset
Prepare dataset example for training.
trl/examples/scripts/sft_video_llm.py:91
↓ 1 callersFunctionprepare_dataset
(dataset: DatasetDict, dataset_name: str, dataset_train_split: str)
trl/examples/scripts/sft_vlm_gemma3.py:124
↓ 1 callersMethodprepare_model_inputs
(self, input_ids: torch.Tensor, attention_mask: torch.Tensor, labels: torch.Tensor)
trl/trl/trainer/iterative_sft_trainer.py:196
↓ 1 callersFunctionprepare_sample_text
Prepare the text from a sample of the dataset.
trl/examples/research_projects/stack_llama/scripts/supervised_finetuning.py:99
↓ 1 callersFunctionprepare_sample_text
Prepare the text from a sample of the dataset.
trl/examples/research_projects/stack_llama_2/scripts/sft_llama2.py:111
↓ 1 callersFunctionpreprocess_multimodal
(sources: Sequence[str], data_args)
blip3o/data/dataset.py:59
↓ 1 callersFunctionpreprocess_qwen
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False, max_len=2048, system_message:
blip3o/data/dataset.py:78
↓ 1 callersFunctionprint_prompt_completions_sample
Print out a sample of model completions to the console with multiple reward metrics. This function creates a nicely formatted table showing
trl/trl/trainer/utils.py:1492
↓ 1 callersFunctionprint_trainable_parameters
Prints the number of trainable parameters in the model.
trl/examples/research_projects/stack_llama/scripts/supervised_finetuning.py:84
↓ 1 callersFunctionprocess_example
(example)
trl/examples/datasets/prm800k.py:51
↓ 1 callersMethodprocess_image
(self, image)
blip3o/data/dataset.py:240
↓ 1 callersFunctionprocess_sequence
(ids, mask)
trl/trl/trainer/grpo_trainer.py:406
↓ 1 callersMethodprocess_target_image
(self, image)
blip3o/data/dataset.py:247
↓ 1 callersMethodproject_in
(self, x)
tok/ar_dtok/bottleneck.py:43
↓ 1 callersMethodpush_to_hub
(self, *args, **kwargs)
trl/trl/models/modeling_value_head.py:215
↓ 1 callersFunctionrecurse
(nest: dict, prefix: str, into: dict)
trl/trl/core.py:29
↓ 1 callersFunctionremove_hooks
Removes the optimizer hooks from a DeepSpeed ZeRO-3 model.
trl/trl/models/utils.py:240
↓ 1 callersMethodrgb_with_grad
(self, *args, **kwargs)
trl/trl/models/modeling_sd_base.py:834
↓ 1 callersMethodrun
Run the environment on a list of queries. Args: queries (list[str]): A list of queries to run the model in the environme
trl/trl/environment/base_environment.py:281
↓ 1 callersFunctionrun_training
(args, train_data, val_data)
trl/examples/research_projects/stack_llama/scripts/supervised_finetuning.py:147
↓ 1 callersFunctionsafe_save_model_for_hf_trainer
(trainer: transformers.Trainer, output_dir: str)
blip3o/train/train.py:80
↓ 1 callersMethodsample_time_steps
Sample time steps (r, t). progress: float in [0,1] OR current_step/total_steps pair. If none provided, use start values (back
blip3o/model/language_model/loss_adaptive.py:75
↓ 1 callersMethodsampling
(self)
tok/ar_dtok/ar_model.py:366
↓ 1 callersMethodsave_to_json
Save the content of this instance in JSON format inside `json_path`.
trl/trl/trainer/utils.py:436
↓ 1 callersMethodscheduler_step
(self, *args, **kwargs)
trl/trl/models/modeling_sd_base.py:82
↓ 1 callersMethodset_defaults_with_config
Overrides the parser's default values with those provided via keyword arguments, including for subparsers. Any argument with an upda
trl/trl/scripts/utils.py:234
↓ 1 callersMethodsetup_caches
(self, max_batch_size, max_seq_length, dtype)
tok/ar_dtok/ar_model.py:374
↓ 1 callersFunctionshift_tokens_right
Shift input ids one token to the right, and pad with pad_token_id
trl/trl/trainer/dpo_trainer.py:98
↓ 1 callersFunctionshuffle_sequence_dict
Shuffles all sequence-like values in a dictionary along the first dimension in unison. Example: ```python >>> x = torch.arange(6).re
trl/trl/trainer/grpo_trainer.py:265
↓ 1 callersFunctionsplit_pixel_values_by_grid
Splits `batch["pixel_values"]` into a list of tensors based on the product of each row in `batch["image_grid_thw"]`, while keeping other entr
trl/trl/trainer/grpo_trainer.py:330
↓ 1 callersMethodsplit_query_response_tokens
Split the tokens into query and response tokens.
trl/trl/environment/base_environment.py:131
↓ 1 callersFunctionsplit_tensor_dict
Splits a dictionary of tensors along the first dimension into `num_chunks` equal parts. Example: ```python >>> x = torch.arange(12).
trl/trl/trainer/grpo_trainer.py:235
↓ 1 callersMethodstep
Step the environment forward one turn. Args: history (`TextHistory`): The history to step forward.
trl/trl/environment/base_environment.py:314
↓ 1 callersMethodstep
Perform a single step of training. Args: epoch (int): The current epoch. global_step (int): The current glob
trl/trl/trainer/alignprop_trainer.py:199
↓ 1 callersMethodsync_target_model
(model, target_model, alpha)
trl/trl/trainer/callbacks.py:112
↓ 1 callersMethodtoken_drop
Drops labels to enable classifier-free guidance.
tok/ar_dtok/ar_model.py:270
↓ 1 callersMethodtokenize_row
Tokenize a single row from a DPO specific dataset.
trl/trl/trainer/online_dpo_trainer.py:375
↓ 1 callersFunctiontrain
()
blip3o/train/train.py:135
↓ 1 callersMethodtrain
Train the model for a given number of epochs
trl/trl/trainer/ddpo_trainer.py:588
↓ 1 callersMethodtrain
Train the model for a given number of epochs
trl/trl/trainer/alignprop_trainer.py:386
↓ 1 callersFunctiontruncate_dataset
r""" Truncate sequences in a dataset to a specifed `max_length`. Args: dataset (`Dataset` or `DatasetDict`): Dataset to t
trl/trl/data_utils.py:625
↓ 1 callersFunctiontruncate_with_protected_tokens
Truncate tensors to target length while preserving protected tokens. Args: ids (`torch.Tensor`): Input tensor of token I
trl/trl/trainer/grpo_trainer.py:388
↓ 1 callersFunctionunpair_preference_dataset
r""" Unpair a preference dataset. Args: dataset (`Dataset` or `DatasetDict`): Preference dataset to unpair. The dataset m
trl/trl/data_utils.py:238
↓ 1 callersFunctionunsplit_pixel_values_by_grid
Opposite of `split_pixel_values_by_grid`. Merges a list of tensors in `batch["pixel_values"]` back into a single tensor along the first dimen
trl/trl/trainer/grpo_trainer.py:348
↓ 1 callersMethodupdate_model_params
Updates all parameters of the given model by calling `update_named_param` for each parameter in the model. Args: model (
trl/trl/extras/vllm_client.py:316
↓ 1 callersFunctionupload_model_to_hf
(folder_path: str, repo_id: str)
trl/trl/mergekit_utils.py:26
↓ 1 callersMethodvisualize_samples
Visualize the reward model logits prediction Args: num_print_samples (`int`, defaults to `4`): The numbe
trl/trl/trainer/reward_trainer.py:335
FunctionLLAMA_ABS_B
(**kwargs)
tok/ar_dtok/ar_model.py:517
FunctionLLAMA_ABS_L
(**kwargs)
tok/ar_dtok/ar_model.py:514
FunctionLLAMA_ABS_LP
(**kwargs)
tok/ar_dtok/ar_model.py:511
FunctionLLAMA_ABS_S
(**kwargs)
tok/ar_dtok/ar_model.py:520
FunctionLLAMA_ABS_XL
(**kwargs)
tok/ar_dtok/ar_model.py:508
FunctionLLAMA_ABS_XXL
(**kwargs)
tok/ar_dtok/ar_model.py:505
FunctionLLAMA_ABS_XXXL
(**kwargs)
tok/ar_dtok/ar_model.py:502
FunctionVQ_16
(**kwargs)
tok/ar_dtok/vqvae.py:454
FunctionVQ_8
(**kwargs)
tok/ar_dtok/vqvae.py:451
Method__call__
( self, attn: Attention, hidden_states: torch.Tensor, encoder_hidden_states: O
sana_transformer.py:136
Method__call__
(self, output_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs)
blip3o/mm_utils.py:54
Method__call__
Compute MeanFlow loss function with schedule support. Provide either training_progress (0..1) or current_step & total_steps.
blip3o/model/language_model/loss_adaptive.py:115
Method__call__
(self, instances: Sequence[Dict])
blip3o/data/dataset.py:368
Method__call__
(self, images)
trl/examples/scripts/ddpo.py:127
Method__call__
(self, features: list[dict[str, Any]])
trl/examples/research_projects/stack_llama/scripts/reward_modeling.py:238
Method__call__
(self)
trl/trl/core.py:87
Method__call__
Returns true if all generated sequences contain any of the stop strings.
trl/trl/environment/base_environment.py:38
Method__call__
(self, examples: list[dict[str, Any]])
trl/trl/trainer/utils.py:87
Method__call__
(self, features: list[dict[str, Any]])
trl/trl/trainer/utils.py:188
Method__call__
(self, features: list[dict[str, Any]])
trl/trl/trainer/utils.py:329
Method__call__
(self, images)
trl/trl/models/auxiliary_modules.py:67
Method__call__
(self, *args, **kwargs)
trl/trl/models/modeling_base.py:695
Method__call__
Reroutes a method call through the `wrapper_module`'s `forward` method. Args: wrapper_module: The module that has `original_modul
trl/trl/models/utils.py:411
Method__call__
(self, *args, **kwargs)
trl/trl/models/modeling_sd_base.py:79
Method__call__
(self, *args, **kwargs)
trl/trl/models/modeling_sd_base.py:831
Method__dir__
(self)
trl/trl/import_utils.py:119
Method__getattr__
(self, name: str)
trl/trl/import_utils.py:128
Method__getitem__
(self, i)
blip3o/data/dataset.py:270
Method__init__
(self, dim: int, elementwise_affine: bool = False, eps: float = 1e-6)
sana_transformer.py:86
Method__init__
(self, embedding_dim)
sana_transformer.py:100
Method__init__
(self)
sana_transformer.py:132
Method__init__
( self, dim: int = 2240, num_attention_heads: int = 70, attention_head_dim: in
sana_transformer.py:198
← previousnext →401–500 of 947, ranked by callers