MCPcopy Create free account

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

Functions947 in github.com/AMAP-ML/EMF

Methodstate_dict
r""" Returns the state dictionary of the model. We add the state dictionary of the value head to the state dictionary of the wrapped m
trl/trl/models/modeling_value_head.py:361
Methodstep
Run an optimisation step given a list of input_ids, attention_mask, and labels or a list of text and text_labels. Args:
trl/trl/trainer/iterative_sft_trainer.py:283
Methodsystem
(self)
trl/trl/models/utils.py:50
Methodtext_encoder
(self)
trl/trl/models/modeling_sd_base.py:857
Functionthink_format_reward
r""" Reward function that checks if the reasoning process is enclosed within `"<think>"` and `"</think>"` tags. The function returns a reward
trl/trl/rewards/format_rewards.py:18
Functionto_conversational
Convert prompt from "xxx" to [{"role": "user", "content": [{"type": "image"}, {"type": "text", "text": "xxx"}]}] and chosen and rejected from
trl/examples/datasets/rlaif-v.py:51
Methodto_dict
(self)
trl/trl/trainer/alignprop_config.py:181
Methodto_gradio_chatbot
(self)
blip3o/conversation.py:180
Functionto_preference
(example)
trl/examples/datasets/tldr_preference.py:51
Functionto_prompt_completion
(example)
trl/examples/datasets/tldr.py:51
Functionto_prompt_completion
(example, tokenizer)
trl/examples/datasets/lm-human-preferences-sentiment.py:51
Functionto_prompt_completion
(example, tokenizer)
trl/examples/datasets/lm-human-preferences-descriptiveness.py:56
Functionto_unpaired_preference
(example)
trl/examples/datasets/ultrafeedback-prompt.py:51
Functionto_unpaired_preference
(example, model_name, aspect)
trl/examples/datasets/ultrafeedback.py:88
Functiontokenize
(element)
trl/examples/scripts/rloo/rloo.py:108
Functiontokenize
(element)
trl/examples/scripts/rloo/rloo_tldr.py:106
Functiontokenize
(element)
trl/examples/scripts/ppo/ppo_tldr.py:139
Functiontokenize
(element)
trl/examples/scripts/ppo/ppo.py:136
Functiontokenize
(sample)
trl/examples/research_projects/toxicity/scripts/gpt-j-6b-toxicity.py:127
Methodtokenize_row
Tokenize a single row from a ORPO specific dataset. At this stage, we don't convert to PyTorch tensors yet; we just handle the truncation in
trl/trl/trainer/orpo_trainer.py:411
Methodtokenize_row
Tokenize a row of the dataset. Args: features (`dict[str, str]`): Row of the dataset, should contain the
trl/trl/trainer/dpo_trainer.py:660
Methodtokenize_row
Tokenize a single row from a CPO specific dataset. At this stage, we don't convert to PyTorch tensors yet; we just handle the truncation in c
trl/trl/trainer/cpo_trainer.py:431
Methodtokenizer
(self)
trl/trl/models/modeling_sd_base.py:849
Functiontokenizer_image_token
(prompt, tokenizer, image_token_index=IMAGE_TOKEN_INDEX, return_tensors=None)
blip3o/mm_utils.py:11
Methodtorch_call
(self, examples: list[Union[list[int], Any, dict[str, Any]]])
trl/trl/trainer/dpo_trainer.py:146
Methodtorch_call
(self, examples: list[Union[list[int], Any, dict[str, Any]]])
trl/trl/trainer/sft_trainer.py:180
Methodtrain
(self)
trl/trl/trainer/rloo_trainer.py:244
Methodtraining_step
( self, model: nn.Module, inputs: dict[str, Union[torch.Tensor, Any]], num_items_in_batch: Optional[in
trl/trl/trainer/online_dpo_trainer.py:552
Methodtraining_step
( self, model: nn.Module, inputs: dict[str, Union[torch.Tensor, Any]], num_items_in_batch: Optional[in
trl/trl/trainer/xpo_trainer.py:446
Methodtraining_step
Perform a training step for the Generalized Knowledge Distillation (GKD) model. This method implements the on-policy learning approa
trl/trl/trainer/gkd_trainer.py:277
Methodtraining_step
( self, model: nn.Module, inputs: dict[str, Union[torch.Tensor, Any]], num_items_in_batch: Optional[in
trl/trl/trainer/nash_md_trainer.py:409
Methodtraining_step
(self, *args, **kwargs)
trl/trl/trainer/sft_trainer.py:912
Functiontruncate
(examples)
trl/trl/data_utils.py:661
Methodunet
(self)
trl/trl/models/modeling_sd_base.py:841
Methodunpack_tensor_single_stream
(unpack_tensor_id: int)
trl/trl/models/activation_offloading.py:190
Methodunpack_tensor_with_streams
(unpack_tensor_id: int)
trl/trl/models/activation_offloading.py:214
Methodupdate
(self, prompts, rewards)
trl/trl/trainer/utils.py:557
Functionupdate_named_param
Updates the model weights with the provided tensor. Once this endpoint is called, the client process should broadcast the updated we
trl/trl/scripts/vllm_serve.py:582
Methodupdate_named_param
Receives updated weights from the client process and updates the named parameter in the model. Args: name (`str`):
trl/trl/scripts/vllm_serve.py:128
Methoduser
(self)
trl/trl/models/utils.py:54
Methodvae
Returns the Variational Autoencoder model used from mapping images to and from the latent space
trl/trl/models/modeling_sd_base.py:93
Methodvae
(self)
trl/trl/models/modeling_sd_base.py:845
Methodverify_sufficient_virtual_memory
()
trl/trl/models/activation_offloading.py:111
Methodwait_and_del_remaining_references
()
trl/trl/models/activation_offloading.py:220
Functionwarning_handler
(message, category, filename, lineno, file=None, line=None)
trl/trl/scripts/utils.py:107
Methodwrapped_forward
(*_args: Any, **_kwargs: Any)
trl/trl/models/utils.py:429
Functionwrapper
(self, *args, **kwargs)
trl/trl/extras/profiling.py:96
← previous901–947 of 947, ranked by callers