MCPcopy Create free account

hub / github.com/NVlabs/GDPO / functions

Functions2,091 in github.com/NVlabs/GDPO

↓ 1 callersFunction_make_causal_mask
Make causal mask used for bi-directional self-attention.
verl-GDPO/verl/utils/torch_functional.py:456
↓ 1 callersFunction_make_causal_mask
Make causal mask used for bi-directional self-attention.
verl-GDPO/verl/models/llama/megatron/modeling_llama_megatron.py:45
↓ 1 callersFunction_materialize_futures
(*args, **kwargs)
verl-GDPO/verl/single_controller/base/decorator.py:379
↓ 1 callersMethod_maybe_log_save_evaluate
(self)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/iterative_sft_trainer.py:432
↓ 1 callersFunction_megatron_calc_layer_map
Calculate the mapping of global layer_idx to local layer_idx Returns: layer_map (Dict: int -> tuple(int, int, int)): mapping f
verl-GDPO/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:45
↓ 1 callersFunction_megatron_calc_layer_map
Calculate the mapping of global layer_idx to local layer_idx Returns: layer_map (Dict: int -> tuple(int, int, int)): mapping f
verl-GDPO/verl/models/llama/megatron/checkpoint_utils/llama_loader.py:21
↓ 1 callersFunction_mkdir
hdfs mkdir
verl-GDPO/verl/utils/hdfs_io.py:75
↓ 1 callersMethod_move_model_to_vllm
(self)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/grpo_trainer.py:909
↓ 1 callersMethod_normalize_config_bsz
(self)
verl-GDPO/verl/trainer/fsdp_sft_trainer.py:81
↓ 1 callersMethod_optimizer_step
(self)
verl-GDPO/verl/workers/critic/dp_critic.py:103
↓ 1 callersMethod_optimizer_step
(self)
verl-GDPO/verl/workers/actor/dp_actor.py:143
↓ 1 callersMethod_post_process_params
For each param, if it is a tp-splited param, we all-gather from micro_dp group.
verl-GDPO/verl/workers/sharding_manager/megatron_vllm.py:318
↓ 1 callersFunction_pre_process_inputs
(pad_token_id, prompt_token_ids: torch.Tensor)
verl-GDPO/verl/workers/rollout/vllm_rollout/vllm_rollout.py:49
↓ 1 callersMethod_prepare_decoder_attention_mask
(self, attention_mask, input_shape, inputs_embeds)
verl-GDPO/verl/models/llama/megatron/modeling_llama_megatron.py:97
↓ 1 callersMethod_prepare_files
Process files, determine problem ID, and prepare configuration. Args: data: Dictionary containing file information
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/morph_client.py:82
↓ 1 callersMethod_prepare_model_for_kbit_training
Prepares a quantized model for kbit training.
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/sft_trainer.py:482
↓ 1 callersMethod_prepare_peft_model
Prepares a model for PEFT training.
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/sft_trainer.py:433
↓ 1 callersMethod_process_completions
(self, model_output, ref_output, prompts)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/xpo_trainer.py:209
↓ 1 callersMethod_process_completions
(self, model_output, mixture_output, prompts)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/nash_md_trainer.py:224
↓ 1 callersMethod_read_files_and_tokenize
(self)
verl-GDPO/verl/utils/dataset/rm_dataset.py:85
↓ 1 callersMethod_read_files_and_tokenize
(self)
verl-GDPO/verl/utils/dataset/sft_dataset.py:73
↓ 1 callersMethod_read_files_and_tokenize
(self)
verl-GDPO/verl/utils/dataset/rl_dataset.py:99
↓ 1 callersMethod_run_async
(self, scripts: List[str], languages: List[str], num_parallel: int)
trl-GDPO/open-r1/src/open_r1/utils/code_providers.py:125
↓ 1 callersMethod_run_async
Run multiple scripts concurrently with limited parallelism. Args: scripts: List of scripts to execute language: Progr
trl-GDPO/open-r1/src/open_r1/utils/code_providers.py:253
↓ 1 callersMethod_run_async_from_sync
Function wrapping the `_run_async` function.
trl-GDPO/open-r1/src/open_r1/utils/code_providers.py:115
↓ 1 callersMethod_run_script
(self, script: str, languages: List[str], semaphore: asyncio.Semaphore)
trl-GDPO/open-r1/src/open_r1/utils/code_providers.py:135
↓ 1 callersMethod_run_script
Execute a single script in a MorphCloud Sandbox. Args: script: The script to execute language: Programming language
trl-GDPO/open-r1/src/open_r1/utils/code_providers.py:273
↓ 1 callersMethod_run_tests
Run tests and evaluate results. Args: instance: The MorphCloud instance data: Dictionary containing runtime
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/morph_client.py:186
↓ 1 callersFunction_select_rm_score_fn
(data_source)
verl-GDPO/verl/trainer/main_ppo.py:24
↓ 1 callersMethod_setup_optimizer
(self, trainable_layers_parameters)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/ddpo_trainer.py:408
↓ 1 callersMethod_setup_optimizer
(self, trainable_layers_parameters)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/alignprop_trainer.py:297
↓ 1 callersMethod_shift_right
(self, input_ids)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/orpo_trainer.py:987
↓ 1 callersMethod_shift_right
(self, input_ids)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/cpo_trainer.py:1007
↓ 1 callersMethod_step_safety_checker
Check if the input data is valid for training. Args: input_ids (list[`torch.LongTensor`]): List of tenso
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/iterative_sft_trainer.py:260
↓ 1 callersMethod_switch_chat_template
(self, data: DataProto)
verl-GDPO/verl/workers/fsdp_workers.py:926
↓ 1 callersMethod_train_batched_samples
Train on a batch of samples. Main training segment Args: inner_epoch (int): The current inner epoch epoch (i
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/ddpo_trainer.py:494
↓ 1 callersFunction_transform_params_to_json_serializable
(x, convert_list_to_dict: bool)
verl-GDPO/verl/utils/tracking.py:81
↓ 1 callersMethod_upload_files
Upload all necessary files to the instance. Args: instance: The MorphCloud instance local_files: Dictionary
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/morph_client.py:139
↓ 1 callersMethod_wait_for_endpoint
(self)
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/piston_client.py:94
↓ 1 callersMethodadd_and_load_reward_modeling_adapter
r""" Add and load a reward modeling adapter. This method can only be used if the model is a `PeftModel` and if you have initialized th
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_base.py:444
↓ 1 callersFunctionadd_hooks
Adds the optimizer hooks from a DeepSpeed ZeRO-3 model.
trl-GDPO/trl-0.18.0-gdpo/trl/models/utils.py:166
↓ 1 callersFunctionadd_includes
Fix common compilation errors for IOI problems.
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/ioi_utils.py:7
↓ 1 callersFunctionaesthetic_scorer
(hub_model_id, model_filename)
trl-GDPO/trl-0.18.0-gdpo/examples/scripts/ddpo.py:131
↓ 1 callersFunctionaesthetic_scorer
(hub_model_id, model_filename)
trl-GDPO/trl-0.18.0-gdpo/trl/models/auxiliary_modules.py:78
↓ 1 callersFunctionall_gather_tensor
(local_tensor: Tensor, group: Optional[dist.ProcessGroup] = None, async_op: bool = False)
verl-GDPO/verl/utils/ulysses.py:154
↓ 1 callersFunctionapply_kl_penalty
(data: DataProto, kl_ctrl: core_algos.AdaptiveKLController, kl_penalty='kl')
verl-GDPO/verl/trainer/ppo/ray_trainer.py:99
↓ 1 callersFunctionapply_rotary_pos_emb_rmpad_flash
(q, k, cos, sin, cu_seqlens, max_seqlen)
verl-GDPO/verl/models/llama/megatron/layers/parallel_attention.py:320
↓ 1 callersMethodbco_loss
Compute the BCO loss for a batch of policy and reference model log probabilities. Args: policy_chosen_logps: Log probabilities of
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/bco_trainer.py:1108
↓ 1 callersFunctionbroadcast_params
(module)
verl-GDPO/verl/models/llama/megatron/checkpoint_utils/llama_loader.py:66
↓ 1 callersFunctionbuild_dataset
Build dataset for training. This builds the dataset from `load_dataset`, one should customize this function to train the model on its own dat
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/toxicity/scripts/gpt-j-6b-toxicity.py:99
↓ 1 callersFunctionbuild_dataset
Build dataset for training. This builds the dataset from `load_dataset`, one should customize this function to train the model on its own dat
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama/scripts/rl_training.py:120
↓ 1 callersFunctionbuild_distilabel_pipeline
( model: str, base_url: str = "http://localhost:8000/v1", prompt_column: Optional[str] = None,
trl-GDPO/open-r1/src/open_r1/generate.py:23
↓ 1 callersFunctionbuild_memory_reference
Build the memory references. The memory buffers are built using the build_memory_buffer API. This API will allocate a weight buffer pointer to the
verl-GDPO/verl/utils/memory_buffer.py:113
↓ 1 callersFunctionbuild_ngram_lookup
Build ngram lookup for documents.
trl-GDPO/open-r1/scripts/decontaminate.py:51
↓ 1 callersFunctionbuild_ngram_single
(document: str, ngram_size: int = 8)
trl-GDPO/open-r1/scripts/decontaminate.py:64
↓ 1 callersMethodcalculate_loss
Calculate the loss for a batch of an unpacked sample Args: rewards (torch.Tensor): Differentiable reward
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/alignprop_trainer.py:267
↓ 1 callersFunctionceildiv
(a, b)
verl-GDPO/verl/utils/seqlen_balancing.py:220
↓ 1 callersFunctionchars_token_ratio
Estimate the average number of characters per token in the dataset.
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama/scripts/supervised_finetuning.py:68
↓ 1 callersFunctionchars_token_ratio
Estimate the average number of characters per token in the dataset.
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama_2/scripts/sft_llama2.py:80
↓ 1 callersFunctioncheck_and_add_copyright
Check if the file contains a copyright notice, and add it if missing.
trl-GDPO/trl-0.18.0-gdpo/scripts/add_copyrights.py:52
↓ 1 callersMethodcheck_consistency
Check the consistency of the DataProto. Mainly for batch and non_tensor_batch We expose this function as a public one so that user can call th
verl-GDPO/verl/protocol.py:242
↓ 1 callersMethodcheck_server
Check server availability with retries on failure, within a total timeout duration. If the server is not up after the total timeout d
trl-GDPO/trl-0.18.0-gdpo/trl/extras/vllm_client.py:128
↓ 1 callersFunctioncleanup
(dataset: Dataset)
trl-GDPO/open-r1/scripts/decontaminate.py:127
↓ 1 callersMethodcollator
(data)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/iterative_sft_trainer.py:385
↓ 1 callersFunctioncollect_dp_compute
(worker_group, output)
verl-GDPO/verl/single_controller/base/decorator.py:265
↓ 1 callersFunctioncollect_megatron_compute
Only collect the data from the tp=0 and pp=last and every dp ranks
verl-GDPO/verl/single_controller/base/decorator.py:103
↓ 1 callersFunctioncollect_megatron_pp_as_dp
treat pp as dp. Only collect data on tp=0
verl-GDPO/verl/single_controller/base/decorator.py:209
↓ 1 callersFunctioncommon_start
(str1: str, str2: str)
trl-GDPO/trl-0.18.0-gdpo/examples/datasets/hh-rlhf-helpful-base.py:50
↓ 1 callersFunctioncompute_advantage
(data: DataProto, adv_estimator, gamma=1.0, lam=1.0, num_repeat=1)
verl-GDPO/verl/trainer/ppo/ray_trainer.py:131
↓ 1 callersFunctioncompute_data_metrics
(batch, use_critic=True)
verl-GDPO/verl/trainer/ppo/ray_trainer.py:232
↓ 1 callersMethodcompute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/kto_trainer.py:1439
↓ 1 callersMethodcompute_loss
(self, model, inputs, return_outputs=False, num_items_in_batch=None)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/grpo_trainer.py:1387
↓ 1 callersMethodcompute_ref_log_prob
(self, data: DataProto)
verl-GDPO/verl/workers/fsdp_workers.py:449
↓ 1 callersMethodcompute_reward
Computing reward given input_ids. The transformers should output a tensor with shape [batch_size, sequence_length], and the value at [EOS]
verl-GDPO/verl/workers/reward_model/base.py:29
↓ 1 callersMethodcompute_rewards
(self, prompt_image_pairs)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/alignprop_trainer.py:188
↓ 1 callersMethodcompute_rm_score
(self, data: DataProto)
verl-GDPO/verl/workers/fsdp_workers.py:984
↓ 1 callersFunctioncompute_timing_metrics
(batch, timing_raw)
verl-GDPO/verl/trainer/ppo/ray_trainer.py:347
↓ 1 callersFunctioncompute_tool_call_reward
(gt_tools, pd_tools, max_possible_reward, min_possible_reward)
verl-GDPO/verl/utils/reward_score/rlla.py:131
↓ 1 callersMethodcompute_values
(self, data: DataProto)
verl-GDPO/verl/workers/fsdp_workers.py:674
↓ 1 callersFunctionconcat_dict_to_str
(dict: Dict, step)
verl-GDPO/verl/utils/logger/aggregate_logger.py:21
↓ 1 callersMethodconcatenated_forward
Run the given model on the given batch of inputs, concatenating the chosen and rejected inputs together. We do this to avoid doing two forwar
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/orpo_trainer.py:692
↓ 1 callersMethodconcatenated_forward
Run the given model on the given batch of inputs, concatenating the chosen and rejected inputs together. We do this to avoid doing two forwar
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/cpo_trainer.py:727
↓ 1 callersMethodconcatenated_inputs
Concatenate the chosen and rejected inputs into a single tensor. Args: batch: A batch of data. Must contain the keys 'chosen_inpu
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/orpo_trainer.py:562
↓ 1 callersMethodconcatenated_inputs
Concatenate the `chosen` and `rejected` inputs from the batch into a single tensor for both the prompt and completion sequences.
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/dpo_trainer.py:814
↓ 1 callersMethodconcatenated_inputs
Concatenate the chosen and rejected inputs into a single tensor. Args: batch: A batch of data. Must contain the keys 'chosen_inpu
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/cpo_trainer.py:577
↓ 1 callersFunctionconvert_state_dict
r""" Simply iterates over the state dict and replaces the patterns in `mapping` with the corresponding values. Args: state_dict (`dic
trl-GDPO/trl-0.18.0-gdpo/trl/models/sd_utils.py:73
↓ 1 callersFunctioncount_tags
(text: str)
trl-GDPO/open-r1/src/open_r1/rewards.py:99
↓ 1 callersMethodcpo_loss
Compute the CPO loss for a batch of policy and reference model log probabilities. Args: policy_chosen_logps: Log probabilities of
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/cpo_trainer.py:638
↓ 1 callersFunctioncreate_app
Creates and configures a FastAPI application instance. Args: args: An object containing configuration parameters for the application.
trl-GDPO/open-r1/scripts/e2b_router.py:66
↓ 1 callersFunctioncreate_app
Creates and configures a FastAPI application instance for the MorphCloud router. Args: args: An object containing configuration
trl-GDPO/open-r1/scripts/morph_router.py:59
↓ 1 callersFunctioncreate_colocated_worker_cls
This function should return a class instance that delegates the calls to every cls in cls_dict
verl-GDPO/verl/single_controller/ray/base.py:420
↓ 1 callersFunctioncreate_datasets
(tokenizer, args)
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama/scripts/supervised_finetuning.py:105
↓ 1 callersFunctioncreate_datasets
(tokenizer, args, seed=None)
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama_2/scripts/sft_llama2.py:117
↓ 1 callersFunctioncreate_default_filename
(model_name)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/chat.py:285
↓ 1 callersFunctioncreate_huggingface_actor
Args: model_name: actor_override_config_kwargs: Returns:
verl-GDPO/verl/utils/model.py:58
↓ 1 callersMethodcreate_merge_config_dare_ties
Creates a merge configuration for a DARE TIES merge of two models, with specified weights and densities.
trl-GDPO/trl-0.18.0-gdpo/trl/mergekit_utils.py:170
↓ 1 callersMethodcreate_merge_config_linear
Creates a merge configuration for a linear merge of two models with specified weights.
trl-GDPO/trl-0.18.0-gdpo/trl/mergekit_utils.py:107
↓ 1 callersMethodcreate_merge_config_slerp
Creates a merge configuration for a SLERP merge of a model with a base model.
trl-GDPO/trl-0.18.0-gdpo/trl/mergekit_utils.py:214
↓ 1 callersMethodcreate_merge_config_ties
Creates a merge configuration for a TIES merge of two models, with specified weights and densities.
trl-GDPO/trl-0.18.0-gdpo/trl/mergekit_utils.py:126
↓ 1 callersMethodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/ddpo_trainer.py:596
← previousnext →501–600 of 2,091, ranked by callers