MCPcopy Create free account

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

Functions947 in github.com/AMAP-ML/EMF

Functionimage_outputs_logger
(image_data, global_step, accelerate_logger)
trl/examples/scripts/ddpo.py:194
Functionimage_outputs_logger
(image_pair_data, global_step, accelerate_logger)
trl/examples/scripts/alignprop.py:119
Functioninit_communicator
Initializes the communicator for synchronizing model weights between a client and multiple server workers. Args: request
trl/trl/scripts/vllm_serve.py:550
Methodinit_communicator
Initializes the weight update communicator using a stateless process group. This method creates a `StatelessProcessGroup` that allow
trl/trl/scripts/vllm_serve.py:90
Functioninit_zero_verbose
Perform zero verbose init - use this method on top of the CLI modules to make logging and warning output cleaner. Uses Rich if available, fal
trl/trl/scripts/utils.py:87
Functionis_unsloth_available
()
trl/trl/import_utils.py:75
Methodjudge
Judge the completion for the given prompts and return the ranks of each completion. Args: prompts (`list[str]`):
trl/trl/trainer/judges.py:94
Methodjudge
Judge the completion pairs for the given prompts. Args: prompts (`list[str]`): List of prompts.
trl/trl/trainer/judges.py:121
Methodjudge
Judge the completion for a given prompt. Used to assess if a completion satisfies a constraint. This base class should be used to im
trl/trl/trainer/judges.py:153
Methodjudge
Judge the completion pairs for the given prompts using the PairRM model. Args: prompts (`list[str]`): Li
trl/trl/trainer/judges.py:222
Methodjudge
(self, prompts: list[str], completions: list[list[str]], shuffle_order: bool = True)
trl/trl/trainer/judges.py:316
Methodjudge
(self, prompts: list[str], completions: list[list[str]], shuffle_order: bool = True)
trl/trl/trainer/judges.py:375
Methodjudge
( self, prompts: list[str], completions: list[str], gold_completions: Optional
trl/trl/trainer/judges.py:434
Methodlast_layer
(self)
tok/ar_dtok/vqvae.py:207
Methodlast_text_segment
Get the last text segment.
trl/trl/environment/base_environment.py:124
Methodlengths
(self)
blip3o/data/dataset.py:254
Functionlifespan
(app: FastAPI)
trl/trl/scripts/vllm_serve.py:397
Functionllm_worker
( script_args: ScriptArguments, data_parallel_rank: int, master_port: int, connection: Connection )
trl/trl/scripts/vllm_serve.py:297
Methodload_checkpoint
(self, models, input_dir)
trl/trl/models/modeling_sd_base.py:903
Functionload_pretrained_model
(model_path, model_base, model_name, load_8bit=False, load_4bit=False, device_map="auto", torch_dtype="float16
blip3o/model/builder.py:8
Methodlog
(self, logs: dict[str, float], start_time: Optional[float] = None)
trl/trl/trainer/sft_trainer.py:916
Methodlog
(self, logs: dict[str, float], start_time: Optional[float] = None)
trl/trl/trainer/grpo_trainer.py:2022
Functionlogits_to_probs
(logits, temperature: float = 1.0, top_p: float=1.0, top_k: int = None, **kwargs)
tok/ar_dtok/generate.py:69
Methodloss
( self, advantages: torch.Tensor, clip_range: float, ratio: torch.Tensor,
trl/trl/trainer/alignprop_trainer.py:288
Functionmake
(model_spec, args=None, load_sd=False)
tok/models.py:16
Functionmake_conversation
(example)
trl/examples/scripts/grpo_vlm.py:115
Functionmake_inputs_require_grad
(module, input, output)
blip3o/train/train.py:156
Methodmake_inputs_require_grad
(module, input, output)
trl/trl/trainer/kto_trainer.py:427
Methodmake_inputs_require_grad
(module, input, output)
trl/trl/trainer/orpo_trainer.py:187
Methodmake_inputs_require_grad
(module, input, output)
trl/trl/trainer/bco_trainer.py:442
Methodmake_inputs_require_grad
(module, input, output)
trl/trl/trainer/dpo_trainer.py:607
Methodmake_inputs_require_grad
(module, input, output)
trl/trl/trainer/cpo_trainer.py:183
Methodmake_inputs_require_grad
(module, input, output)
trl/trl/trainer/sft_trainer.py:653
Methodmask_drop
(self, latents, drop_prob=0.1)
blip3o/model/language_model/blip3o_qwen_grpo.py:77
Methodmasked_batch_mean
(x)
trl/trl/trainer/grpo_trainer.py:1982
Methodmatch_underlying_distribution
(self)
trl/trl/trainer/bco_trainer.py:742
Functionmaybe_convert_to_chatml
Convert a conversational dataset with fields `from` and `value` to ChatML format. This function modifies conversational data to align with O
trl/trl/data_utils.py:728
Functionmaybe_extract_prompt
r""" Extracts the shared prompt from a preference data example, where the prompt is implicit within both the chosen and rejected completions.
trl/trl/data_utils.py:350
Methodmixture_coef
(self)
trl/trl/trainer/nash_md_trainer.py:171
Methodmodality_lengths
(self)
blip3o/data/dataset.py:262
Methodnoop
(tensor)
trl/trl/models/activation_offloading.py:339
Methodon_evaluate
(self, args, state, control, **kwargs)
trl/trl/trainer/callbacks.py:183
Methodon_evaluate
(self, args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs)
trl/trl/trainer/callbacks.py:356
Methodon_log
(self, args, state, control, logs=None, **kwargs)
trl/trl/trainer/callbacks.py:195
Methodon_predict
(self, args, state, control, **kwargs)
trl/trl/trainer/callbacks.py:189
Methodon_prediction_step
(self, args, state, control, eval_dataloader=None, **kwargs)
trl/trl/trainer/callbacks.py:175
Methodon_step_begin
(self, args, state, control, model=None, **kwargs)
blip3o/train/blip3o_trainer.py:257
Methodon_step_end
(self, args, state, control, **kwargs)
trl/examples/research_projects/stack_llama/scripts/reward_modeling.py:314
Methodon_step_end
(self, args, state, control, **kwargs)
trl/trl/trainer/callbacks.py:170
Methodon_step_end
(self, args, state, control, **kwargs)
trl/trl/trainer/callbacks.py:465
Methodon_train_begin
(self, args, state, control, **kwargs)
trl/trl/trainer/callbacks.py:155
Methodon_train_end
(self, args, state, control, **kwargs)
trl/trl/trainer/callbacks.py:200
Methodpack_tensor
(activation: torch.Tensor)
trl/trl/models/activation_offloading.py:130
Methodpil_to_base64
(image)
trl/trl/extras/vllm_client.py:217
Methodpost_init
r""" We add the state dictionary of the value head to the state dictionary of the wrapped model by prepending the key with `v_head.`.
trl/trl/models/modeling_value_head.py:220
Methodpost_init
r""" We add the state dictionary of the value head to the state dictionary of the wrapped model by prepending the key with `v_head.`.
trl/trl/models/modeling_value_head.py:307
Methodprediction_step
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/kto_trainer.py:1537
Methodprediction_step
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/orpo_trainer.py:892
Methodprediction_step
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/bco_trainer.py:1344
Methodprediction_step
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/dpo_trainer.py:1804
Methodprediction_step
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/cpo_trainer.py:913
Methodprediction_step
(self, model, inputs, prediction_loss_only, ignore_keys: Optional[list[str]] = None)
trl/trl/trainer/grpo_trainer.py:2014
Functionprepare_deepspeed
Prepares the model for DeepSpeed inference or evaluation by initializing it with the appropriate configuration. Adapted from accelerate: http
trl/trl/models/utils.py:332
Methodprepare_inputs_for_generation
(self, input_ids, past_key_values=None, inputs_embeds=None, **kwargs)
blip3o/model/language_model/blip3o_qwen.py:182
Methodprepare_inputs_for_generation
(self, input_ids, past_key_values=None, inputs_embeds=None, **kwargs)
blip3o/model/language_model/blip3o_qwen_grpo.py:110
Methodprepare_inputs_for_generation
(self, *args, **kwargs)
trl/trl/models/modeling_base.py:710
Functionpreprocess_function
(examples)
trl/examples/research_projects/stack_llama/scripts/reward_modeling.py:187
Functionpreprocess_function
(examples)
trl/examples/research_projects/stack_llama/scripts/rl_training.py:139
Functionprint_trainable_parameters
Prints the number of trainable parameters in the model.
trl/examples/research_projects/stack_llama_2/scripts/sft_llama2.py:96
Functionprocess_batch
(examples)
trl/examples/datasets/prm800k.py:90
Functionprocess_example
(example)
trl/examples/datasets/math_shepherd.py:53
Functionprocess_images
(images, image_processor, model_cfg)
blip3o/mm_utils.py:7
Methodprocess_row
Same as `tokenize_row` but for vision models. Please refer to `tokenize_row` for more information.
trl/trl/trainer/dpo_trainer.py:729
Functionprofiling_decorator
Decorator to profile a function and log execution time using [`extras.profiling.profiling_context`]. Args: func (`callable`):
trl/trl/extras/profiling.py:71
Functionprompt_fn
()
trl/examples/scripts/ddpo.py:190
Functionprompt_fn
()
trl/examples/scripts/alignprop.py:115
Methodpush_to_hub
(self, *args, **kwargs)
trl/trl/models/modeling_value_head.py:377
Functionrank_print
(*args)
blip3o/utils.py:11
Functionregister
(name)
tok/models.py:9
Functionremove_none_values
Recursively removes entries with `None` values from a nested structure (list or dictionary). Args: example (`list` or `Mapping`):
trl/trl/trainer/sft_trainer.py:71
Methodrepeat_generator
()
trl/trl/trainer/rloo_trainer.py:256
Methodrepeat_generator
()
trl/trl/trainer/ppo_trainer.py:358
Methodreset_caches
(self)
tok/ar_dtok/ar_model.py:387
Functionreset_prefix_cache
Resets the prefix cache for the model.
trl/trl/scripts/vllm_serve.py:605
Functionreturn_prompt_and_responses
(samples)
trl/examples/research_projects/stack_llama_2/scripts/dpo_llama2.py:129
Functionreward_len
(completions, **kwargs)
trl/train_grpo.py:17
Functionsamples_not_all_same
(example)
trl/examples/datasets/lm-human-preferences-descriptiveness.py:52
Methodsave_checkpoint
(self, models, weights, output_dir)
trl/trl/models/modeling_sd_base.py:892
Methodsave_pretrained
(self, output_dir)
trl/trl/models/modeling_sd_base.py:864
Methodscheduler
Returns the scheduler associated with the pipeline used for the diffusion process
trl/trl/models/modeling_sd_base.py:107
Methodscheduler
(self)
trl/trl/models/modeling_sd_base.py:853
Methodscheduler_step
(self, *args, **kwargs)
trl/trl/models/modeling_sd_base.py:837
Methodset_attn_processor
r""" Sets the attention processor to use to compute attention. Parameters: processor (`dict` of `AttentionProcessor` or o
sana_transformer.py:457
Methodset_device_hook
(module, input, outputs)
trl/trl/models/modeling_value_head.py:251
Methodset_device_hook
r""" A hook that sets the device of the output of the model to the device of the first parameter of the model.
trl/trl/models/modeling_value_head.py:337
Methodset_progress_bar_config
(self, *args, **kwargs)
trl/trl/models/modeling_sd_base.py:870
Methodset_stochastic_temperature
(self, temperature)
tok/ar_dtok/bottleneck.py:106
Methodset_vq_eval_deterministic
(self, deterministic=True)
tok/ta_tok.py:81
Methodshow_text
Print the text history.
trl/trl/environment/base_environment.py:142
Methodshow_tokens
Print the history tokens.
trl/trl/environment/base_environment.py:165
← previousnext →801–900 of 947, ranked by callers