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
Function
image_outputs_logger
(image_data, global_step, accelerate_logger)
trl/examples/scripts/ddpo.py:194
Function
image_outputs_logger
(image_pair_data, global_step, accelerate_logger)
trl/examples/scripts/alignprop.py:119
Function
init_communicator
Initializes the communicator for synchronizing model weights between a client and multiple server workers. Args: request
trl/trl/scripts/vllm_serve.py:550
Method
init_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
Function
init_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
Function
is_unsloth_available
()
trl/trl/import_utils.py:75
Method
judge
Judge the completion for the given prompts and return the ranks of each completion. Args: prompts (`list[str]`):
trl/trl/trainer/judges.py:94
Method
judge
Judge the completion pairs for the given prompts. Args: prompts (`list[str]`): List of prompts.
trl/trl/trainer/judges.py:121
Method
judge
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
Method
judge
Judge the completion pairs for the given prompts using the PairRM model. Args: prompts (`list[str]`): Li
trl/trl/trainer/judges.py:222
Method
judge
(self, prompts: list[str], completions: list[list[str]], shuffle_order: bool = True)
trl/trl/trainer/judges.py:316
Method
judge
(self, prompts: list[str], completions: list[list[str]], shuffle_order: bool = True)
trl/trl/trainer/judges.py:375
Method
judge
( self, prompts: list[str], completions: list[str], gold_completions: Optional
trl/trl/trainer/judges.py:434
Method
last_layer
(self)
tok/ar_dtok/vqvae.py:207
Method
last_text_segment
Get the last text segment.
trl/trl/environment/base_environment.py:124
Method
lengths
(self)
blip3o/data/dataset.py:254
Function
lifespan
(app: FastAPI)
trl/trl/scripts/vllm_serve.py:397
Function
llm_worker
( script_args: ScriptArguments, data_parallel_rank: int, master_port: int, connection: Connection )
trl/trl/scripts/vllm_serve.py:297
Method
load_checkpoint
(self, models, input_dir)
trl/trl/models/modeling_sd_base.py:903
Function
load_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
Method
log
(self, logs: dict[str, float], start_time: Optional[float] = None)
trl/trl/trainer/sft_trainer.py:916
Method
log
(self, logs: dict[str, float], start_time: Optional[float] = None)
trl/trl/trainer/grpo_trainer.py:2022
Function
logits_to_probs
(logits, temperature: float = 1.0, top_p: float=1.0, top_k: int = None, **kwargs)
tok/ar_dtok/generate.py:69
Method
loss
( self, advantages: torch.Tensor, clip_range: float, ratio: torch.Tensor,
trl/trl/trainer/alignprop_trainer.py:288
Function
make
(model_spec, args=None, load_sd=False)
tok/models.py:16
Function
make_conversation
(example)
trl/examples/scripts/grpo_vlm.py:115
Function
make_inputs_require_grad
(module, input, output)
blip3o/train/train.py:156
Method
make_inputs_require_grad
(module, input, output)
trl/trl/trainer/kto_trainer.py:427
Method
make_inputs_require_grad
(module, input, output)
trl/trl/trainer/orpo_trainer.py:187
Method
make_inputs_require_grad
(module, input, output)
trl/trl/trainer/bco_trainer.py:442
Method
make_inputs_require_grad
(module, input, output)
trl/trl/trainer/dpo_trainer.py:607
Method
make_inputs_require_grad
(module, input, output)
trl/trl/trainer/cpo_trainer.py:183
Method
make_inputs_require_grad
(module, input, output)
trl/trl/trainer/sft_trainer.py:653
Method
mask_drop
(self, latents, drop_prob=0.1)
blip3o/model/language_model/blip3o_qwen_grpo.py:77
Method
masked_batch_mean
(x)
trl/trl/trainer/grpo_trainer.py:1982
Method
match_underlying_distribution
(self)
trl/trl/trainer/bco_trainer.py:742
Function
maybe_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
Function
maybe_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
Method
mixture_coef
(self)
trl/trl/trainer/nash_md_trainer.py:171
Method
modality_lengths
(self)
blip3o/data/dataset.py:262
Method
noop
(tensor)
trl/trl/models/activation_offloading.py:339
Method
on_evaluate
(self, args, state, control, **kwargs)
trl/trl/trainer/callbacks.py:183
Method
on_evaluate
(self, args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs)
trl/trl/trainer/callbacks.py:356
Method
on_log
(self, args, state, control, logs=None, **kwargs)
trl/trl/trainer/callbacks.py:195
Method
on_predict
(self, args, state, control, **kwargs)
trl/trl/trainer/callbacks.py:189
Method
on_prediction_step
(self, args, state, control, eval_dataloader=None, **kwargs)
trl/trl/trainer/callbacks.py:175
Method
on_step_begin
(self, args, state, control, model=None, **kwargs)
blip3o/train/blip3o_trainer.py:257
Method
on_step_end
(self, args, state, control, **kwargs)
trl/examples/research_projects/stack_llama/scripts/reward_modeling.py:314
Method
on_step_end
(self, args, state, control, **kwargs)
trl/trl/trainer/callbacks.py:170
Method
on_step_end
(self, args, state, control, **kwargs)
trl/trl/trainer/callbacks.py:465
Method
on_train_begin
(self, args, state, control, **kwargs)
trl/trl/trainer/callbacks.py:155
Method
on_train_end
(self, args, state, control, **kwargs)
trl/trl/trainer/callbacks.py:200
Method
pack_tensor
(activation: torch.Tensor)
trl/trl/models/activation_offloading.py:130
Method
pil_to_base64
(image)
trl/trl/extras/vllm_client.py:217
Method
post_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
Method
post_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
Method
prediction_step
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/kto_trainer.py:1537
Method
prediction_step
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/orpo_trainer.py:892
Method
prediction_step
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/bco_trainer.py:1344
Method
prediction_step
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/dpo_trainer.py:1804
Method
prediction_step
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl/trl/trainer/cpo_trainer.py:913
Method
prediction_step
(self, model, inputs, prediction_loss_only, ignore_keys: Optional[list[str]] = None)
trl/trl/trainer/grpo_trainer.py:2014
Function
prepare_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
Method
prepare_inputs_for_generation
(self, input_ids, past_key_values=None, inputs_embeds=None, **kwargs)
blip3o/model/language_model/blip3o_qwen.py:182
Method
prepare_inputs_for_generation
(self, input_ids, past_key_values=None, inputs_embeds=None, **kwargs)
blip3o/model/language_model/blip3o_qwen_grpo.py:110
Method
prepare_inputs_for_generation
(self, *args, **kwargs)
trl/trl/models/modeling_base.py:710
Function
preprocess_function
(examples)
trl/examples/research_projects/stack_llama/scripts/reward_modeling.py:187
Function
preprocess_function
(examples)
trl/examples/research_projects/stack_llama/scripts/rl_training.py:139
Function
print_trainable_parameters
Prints the number of trainable parameters in the model.
trl/examples/research_projects/stack_llama_2/scripts/sft_llama2.py:96
Function
process_batch
(examples)
trl/examples/datasets/prm800k.py:90
Function
process_example
(example)
trl/examples/datasets/math_shepherd.py:53
Function
process_images
(images, image_processor, model_cfg)
blip3o/mm_utils.py:7
Method
process_row
Same as `tokenize_row` but for vision models. Please refer to `tokenize_row` for more information.
trl/trl/trainer/dpo_trainer.py:729
Function
profiling_decorator
Decorator to profile a function and log execution time using [`extras.profiling.profiling_context`]. Args: func (`callable`):
trl/trl/extras/profiling.py:71
Function
prompt_fn
()
trl/examples/scripts/ddpo.py:190
Function
prompt_fn
()
trl/examples/scripts/alignprop.py:115
Method
push_to_hub
(self, *args, **kwargs)
trl/trl/models/modeling_value_head.py:377
Function
rank_print
(*args)
blip3o/utils.py:11
Function
register
(name)
tok/models.py:9
Function
remove_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
Method
repeat_generator
()
trl/trl/trainer/rloo_trainer.py:256
Method
repeat_generator
()
trl/trl/trainer/ppo_trainer.py:358
Method
reset_caches
(self)
tok/ar_dtok/ar_model.py:387
Function
reset_prefix_cache
Resets the prefix cache for the model.
trl/trl/scripts/vllm_serve.py:605
Function
return_prompt_and_responses
(samples)
trl/examples/research_projects/stack_llama_2/scripts/dpo_llama2.py:129
Function
reward_len
(completions, **kwargs)
trl/train_grpo.py:17
Function
samples_not_all_same
(example)
trl/examples/datasets/lm-human-preferences-descriptiveness.py:52
Method
save_checkpoint
(self, models, weights, output_dir)
trl/trl/models/modeling_sd_base.py:892
Method
save_pretrained
(self, output_dir)
trl/trl/models/modeling_sd_base.py:864
Method
scheduler
Returns the scheduler associated with the pipeline used for the diffusion process
trl/trl/models/modeling_sd_base.py:107
Method
scheduler
(self)
trl/trl/models/modeling_sd_base.py:853
Method
scheduler_step
(self, *args, **kwargs)
trl/trl/models/modeling_sd_base.py:837
Method
set_attn_processor
r""" Sets the attention processor to use to compute attention. Parameters: processor (`dict` of `AttentionProcessor` or o
sana_transformer.py:457
Method
set_device_hook
(module, input, outputs)
trl/trl/models/modeling_value_head.py:251
Method
set_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
Method
set_progress_bar_config
(self, *args, **kwargs)
trl/trl/models/modeling_sd_base.py:870
Method
set_stochastic_temperature
(self, temperature)
tok/ar_dtok/bottleneck.py:106
Method
set_vq_eval_deterministic
(self, deterministic=True)
tok/ta_tok.py:81
Method
show_text
Print the text history.
trl/trl/environment/base_environment.py:142
Method
show_tokens
Print the history tokens.
trl/trl/environment/base_environment.py:165
← previous
next →
801–900 of 947, ranked by callers