MCPcopy Create free account

hub / github.com/NVlabs/GDPO / functions

Functions2,091 in github.com/NVlabs/GDPO

↓ 6 callersMethodparse_tool_call
Parse request string. Expected format: <request><tool_name>query<call>
trl-GDPO/trl-0.18.0-gdpo/trl/environment/base_environment.py:342
↓ 6 callersFunctionpush_to_hub
(model, tokenizer, prefix=None, suffix=None)
trl-GDPO/trl-0.18.0-gdpo/scripts/generate_tiny_models.py:89
↓ 6 callersFunctionregister_lighteval_task
Registers a LightEval task configuration. - Core tasks can be added from this table: https://github.com/huggingface/lighteval/blob/main/src/light
trl-GDPO/open-r1/src/open_r1/utils/evaluation.py:27
↓ 6 callersMethodreset_prefix_cache
Resets the prefix cache for the model.
trl-GDPO/trl-0.18.0-gdpo/trl/extras/vllm_client.py:289
↓ 6 callersFunctiontag_count_reward
Reward function that checks if we produce the desired number of think and answer tags associated with `format_reward()`. Adapted from: https://gi
trl-GDPO/open-r1/src/open_r1/rewards.py:93
↓ 5 callersMethod__init__
(self, config: LlamaConfig, megatron_config: ModelParallelConfig)
verl-GDPO/verl/models/llama/megatron/modeling_llama_megatron.py:80
↓ 5 callersMethod_generate_samples
Generate samples from the model Args: iterations (int): Number of iterations to generate samples for batch_s
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/ddpo_trainer.py:432
↓ 5 callersFunction_hdfs_cmd
(cmd: str)
verl-GDPO/verl/utils/hdfs_io.py:139
↓ 5 callersFunction_run_cmd
(cmd: str, timeout=None)
verl-GDPO/verl/utils/hdfs_io.py:135
↓ 5 callersFunctionbroadcast_dict_tensor
TODO: optimize this. Technically, we only need one broadcast
verl-GDPO/verl/utils/torch_functional.py:160
↓ 5 callersMethodconcatenated_forward
Runs the given model on the given batch of inputs, concatenating the chosen and rejected inputs together. We do this to avoid doing
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/dpo_trainer.py:1070
↓ 5 callersFunctiondeps_list
(*pkgs)
trl-GDPO/open-r1/setup.py:86
↓ 5 callersMethoddump
(self, data: io.BytesIO, name)
verl-GDPO/verl/utils/debug/trajectory_tracker.py:59
↓ 5 callersMethodevaluate
(self, *args, **kwargs)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/reward_trainer.py:325
↓ 5 callersFunctionexact_div
(a, b, custom_error_message="")
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:842
↓ 5 callersFunctionfirst_true_indices
Takes an N-dimensional bool tensor and returns an (N-1)-dimensional tensor of integers giving the position of the first True in each "row".
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:1163
↓ 5 callersFunctionflush_right
Shift non-zero elements in the mask and corresponding tensors to the right. See `flush_left` for details.
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:1688
↓ 5 callersFunctionforward
Performs a forward pass through the model with the given query responses and pad token ID. Args: model (`torch.nn.Module`):
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:1236
↓ 5 callersFunctionfunc
(*args, **kwargs)
verl-GDPO/verl/single_controller/ray/base.py:38
↓ 5 callersMethodgenerate_completions
(self, sampling: bool = False)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/ppo_trainer.py:686
↓ 5 callersMethodgenerate_on_policy_outputs
(model, inputs, generation_config, pad_token_id=None)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/gkd_trainer.py:256
↓ 5 callersFunctionget_micro_data_parallel_world_size
()
verl-GDPO/verl/workers/sharding_manager/megatron_vllm.py:423
↓ 5 callersFunctionget_model
Build the model.
verl-GDPO/verl/utils/megatron_utils.py:34
↓ 5 callersFunctionget_ulysses_sequence_parallel_world_size
Get ulysses sequence parallel world size.
verl-GDPO/verl/utils/ulysses.py:45
↓ 5 callersMethodinit_communicator
Initializes the weight update group in a distributed setup for model synchronization.
trl-GDPO/trl-0.18.0-gdpo/trl/extras/vllm_client.py:223
↓ 5 callersMethodinit_model
(self)
verl-GDPO/verl/workers/fsdp_workers.py:652
↓ 5 callersFunctionis_liger_kernel_available
(min_version: str = LIGER_KERNEL_MIN_VERSION)
trl-GDPO/trl-0.18.0-gdpo/trl/import_utils.py:55
↓ 5 callersFunctionis_mergekit_available
()
trl-GDPO/trl-0.18.0-gdpo/trl/import_utils.py:63
↓ 5 callersFunctionlen_reward
Compute length-based rewards to discourage overthinking and promote token efficiency. Taken from the Kimi 1.5 tech report: https://huggingface.co
trl-GDPO/open-r1/src/open_r1/rewards.py:132
↓ 5 callersMethodlog
(self, data, step, backend=None)
verl-GDPO/verl/utils/tracking.py:61
↓ 5 callersMethodon_save
(self, args, state, control, model=None, **kwargs)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/callbacks.py:564
↓ 5 callersFunctionrearrange_micro_batches
Split the batch into a list of micro_batches, where the max_token_len is smaller than max_token_len and the number of valid tokens in each micro b
verl-GDPO/verl/utils/seqlen_balancing.py:224
↓ 5 callersMethodscore
Calculates the raw score for the subtask as the minimum score across all test results. Returns: float: The rounded minim
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/ioi_scoring.py:62
↓ 5 callersMethodstep
Step the environment forward one turn. Args: history (`TextHistory`): The history to step forward.
trl-GDPO/trl-0.18.0-gdpo/trl/environment/base_environment.py:305
↓ 5 callersFunctiontruncate_right
Truncates the input tensor from the right side after the first occurrence of the stop token. Args: input_ids (`torch.Tensor`):
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:1451
↓ 5 callersMethodunion
Union with another DataProto. Union batch and meta_info separately. Throw an error if - there are conflict keys in batch and they are
verl-GDPO/verl/protocol.py:423
↓ 5 callersFunctionunwrap_model
(model, module_instances=ALL_MODULE_WRAPPER_CLASSNAMES)
verl-GDPO/verl/utils/megatron_utils.py:122
↓ 5 callersFunctionupdate_model_config
(module_config, override_config_kwargs)
verl-GDPO/verl/utils/model.py:42
↓ 5 callersMethodupdate_model_params
Updates all parameters of the given model by calling `update_named_param` for each parameter in the model. Args: model (
trl-GDPO/trl-0.18.0-gdpo/trl/extras/vllm_client.py:277
↓ 4 callersFunction_broadcast_tensor
broadcast tensor across mp_group
verl-GDPO/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:131
↓ 4 callersFunction_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl-GDPO/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:170
↓ 4 callersFunction_get_cpu_tensor
(tensor: torch.Tensor)
verl-GDPO/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:124
↓ 4 callersFunction_get_gpt_model
(model)
verl-GDPO/verl/models/llama/megatron/checkpoint_utils/llama_loader.py:63
↓ 4 callersFunction_is_non_local
(path: str)
verl-GDPO/verl/utils/hdfs_io.py:143
↓ 4 callersFunction_split_args_kwargs_data_proto
(chunks, *args, **kwargs)
verl-GDPO/verl/single_controller/base/decorator.py:45
↓ 4 callersFunction_win_rate_completions_df
( state: TrainerState, prompts: list[str], completions: list[str], winner_indices: list[str] )
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/callbacks.py:214
↓ 4 callersFunctionaccuracy_reward
Reward function that checks if the completion is the same as the ground truth.
trl-GDPO/open-r1/src/open_r1/rewards.py:40
↓ 4 callersFunctionallgather_dict_tensors
TODO: optimize this. - We can use async ops - We can use only one allgather Args: tensors: size: group:
verl-GDPO/verl/utils/torch_functional.py:169
↓ 4 callersFunctionbuild_memory_reference_from_module
(module: torch.nn.Module, memory_buffers: Dict[torch.dtype, MemoryBuffe
verl-GDPO/verl/utils/memory_buffer.py:97
↓ 4 callersMethodclose_communicator
Closes the weight update group and cleans up the communication group.
trl-GDPO/trl-0.18.0-gdpo/trl/extras/vllm_client.py:298
↓ 4 callersFunctioncollator
(data)
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama/scripts/rl_training.py:168
↓ 4 callersMethodcomplete
Mark the history as completed.
trl-GDPO/trl-0.18.0-gdpo/trl/environment/base_environment.py:116
↓ 4 callersFunctioncompute_accuracy
(eval_pred: EvalPrediction)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:784
↓ 4 callersMethodcompute_log_prob
Compute logits given a batch of data. Args: data (DataProto): a batch of data represented by DataProto. It must contain key ```in
verl-GDPO/verl/workers/actor/base.py:39
↓ 4 callersFunctioncompute_position_id_with_mask
(mask)
verl-GDPO/verl/utils/model.py:177
↓ 4 callersFunctiondecode_and_strip_padding
Decodes the input tensor and strips the padding tokens. Args: inputs (`torch.Tensor`): The input tensor to be decoded.
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:1498
↓ 4 callersFunctionextract_code
(completion: str, language: str | None = "python")
trl-GDPO/open-r1/src/open_r1/rewards.py:476
↓ 4 callersFunctiongather_outpus_and_unpad
(x: Tensor, gather_dim: int, unpad_dim: int = None,
verl-GDPO/verl/utils/ulysses.py:233
↓ 4 callersMethodget_batch_logps
Compute the log probabilities of the given labels under the given logits. Args: logits: Logits of the model (unnormalized). Shape
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/kto_trainer.py:1000
↓ 4 callersFunctionget_fsdp_wrap_policy
(module, config=None)
verl-GDPO/verl/utils/fsdp_utils.py:48
↓ 4 callersFunctionget_init_weight_context_manager
(use_meta_tensor=True)
verl-GDPO/verl/utils/fsdp_utils.py:36
↓ 4 callersFunctionget_micro_data_parallel_group
()
verl-GDPO/verl/workers/sharding_manager/megatron_vllm.py:418
↓ 4 callersMethodget_placement_groups
(self, strategy="STRICT_PACK", name=None)
verl-GDPO/verl/single_controller/ray/base.py:64
↓ 4 callersMethodget_resource_pool
Get the resource pool of the worker_cls
verl-GDPO/verl/trainer/ppo/ray_trainer.py:89
↓ 4 callersFunctionget_soft_overlong_punishment
Reward function that penalizes overlong completions. It is used to penalize overlong completions, but not to reward shorter completions. Refe
trl-GDPO/open-r1/src/open_r1/rewards.py:620
↓ 4 callersFunctionis_llm_blender_available
()
trl-GDPO/trl-0.18.0-gdpo/trl/import_utils.py:59
↓ 4 callersFunctionis_morph_available
()
trl-GDPO/open-r1/src/open_r1/utils/import_utils.py:29
↓ 4 callersFunctionload_megatron_model_weights
(config, model_config, parallel_model,
verl-GDPO/verl/utils/model.py:253
↓ 4 callersFunctionmaybe_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-GDPO/trl-0.18.0-gdpo/trl/data_utils.py:601
↓ 4 callersFunctionmaybe_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-GDPO/trl-0.18.0-gdpo/trl/data_utils.py:349
↓ 4 callersFunctionoffload_fsdp_optimizer
(optimizer)
verl-GDPO/verl/utils/fsdp_utils.py:113
↓ 4 callersFunctionprint_model_size
(model: nn.Module, name: str = None)
verl-GDPO/verl/utils/model.py:129
↓ 4 callersMethodprint_red
(self, text)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/chat.py:272
↓ 4 callersFunctionprofiling_context
A context manager function for profiling a block of code. Results are logged to Weights & Biases or MLflow depending on the trainer's configu
trl-GDPO/trl-0.18.0-gdpo/trl/extras/profiling.py:32
↓ 4 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
verl-GDPO/verl/models/llama/megatron/layers/parallel_attention.py:131
↓ 4 callersFunctionrotate_half
Rotates half the hidden dims of the input.
verl-GDPO/verl/models/llama/megatron/layers/parallel_attention.py:116
↓ 4 callersFunctionshuffle_tensor_dict
Shuffles a dictionary of tensors along the first dimension in unison. Example: >>> x = torch.arange(6).reshape(3, 2) >>> y =
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/grpo_trainer.py:243
↓ 4 callersMethodtext_encoder
Returns the text encoder used for encoding text inputs
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_sd_base.py:114
↓ 4 callersMethodto_dict
(self)
verl-GDPO/verl/single_controller/base/worker.py:78
↓ 4 callersFunctiontruncate_dataset
r""" Truncate sequences in a dataset to a specifed `max_length`. Args: dataset (`Dataset` or `DatasetDict`): Dataset to t
trl-GDPO/trl-0.18.0-gdpo/trl/data_utils.py:537
↓ 4 callersFunctiontruncate_response
Truncates the responses at the first occurrence of the stop token, filling the rest with pad tokens. Args: stop_token_id (`int`):
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:1322
↓ 4 callersFunctionulysses_pad_and_slice_inputs
Pad and slice input_ids to be divisible by sp_size Pad position_ids to be divisible by sp_size. Note both input_ids_rmpad and position_i
verl-GDPO/verl/utils/ulysses.py:252
↓ 4 callersMethodunet
Returns the 2d U-Net model used for diffusion.
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_sd_base.py:86
↓ 4 callersMethodupdate_named_param
Updates a specific named parameter in the model and broadcasts it to other processes. Args: name (`str`):
trl-GDPO/trl-0.18.0-gdpo/trl/extras/vllm_client.py:257
↓ 3 callersMethod__init__
(self)
verl-GDPO/verl/single_controller/ray/base.py:442
↓ 3 callersMethod__init__
(self, dim, max_position_embeddings=2048, base=10000, device=None)
verl-GDPO/verl/models/llama/megatron/layers/parallel_attention.py:37
↓ 3 callersFunction_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl-GDPO/verl/models/llama/megatron/checkpoint_utils/llama_loader.py:178
↓ 3 callersMethod_build_param_references
(self, pp_rank, maintain_weight=False)
verl-GDPO/verl/workers/sharding_manager/megatron_vllm.py:88
↓ 3 callersMethod_compute_kl_logps
Compute KL log probabilities for a given batch.
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/kto_trainer.py:1162
↓ 3 callersFunction_concat_data_proto_or_future
(output: List)
verl-GDPO/verl/single_controller/base/decorator.py:129
↓ 3 callersMethod_forward
(self, model, prompt_ids, prompt_mask, completion_ids, completion_mask)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/online_dpo_trainer.py:495
↓ 3 callersMethod_generate_batched
Generate responses for a list of query tensors. Args: query_tensors (list[torch.Tensor]): A list of query tensors to gen
trl-GDPO/trl-0.18.0-gdpo/trl/environment/base_environment.py:424
↓ 3 callersFunction_generate_completions
Generates completions for a list of pre-formatted prompts from the given model. Args: prompts (list[str]): A list of input prompts f
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/callbacks.py:54
↓ 3 callersMethod_get_current_device
r""" Get the current device. For GPU, we return the local process index using the `accelerate.PartialState` object to handle corner ca
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_base.py:395
↓ 3 callersFunction_get_gpt_model
(model)
verl-GDPO/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:93
↓ 3 callersMethod_get_prompts_and_pairwise_completions
(self)
trl-GDPO/trl-0.18.0-gdpo/tests/test_judges.py:24
↓ 3 callersFunction_left_broadcast
As opposed to the default direction of broadcasting (right to left), this function broadcasts from left to right Args: in
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_sd_base.py:158
↓ 3 callersMethod_prepare_dataset
( self, dataset: Union[Dataset, IterableDataset], processing_class: Union[PreTrainedTo
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/dpo_trainer.py:526
↓ 3 callersMethod_prepare_dataset
( self, dataset: Union[Dataset, IterableDataset], processing_class: Union[PreTrainedTo
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/sft_trainer.py:510
↓ 3 callersMethod_send_to_all
(self, route, data=None, method="post")
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/piston_client.py:107
← previousnext →101–200 of 2,091, ranked by callers