Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NVlabs/GDPO
/ functions
Functions
2,091 in github.com/NVlabs/GDPO
⨍
Functions
2,091
◇
Types & classes
346
↳
Endpoints
46
↓ 1 callers
Function
load_ioi_tests
Load IOI tests for a given year and problem id.
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/ioi_utils.py:37
↓ 1 callers
Function
load_ioi_tests_for_year
Load IOI tests for a given year.
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/ioi_utils.py:26
↓ 1 callers
Function
load_megatron_param_and_grad
(module_list: nn.ModuleList, device_id, load_grad=False, hybrid_engine=None)
verl-GDPO/verl/utils/megatron_utils.py:241
↓ 1 callers
Function
load_model_and_tokenizer
(args)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/chat.py:352
↓ 1 callers
Method
load_model_cls
(model_arch: str, value=False)
verl-GDPO/verl/models/registry.py:49
↓ 1 callers
Method
load_params_to_cuda
(self)
verl-GDPO/verl/workers/reward_model/megatron/reward_model.py:270
↓ 1 callers
Function
load_processed_uuids
(output_file, uuid_column)
trl-GDPO/open-r1/scripts/generate_reasoning.py:91
↓ 1 callers
Method
log
Log `logs` on the various objects watching training, including stored metrics. Args: logs (`dict[str, float]`):
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/orpo_trainer.py:965
↓ 1 callers
Method
log
Log `logs` on the various objects watching training, including stored metrics. Args: logs (`dict[str, float]`):
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/bco_trainer.py:1423
↓ 1 callers
Method
log
Log `logs` on the various objects watching training, including stored metrics. Args: logs (`dict[str, float]`):
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/cpo_trainer.py:985
↓ 1 callers
Function
log_seqlen_unbalance
(seqlen_list: List[int], partitions: List[List[int]], prefix)
verl-GDPO/verl/utils/seqlen_balancing.py:186
↓ 1 callers
Function
logprobs_from_logits_flash_attn
(logits, labels)
verl-GDPO/verl/utils/torch_functional.py:65
↓ 1 callers
Function
logprobs_from_logits_naive
(logits, labels)
verl-GDPO/verl/utils/torch_functional.py:70
↓ 1 callers
Function
main
(config)
verl-GDPO/verl/trainer/main_ppo.py:106
↓ 1 callers
Function
main
(config)
verl-GDPO/verl/trainer/main_generation.py:40
↓ 1 callers
Function
main
(config)
verl-GDPO/verl/trainer/main_eval.py:35
↓ 1 callers
Function
main
(config)
verl-GDPO/verl/trainer/fsdp_sft_trainer.py:360
↓ 1 callers
Function
main
Main function to check and add copyright for all tracked Python files.
trl-GDPO/trl-0.18.0-gdpo/scripts/add_copyrights.py:73
↓ 1 callers
Function
main
(test_size, push_to_hub, repo_id)
trl-GDPO/trl-0.18.0-gdpo/scripts/generate_zen_dataset.py:49
↓ 1 callers
Function
main
(slack_channel_name)
trl-GDPO/trl-0.18.0-gdpo/scripts/log_reports.py:65
↓ 1 callers
Function
main
()
trl-GDPO/trl-0.18.0-gdpo/examples/scripts/sft_vlm_gemma3.py:133
↓ 1 callers
Function
main
()
trl-GDPO/trl-0.18.0-gdpo/examples/scripts/sft_gemma3.py:27
↓ 1 callers
Function
main
(args)
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama/scripts/supervised_finetuning.py:207
↓ 1 callers
Function
main
(script_args, training_args, model_args)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/dpo.py:69
↓ 1 callers
Function
main
(script_args, training_args, model_args)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/sft.py:73
↓ 1 callers
Function
main
(args: ChatArguments)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/chat.py:398
↓ 1 callers
Function
main
(script_args, training_args, model_args)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/kto.py:74
↓ 1 callers
Function
main
(script_args, training_args, model_args)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/grpo.py:64
↓ 1 callers
Function
main
(script_args: ScriptArguments)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/vllm_serve.py:335
↓ 1 callers
Function
main
(script_args, training_args, model_args)
trl-GDPO/open-r1/src/open_r1/sft.py:55
↓ 1 callers
Function
main
(script_args, training_args, model_args)
trl-GDPO/open-r1/src/open_r1/gsm8k.py:134
↓ 1 callers
Function
main
()
trl-GDPO/open-r1/scripts/upload_details.py:40
↓ 1 callers
Function
main
()
trl-GDPO/open-r1/scripts/run_benchmarks.py:39
↓ 1 callers
Function
main
()
trl-GDPO/open-r1/scripts/generate_reasoning.py:104
↓ 1 callers
Function
main
(script_args, training_args, model_args)
trl-GDPO/open-r1/scripts/pass_rate_filtering/compute_pass_rate.py:48
↓ 1 callers
Function
make_parser
(subparsers: argparse._SubParsersAction = None)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/dpo.py:139
↓ 1 callers
Function
make_parser
(subparsers: argparse._SubParsersAction = None)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/sft.py:134
↓ 1 callers
Function
make_parser
(subparsers: argparse._SubParsersAction = None)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/chat.py:504
↓ 1 callers
Function
make_parser
(subparsers: argparse._SubParsersAction = None)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/kto.py:116
↓ 1 callers
Function
make_parser
(subparsers: argparse._SubParsersAction = None)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/grpo.py:120
↓ 1 callers
Function
make_parser
(subparsers: argparse._SubParsersAction = None)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/vllm_serve.py:573
↓ 1 callers
Function
masked_var
Compute variance of tensor with masked values.
verl-GDPO/verl/utils/torch_functional.py:112
↓ 1 callers
Function
masked_whiten
Whiten values with masked values.
verl-GDPO/verl/utils/torch_functional.py:130
↓ 1 callers
Function
mean_pooling
(model_output, attention_mask)
trl-GDPO/trl-0.18.0-gdpo/examples/scripts/bco.py:87
↓ 1 callers
Function
merge_models
Merge two models using mergekit Args: config (`MergeConfig`): The merge configuration. out_path (`str`): The output path for
trl-GDPO/trl-0.18.0-gdpo/trl/mergekit_utils.py:264
↓ 1 callers
Function
nanmax
Compute the maximum value of a tensor, ignoring NaNs. This function only supports 1D tensors. Args: tensor (`torch.Tensor`): Input t
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/grpo_trainer.py:280
↓ 1 callers
Function
nanmin
Compute the minimum value of a tensor, ignoring NaNs. This function only supports 1D tensors. Args: tensor (`torch.Tensor`): Input t
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/grpo_trainer.py:265
↓ 1 callers
Function
nanstd
Compute the standard deviation of a tensor, ignoring NaNs. This function only supports 1D tensors. Args: tensor (`torch.Tensor`):
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/grpo_trainer.py:197
↓ 1 callers
Function
normalize_model_name
Transform the model name in each model_chunk in each pp stage into the name in inference engine
verl-GDPO/verl/utils/model.py:192
↓ 1 callers
Method
null_ref_context
Context manager for handling null reference model (that is, peft adapter manipulation).
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/ppo_trainer.py:318
↓ 1 callers
Method
odds_ratio_loss
Compute ORPO's odds ratio (OR) loss for a batch of policy and reference model log probabilities. Args: policy_chosen_logps: Log p
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/orpo_trainer.py:623
↓ 1 callers
Function
offload_fsdp_grad
(module)
verl-GDPO/verl/utils/fsdp_utils.py:79
↓ 1 callers
Function
offload_megatron_param_and_grad
(module_list: nn.ModuleList, offload_grad=False, hybrid_engine=None)
verl-GDPO/verl/utils/megatron_utils.py:226
↓ 1 callers
Method
offload_params_to_cpu
offload params of models that are not of current pp rank to cpu
verl-GDPO/verl/workers/sharding_manager/megatron_vllm.py:157
↓ 1 callers
Method
on_after_inner_forward
(self, wrapper_module: nn.Module, original_module: nn.Module)
trl-GDPO/trl-0.18.0-gdpo/trl/models/utils.py:337
↓ 1 callers
Method
on_after_outer_forward
(self, wrapper_module: nn.Module, original_module: nn.Module)
trl-GDPO/trl-0.18.0-gdpo/trl/models/utils.py:340
↓ 1 callers
Function
pad_dataproto_to_divisor
Pad a DataProto to size divisible by size_divisor Args: size_divisor (int): size divisor Returns: data: (DataProto): the pad
verl-GDPO/verl/protocol.py:40
↓ 1 callers
Function
pad_to_sequence_parallel
pad the tokens such that the total length is a multiple of sp world size Args: unpad_tokens: (total_nnz, ...). Tokens after removing padd
verl-GDPO/verl/utils/megatron/sequence_parallel.py:29
↓ 1 callers
Function
parse_args
Parse command-line arguments for the e2b_router script. Arguments: --host (str): The hostname or IP address to bind the server to. D
trl-GDPO/open-r1/scripts/e2b_router.py:139
↓ 1 callers
Function
parse_args
Parse command-line arguments for the morph_router script. Arguments: --host (str): The hostname or IP address to bind the server to.
trl-GDPO/open-r1/scripts/morph_router.py:143
↓ 1 callers
Function
parse_eos_tokens
(tokenizer, eos_tokens, eos_token_ids)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/chat.py:378
↓ 1 callers
Function
parse_settings
(user_input, current_args, interface)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/chat.py:315
↓ 1 callers
Function
patch_code
(text, lang)
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/code_patcher.py:89
↓ 1 callers
Function
pipeline_step
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `list[str]`, *optional*): The prompt or prompts to guide t
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_sd_base.py:326
↓ 1 callers
Function
pipeline_step_with_grad
r""" Function to get RGB image with gradients attached to the model weights. Args: prompt (`str` or `list[str]`, *optional*, defaults
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_sd_base.py:532
↓ 1 callers
Method
post_init
r""" Post initialization method. This method is called after the model is instantiated and loaded from a checkpoint. It can be used to
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_base.py:566
↓ 1 callers
Method
prediction_step
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/reward_trainer.py:293
↓ 1 callers
Function
prepare_dataset
Prepare dataset example for training.
trl-GDPO/trl-0.18.0-gdpo/examples/scripts/sft_video_llm.py:83
↓ 1 callers
Function
prepare_dataset
(dataset: DatasetDict, dataset_name: str, dataset_train_split: str)
trl-GDPO/trl-0.18.0-gdpo/examples/scripts/sft_vlm_gemma3.py:117
↓ 1 callers
Method
prepare_inputs_for_generation
(self, *args, **kwargs)
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_base.py:719
↓ 1 callers
Method
prepare_model_inputs
(self, input_ids: torch.Tensor, attention_mask: torch.Tensor, labels: torch.Tensor)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/iterative_sft_trainer.py:227
↓ 1 callers
Function
prepare_sample_text
Prepare the text from a sample of the dataset.
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama/scripts/supervised_finetuning.py:99
↓ 1 callers
Function
prepare_sample_text
Prepare the text from a sample of the dataset.
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama_2/scripts/sft_llama2.py:111
↓ 1 callers
Method
print_help
(self)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/chat.py:276
↓ 1 callers
Function
print_trainable_parameters
Prints the number of trainable parameters in the model.
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama/scripts/supervised_finetuning.py:84
↓ 1 callers
Method
print_user_message
(self, text)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/chat.py:264
↓ 1 callers
Function
process_example
(example)
trl-GDPO/trl-0.18.0-gdpo/examples/datasets/prm800k.py:51
↓ 1 callers
Function
process_example
(example, session, args, output_file, pbar)
trl-GDPO/open-r1/scripts/generate_reasoning.py:45
↓ 1 callers
Function
process_log_file
(log)
trl-GDPO/trl-0.18.0-gdpo/scripts/log_reports.py:34
↓ 1 callers
Method
push_to_hub
(self, *args, **kwargs)
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_value_head.py:217
↓ 1 callers
Function
push_to_hub_revision
Pushes the model to branch on a Hub repo.
trl-GDPO/open-r1/src/open_r1/utils/hub.py:39
↓ 1 callers
Function
randn_tensor
A helper function to create random tensors on the desired `device` with the desired `dtype`. When passing a list of generators, you can seed each
trl-GDPO/trl-0.18.0-gdpo/trl/core.py:113
↓ 1 callers
Method
re_encode_by_rm_tokenizer
(self, data: DataProto)
verl-GDPO/verl/workers/reward_model/megatron/reward_model.py:58
↓ 1 callers
Function
reasoning_steps_reward
r"""Reward function that checks for clear step-by-step reasoning. Regex pattern: Step \d+: - matches "Step 1:", "Step 2:", etc. ^\
trl-GDPO/open-r1/src/open_r1/rewards.py:115
↓ 1 callers
Function
recurse
(nest: dict, prefix: str, into: dict)
trl-GDPO/trl-0.18.0-gdpo/trl/core.py:29
↓ 1 callers
Function
remove_boxed
(s)
verl-GDPO/verl/utils/reward_score/math.py:49
↓ 1 callers
Function
remove_hooks
Removes the optimizer hooks from a DeepSpeed ZeRO-3 model.
trl-GDPO/trl-0.18.0-gdpo/trl/models/utils.py:135
↓ 1 callers
Function
remove_right_units
(string)
verl-GDPO/verl/utils/reward_score/math.py:140
↓ 1 callers
Method
reorder
Note that this operation is in-place
verl-GDPO/verl/protocol.py:539
↓ 1 callers
Function
repeat_each_element_k_times
(list_to_repeat: list, k: int)
trl-GDPO/open-r1/scripts/pass_rate_filtering/compute_pass_rate.py:137
↓ 1 callers
Method
rgb_with_grad
(self, *args, **kwargs)
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_sd_base.py:827
↓ 1 callers
Function
run_lighteval_job
( benchmark: str, training_args: Union["SFTConfig", "GRPOConfig"], model_args: "ModelConfig", )
trl-GDPO/open-r1/src/open_r1/utils/evaluation.py:69
↓ 1 callers
Function
run_script
(script: str, language: str)
trl-GDPO/open-r1/scripts/e2b_router.py:110
↓ 1 callers
Function
run_script
(script: str, language: str)
trl-GDPO/open-r1/scripts/morph_router.py:96
↓ 1 callers
Function
run_submission
Executes a submission against a test case using the Piston execution environment. Args: client: PistonClient instance for executing
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/ioi_scoring.py:267
↓ 1 callers
Function
run_training
(args, train_data, val_data)
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama/scripts/supervised_finetuning.py:147
↓ 1 callers
Function
save_chat
(chat, args, filename)
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/chat.py:290
↓ 1 callers
Method
save_to_json
Save the content of this instance in JSON format inside `json_path`.
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:745
↓ 1 callers
Method
scheduler_step
(self, *args, **kwargs)
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_sd_base.py:82
↓ 1 callers
Function
score_single_test_case
( client: PistonClient, problem_data: dict, test_input: str, test_output: str, submission:
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/cf_scoring.py:12
← previous
next →
701–800 of 2,091, ranked by callers