Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Jiayi-Pan/TinyZero
/ functions
Functions
1,293 in github.com/Jiayi-Pan/TinyZero
⨍
Functions
1,293
◇
Types & classes
173
↳
Endpoints
30
Method
add_lora
(self, lora_request: LoRARequest)
verl/third_party/vllm/vllm_v_0_4_2/spmd_gpu_executor.py:154
Method
add_node
(self, process_count)
verl/single_controller/base/worker_group.py:35
Function
add_one
(data)
tests/ray/test_worker_group_basics.py:83
Method
add_prompt_adapter
(self, prompt_adapter_request: PromptAdapterRequest)
verl/third_party/vllm/vllm_v_0_6_3/spmd_gpu_executor.py:189
Method
add_prompt_adapter
(self, prompt_adapter_request: PromptAdapterRequest)
verl/third_party/vllm/vllm_v_0_5_4/spmd_gpu_executor.py:183
Method
all_gather
(self)
tests/ray/test_worker_group_torch.py:60
Method
all_special_ids
`List[int]`: List the ids of the special tokens(`'<unk>'`, `'<cls>'`, etc.) mapped to class attributes.
verl/workers/rollout/tokenizer.py:53
Method
all_special_tokens
`List[str]`: A list of the unique special tokens (`'<unk>'`, `'<cls>'`, ..., etc.). Convert tokens of `tokenizers.AddedToken` type t
verl/workers/rollout/tokenizer.py:61
Function
apply_monkey_patch_to_llama
()
verl/models/transformers/monkey_patch.py:22
Function
apply_monkey_patch_to_qwen2
()
verl/models/transformers/monkey_patch.py:28
Function
apply_rotary_pos_emb_rmpad
(q, k, cos, sin, position_ids, indices, sequence_length)
verl/models/llama/megatron/layers/parallel_attention.py:299
Function
arithmetic_sequence_reward_function
(data: DataProto)
tests/e2e/arithmetic_sequence/rl/main_trainer.py:37
Method
backward
(ctx: Any, *grad_output: Tensor)
verl/utils/ulysses.py:182
Method
backward
(ctx, grad_output: torch.Tensor)
verl/utils/megatron/tensor_parallel.py:118
Method
build_inputs_with_special_tokens
(self, token_ids_0: List[int],
tests/e2e/envs/digit_completion/tokenizer.py:104
Method
build_memory_reference
(self)
verl/utils/memory_buffer.py:199
Method
check_health_async
Checks if the executor is healthy. If not, it should raise an exception.
verl/third_party/vllm/vllm_v_0_6_3/spmd_gpu_executor.py:253
Method
check_health_async
Checks if the executor is healthy. If not, it should raise an exception.
verl/third_party/vllm/vllm_v_0_5_4/spmd_gpu_executor.py:250
Method
check_health_async
Checks if the executor is healthy. If not, it should raise an exception.
verl/third_party/vllm/vllm_v_0_4_2/spmd_gpu_executor.py:215
Function
check_workers_alive
(workers: List, is_alive: Callable, gap_time: float = 1)
verl/single_controller/base/worker_group.py:81
Method
chunk
(self, chunks: int)
verl/protocol.py:617
Function
clip_by_value
Tensor extenstion to torch.clamp https://github.com/pytorch/pytorch/issues/2793#issuecomment-428784713
verl/utils/torch_functional.py:86
Function
collate_fn
(x: list['DataProtoItem'])
verl/protocol.py:143
Function
collate_fn
(data_list: list[dict])
verl/utils/dataset/rl_dataset.py:31
Function
collect_all_to_all
(worker_group, output)
verl/single_controller/base/decorator.py:70
Function
collect_dp_compute_data_proto
(worker_group, output)
verl/single_controller/base/decorator.py:289
Function
collect_megatron_compute_data_proto
Each output must be a DataProto. We concat the dim=0 of output
verl/single_controller/base/decorator.py:147
Function
collect_megatron_pp_as_dp_data_proto
(worker_group, output)
verl/single_controller/base/decorator.py:246
Function
collect_megatron_pp_only
Only collect output of megatron pp. This is useful when examine weight names as they are identical in tp/dp
verl/single_controller/base/decorator.py:223
Function
compute_attention_mask
(prompts, pad_token_id)
tests/e2e/envs/digit_completion/task.py:107
Function
compute_entropy_loss
Compute Categorical entropy loss Args: logits: `(torch.Tensor)` shape: (bs, response_length, vocab_size) eos_mask: `(
verl/trainer/ppo/core_algos.py:197
Function
compute_gae_advantage_return
Adapted from https://github.com/huggingface/trl/blob/main/trl/trainer/ppo_trainer.py Args: token_level_rewards: `(torch.Tensor)`
verl/trainer/ppo/core_algos.py:70
Function
compute_grad_norm
(model: nn.Module)
verl/utils/torch_functional.py:151
Function
compute_grpo_outcome_advantage
Compute advantage for GRPO, operating only on Outcome reward (with only one scalar reward for each response). Args: token_level_
verl/trainer/ppo/core_algos.py:111
Method
compute_log_prob
Compute the log probability of the responses given input_ids, attention_mask and position_ids Args: data (DataProto): a DataProto
verl/workers/actor/megatron_actor.py:129
Method
compute_log_prob
Compute the log probability of the responses given input_ids, attention_mask and position_ids Args: data (DataProto): a DataProto
verl/workers/actor/dp_actor.py:153
Method
compute_logprobs_fn
(output, data)
verl/workers/actor/megatron_actor.py:149
Function
compute_policy_loss
Adapted from https://github.com/huggingface/trl/blob/main/trl/trainer/ppo_trainer.py#L1122 Args: old_log_prob: `(torch.Tensor)`
verl/trainer/ppo/core_algos.py:163
Function
compute_position_id_with_mask
(mask)
tests/e2e/envs/digit_completion/task.py:113
Method
compute_ref_log_prob
(self, data: DataProto)
verl/workers/megatron_workers.py:376
Method
compute_reward
(self, data: DataProto)
verl/workers/reward_model/megatron/reward_model.py:123
Function
compute_rewards
(token_level_scores, old_log_prob, ref_log_prob, kl_ratio)
verl/trainer/ppo/core_algos.py:158
Method
compute_rm_score
(self, data: DataProto)
verl/workers/megatron_workers.py:723
Function
compute_score
The scoring function for countdown task. Args: solution_str: the solution text ground_truth: dictionary containing target num
verl/utils/reward_score/countdown.py:59
Function
compute_score
The scoring function for GSM8k. Reference: Trung, Luong, et al. "Reft: Reasoning with reinforced fine-tuning." Proceedings of the 62nd Annual Mee
verl/utils/reward_score/gsm8k.py:44
Function
compute_score
(solution_str, ground_truth)
verl/utils/reward_score/math.py:17
Function
compute_score
The scoring function for GSM8k. Reference: Trung, Luong, et al. "Reft: Reasoning with reinforced fine-tuning." Proceedings of the 62nd Annual Mee
verl/utils/reward_score/multiply.py:27
Function
compute_value_loss
Compute the value loss. Copied from https://github.com/huggingface/trl/blob/main/trl/trainer/ppo_trainer.py#L1151 Args: vpreds (`torch.Fl
verl/trainer/ppo/core_algos.py:216
Method
compute_values
(self, data: DataProto)
verl/workers/megatron_workers.py:551
Method
compute_values
Compute values
verl/workers/critic/base.py:33
Method
compute_values
(self, data: DataProto)
verl/workers/critic/megatron_critic.py:77
Method
compute_values
(self, data: DataProto)
verl/workers/critic/dp_critic.py:113
Method
concat
(data: List[ray.ObjectRef])
verl/protocol.py:613
Function
convert_config
(hf_config: PretrainedConfig, megatron_config)
verl/utils/megatron_utils.py:140
Method
convert_ids_to_tokens
Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and added tokens.
verl/workers/rollout/tokenizer.py:116
Method
convert_tokens_to_string
(self, tokens)
tests/e2e/envs/digit_completion/tokenizer.py:101
Method
convert_tokens_to_string
Converts a sequence of tokens in a single string. The most simple way to do it is `" ".join(tokens)` but we often want to remove sub-
verl/workers/rollout/tokenizer.py:147
Function
create_huggingface_critic
Args: model_name: override_config_kwargs: Returns:
verl/utils/model.py:81
Method
create_load_config
(self)
verl/third_party/vllm/vllm_v_0_6_3/arg_utils.py:62
Method
create_model_config
(self)
verl/third_party/vllm/vllm_v_0_6_3/arg_utils.py:33
Function
decorator
(func)
verl/single_controller/base/decorator.py:398
Function
deepseekv2_dtensor_weight_loader
(actor_weights: Dict, vllm_model: nn.Module)
verl/third_party/vllm/vllm_v_0_6_3/dtensor_weight_loaders.py:228
Function
deepseekv2_dtensor_weight_loader
(actor_weights: Dict, vllm_model: nn.Module)
verl/third_party/vllm/vllm_v_0_5_4/dtensor_weight_loaders.py:194
Function
default_weight_loader
Default weight loader.
verl/third_party/vllm/vllm_v_0_3_1/weight_loaders.py:32
Function
default_weight_loader
Default weight loader.
verl/third_party/vllm/vllm_v_0_6_3/megatron_weight_loaders.py:37
Function
default_weight_loader
Default weight loader.
verl/third_party/vllm/vllm_v_0_5_4/megatron_weight_loaders.py:37
Function
default_weight_loader
Default weight loader.
verl/third_party/vllm/vllm_v_0_4_2/megatron_weight_loaders.py:37
Method
determine_num_available_blocks
Determine the number of available KV blocks. This invokes `determine_num_available_blocks` on each worker and takes the min of the re
verl/third_party/vllm/vllm_v_0_6_3/spmd_gpu_executor.py:114
Method
determine_num_available_blocks
Profiles the peak memory usage of the model to determine how many KV blocks may be allocated without OOMs. The engine will first cond
verl/third_party/vllm/vllm_v_0_6_3/worker.py:177
Method
determine_num_available_blocks
Determine the number of available KV blocks. This invokes `determine_num_available_blocks` on each worker and takes the min of the re
verl/third_party/vllm/vllm_v_0_5_4/spmd_gpu_executor.py:107
Method
determine_num_available_blocks
Profiles the peak memory usage of the model to determine how many KV blocks may be allocated without OOMs. The engine will first cond
verl/third_party/vllm/vllm_v_0_5_4/worker.py:171
Method
determine_num_available_blocks
Determine the number of available KV blocks. This invokes `determine_num_available_blocks` on each worker and takes the min of the re
verl/third_party/vllm/vllm_v_0_4_2/spmd_gpu_executor.py:97
Method
determine_num_available_blocks
Profiles the peak memory usage of the model to determine how many KV blocks may be allocated without OOMs. The engine will first cond
verl/third_party/vllm/vllm_v_0_4_2/worker.py:142
Function
dispatch_all_to_all
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:66
Function
dispatch_dp_compute
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:255
Function
dispatch_dp_compute_data_proto
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:272
Function
dispatch_dp_compute_data_proto_with_func
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:279
Function
dispatch_megatron_compute_data_proto
All the args and kwargs must be DataProto. The batch will be chunked by dp_size and passed to each rank
verl/single_controller/base/decorator.py:118
Function
dispatch_megatron_pp_as_dp_data_proto
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:237
Function
dispatch_one_to_all
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:60
Method
do_log_stats
Forced log when no requests active.
verl/third_party/vllm/vllm_v_0_3_1/llm_engine_sp.py:595
Method
download_model
(self, model_config: ModelConfig)
verl/third_party/vllm/vllm_v_0_6_3/model_loader.py:113
Method
download_model
(self, model_config: ModelConfig)
verl/third_party/vllm/vllm_v_0_6_3/model_loader.py:144
Method
download_model
(self, model_config: ModelConfig)
verl/third_party/vllm/vllm_v_0_6_3/model_loader.py:199
Method
download_model
(self, model_config: ModelConfig)
verl/third_party/vllm/vllm_v_0_6_3/model_loader.py:247
Method
dp_size
(self)
verl/single_controller/base/megatron/worker_group.py:41
Method
encode_async
(self, prompt: str, request_id: Optional[str] = None,
verl/third_party/vllm/vllm_v_0_3_1/tokenizer.py:45
Method
encode_async
(self, prompt: str, request_id: Optional[str] = None,
verl/third_party/vllm/vllm_v_0_5_4/tokenizer.py:50
Method
encode_async
(self, prompt: str, request_id: Optional[str] = None,
verl/third_party/vllm/vllm_v_0_4_2/tokenizer.py:50
Function
entropy_from_logits
Calculate entropy from logits.
verl/utils/torch_functional.py:95
Method
eos_token_id
`Optional[int]`: Id of the end of sentence token in the vocabulary. Returns `None` if the token has not been set.
verl/workers/rollout/tokenizer.py:44
Method
eos_token_id
(self)
verl/third_party/vllm/vllm_v_0_3_1/tokenizer.py:71
Method
eos_token_id
(self)
verl/third_party/vllm/vllm_v_0_6_3/tokenizer.py:39
Method
eos_token_id
(self)
verl/third_party/vllm/vllm_v_0_5_4/tokenizer.py:76
Method
eos_token_id
(self)
verl/third_party/vllm/vllm_v_0_4_2/tokenizer.py:76
Method
execute_all
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:329
Method
execute_model
(self, execute_model_req)
verl/third_party/vllm/vllm_v_0_6_3/spmd_gpu_executor.py:162
Method
execute_model
Execute model in Single Program Multiple Data (SPMD) fashion. All workers take the same request, prepare the input and execut
verl/third_party/vllm/vllm_v_0_6_3/worker.py:245
Method
execute_model
(self, execute_model_req)
verl/third_party/vllm/vllm_v_0_5_4/spmd_gpu_executor.py:156
Method
execute_model
Execute model in Single Program Multiple Data (SPMD) fashion. All workers take the same request, prepare the input and execut
verl/third_party/vllm/vllm_v_0_5_4/worker.py:239
← previous
next →
801–900 of 1,293, ranked by callers