Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AMAP-ML/EMF
/ functions
Functions
947 in github.com/AMAP-ML/EMF
⨍
Functions
947
◇
Types & classes
184
↳
Endpoints
9
Method
__post_init__
(self)
trl/trl/trainer/sft_config.py:245
Method
__post_init__
(self)
trl/trl/trainer/nash_md_config.py:43
Method
__post_init__
(self)
trl/trl/trainer/orpo_config.py:160
Method
__post_init__
(self)
trl/trl/trainer/bco_config.py:203
Method
__reduce__
(self)
trl/trl/import_utils.py:151
Function
_fn
(images, prompts, metadata)
trl/examples/scripts/ddpo.py:150
Function
_fn
(images, prompts, metadata)
trl/trl/models/auxiliary_modules.py:91
Method
_func
(example)
trl/trl/trainer/sft_trainer.py:697
Function
_get_kl_dataset
Creates mismatched pairs of prompts and completions for the KL dataset by adding a +1 offset to the order of completions. For best results, t
trl/trl/trainer/kto_trainer.py:85
Method
_get_train_sampler
(self)
blip3o/train/blip3o_trainer.py:314
Method
_get_train_sampler
(self, dataset: Optional[Dataset] = None)
trl/trl/trainer/bco_trainer.py:1290
Method
_init_weights
(self, module)
tok/ar_dtok/ar_model.py:346
Method
_load_model_hook
(self, models, input_dir)
trl/trl/trainer/ddpo_trainer.py:434
Method
_load_model_hook
(self, models, input_dir)
trl/trl/trainer/alignprop_trainer.py:322
Method
_load_optimizer_and_scheduler
(self, checkpoint)
trl/trl/trainer/bco_trainer.py:856
Method
_maybe_log_save_evaluate
( self, tr_loss, grad_norm, model, trial, epoch, ignore_keys_for_eval, start_time, learning_rate=None
trl/trl/trainer/online_dpo_trainer.py:733
Function
_pack_bfd
Pack sequences in a pyarrow Table using Best Fit Decreasing strategy.
trl/trl/data_utils.py:486
Function
_pack_wrapped
Pack sequences in a pyarrow Table using a wrapped strategy.
trl/trl/data_utils.py:552
Function
_process_tokens
Process tokens of a KTO specific dataset. At this stage, we don't convert to PyTorch tensors yet; we just handle the truncation in case the promp
trl/trl/trainer/kto_trainer.py:154
Function
_process_tokens
Process tokens of a BCO specific dataset. At this stage, we don't convert to PyTorch tensors yet; we just handle the truncation in case the promp
trl/trl/trainer/bco_trainer.py:162
Method
_save_checkpoint
(self, model, trial)
trl/trl/trainer/iterative_sft_trainer.py:434
Method
_save_checkpoint
(self, model, trial)
trl/trl/trainer/ddpo_trainer.py:603
Method
_save_checkpoint
(self, model, trial)
trl/trl/trainer/alignprop_trainer.py:401
Method
_save_checkpoint
(self, model, trial)
trl/trl/trainer/prm_trainer.py:307
Method
_save_checkpoint
(self, model, trial)
trl/trl/trainer/kto_trainer.py:1668
Method
_save_checkpoint
(self, model, trial)
trl/trl/trainer/orpo_trainer.py:1030
Method
_save_checkpoint
(self, model, trial)
trl/trl/trainer/bco_trainer.py:1475
Method
_save_checkpoint
(self, model, trial)
trl/trl/trainer/dpo_trainer.py:1920
Method
_save_checkpoint
(self, model, trial)
trl/trl/trainer/cpo_trainer.py:1046
Method
_save_checkpoint
(self, model, trial)
trl/trl/trainer/sft_trainer.py:930
Method
_save_checkpoint
(self, model, trial)
trl/trl/trainer/reward_trainer.py:373
Method
_save_checkpoint
(self, model, trial)
trl/trl/trainer/grpo_trainer.py:2072
Method
_save_model_hook
(self, models, weights, output_dir)
trl/trl/trainer/ddpo_trainer.py:430
Method
_save_model_hook
(self, models, weights, output_dir)
trl/trl/trainer/alignprop_trainer.py:318
Method
_save_optimizer_and_scheduler
(self, output_dir)
trl/trl/trainer/bco_trainer.py:845
Method
_save_pretrained
(self, save_directory)
trl/trl/trainer/ddpo_trainer.py:598
Method
_save_pretrained
(self, save_directory)
trl/trl/trainer/alignprop_trainer.py:396
Method
_set_signature_columns_if_needed
(self)
trl/trl/trainer/dpo_trainer.py:777
Method
_set_signature_columns_if_needed
(self)
trl/trl/trainer/sft_trainer.py:849
Method
_set_signature_columns_if_needed
(self)
trl/trl/trainer/grpo_trainer.py:943
Function
_tokenize
Tokenize a batch from a KTO specific dataset.
trl/trl/trainer/kto_trainer.py:96
Function
_tokenize
Tokenize a batch from a BCO specific dataset.
trl/trl/trainer/bco_trainer.py:93
Function
_tokenize
Tokenize a batch from a reward modelling dataset.
trl/trl/trainer/reward_trainer.py:65
Function
_unpair_row
(examples: list[dict[str, list[dict[str, str]]]])
trl/trl/data_utils.py:227
Method
_validate_model_class
(self)
trl/trl/models/modeling_base.py:718
Method
_validate_model_kwargs
(self, model_kwargs)
trl/trl/models/modeling_base.py:721
Function
accuracy_reward
Reward function that checks if the completion matches the ground truth. - If both gold and prediction are parseable → use math verification.
trl/examples/scripts/grpo_vlm.py:146
Method
add_eos
(example, eos_token)
trl/trl/trainer/sft_trainer.py:732
Method
alpha
(self)
trl/trl/trainer/xpo_trainer.py:176
Method
append_message
(self, role, message)
blip3o/conversation.py:108
Method
apply_defaults
(parser, kw)
trl/trl/scripts/utils.py:243
Method
assistant
(self)
trl/trl/models/utils.py:58
Method
attn_processors
r""" Returns: `dict` of attention processors: A dictionary containing all attention processors used in the model with
sana_transformer.py:433
Method
autocast
(self)
trl/trl/models/modeling_sd_base.py:861
Method
beta
(self)
trl/trl/trainer/online_dpo_trainer.py:367
Method
chat_template
(self)
trl/trl/models/utils.py:62
Function
close_communicator
Closes the weight update group and cleans up associated resources.
trl/trl/scripts/vllm_serve.py:617
Method
close_communicator
Closes the communicator when weight synchronization is no longer needed. This method deletes the NCCL communicator to release associ
trl/trl/scripts/vllm_serve.py:154
Method
close_communicator
Closes the weight update group and cleans up the communication group.
trl/trl/extras/vllm_client.py:337
Function
collate_fn
(examples)
trl/examples/scripts/sft_vlm_smol_vlm.py:100
Function
collate_fn
(examples)
trl/examples/scripts/sft_vlm.py:93
Function
collate_fn
Collate batch of examples for training.
trl/examples/scripts/sft_video_llm.py:121
Function
collate_fn
(examples)
trl/examples/scripts/sft_vlm_gemma3.py:170
Function
collator
(data)
trl/examples/research_projects/toxicity/scripts/gpt-j-6b-toxicity.py:149
Function
collator
(data)
trl/examples/research_projects/stack_llama/scripts/rl_training.py:168
Method
collator
(data)
trl/trl/trainer/iterative_sft_trainer.py:363
Function
compute_accuracy
(eval_pred: EvalPrediction)
trl/trl/trainer/utils.py:475
Method
compute_liger_loss
(self, unwrapped_model, inputs)
trl/trl/trainer/grpo_trainer.py:1845
Method
compute_logprobs_for_data
(m, data)
trl/trl/trainer/xpo_trainer.py:292
Method
compute_logprobs_for_data
(m, data)
trl/trl/trainer/nash_md_trainer.py:306
Method
compute_loss
(self, model, inputs, return_outputs=False)
trl/examples/research_projects/stack_llama/scripts/reward_modeling.py:291
Method
compute_loss
(self, model, inputs, return_outputs=False, num_items_in_batch=None)
trl/examples/research_projects/layer_skip/scripts/custom_trainer.py:25
Method
compute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/orpo_trainer.py:845
Method
compute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/bco_trainer.py:1262
Method
compute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/dpo_trainer.py:1733
Method
compute_loss
(self, model, inputs, return_outputs=False, num_items_in_batch=None)
trl/trl/trainer/gkd_trainer.py:219
Method
compute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/cpo_trainer.py:869
Method
compute_loss
Compute training loss and additionally compute token accuracies
trl/trl/trainer/sft_trainer.py:863
Function
compute_metrics
(eval_pred)
trl/examples/research_projects/stack_llama/scripts/reward_modeling.py:280
Method
compute_reward_score
r""" Computes the reward score for a given input. The method has first to enable the adapter and then compute the reward score. After
trl/trl/models/modeling_base.py:561
Function
convert_to_rgb
(example)
trl/examples/scripts/grpo_vlm.py:131
Method
create_accelerator_and_postprocess
(self)
blip3o/train/blip3o_trainer.py:271
Method
create_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl/trl/trainer/xpo_trainer.py:535
Method
create_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl/trl/trainer/gkd_trainer.py:307
Method
create_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl/trl/trainer/nash_md_trainer.py:489
Method
create_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl/trl/trainer/grpo_trainer.py:2080
Method
create_optimizer
Setup the optimizer. We provide a reasonable default that works well. If you want to use something else, you can pass a tuple in the
blip3o/train/blip3o_trainer.py:405
Method
cross_entropy_loss
(logits, labels)
trl/trl/trainer/orpo_trainer.py:744
Method
cross_entropy_loss
(logits, labels)
trl/trl/trainer/cpo_trainer.py:775
Method
decode
(self, bottleneck_rep)
tok/ar_dtok/bottleneck.py:52
Method
decode
(self, indices)
tok/ar_dtok/bottleneck.py:183
Method
decode_from_bottleneck
(self, bottleneck_rep)
tok/ta_tok.py:148
Method
decode_from_encoder_indices
(self, indices, args={})
tok/mm_autoencoder.py:45
Method
decode_from_vqvae_indices
(self, indices)
tok/mm_autoencoder.py:53
Function
decorator
(cls)
tok/models.py:10
Method
device
(self)
blip3o/model/multimodal_encoder/ta_tok_encoder.py:96
Method
device
(self)
tok/ta_tok.py:85
Method
dict
(self)
blip3o/conversation.py:221
Function
drop_long_prompt
(example)
trl/examples/datasets/ultrafeedback-prompt.py:56
Method
dtype
(self)
blip3o/model/multimodal_encoder/ta_tok_encoder.py:91
← previous
next →
601–700 of 947, ranked by callers