MCPcopy Create free account

hub / github.com/Kwai-Klear/AR-GRPO / functions

Functions650 in github.com/Kwai-Klear/AR-GRPO

↓ 2 callersFunctionsample
(logits, temperature: float=1.0, top_k: int=0, top_p: float=1.0, sample_logits=True)
autoregressive/models/generate.py:57
↓ 2 callersMethodset_active_loras
(self, lora_requests: Set[LoRARequest], lora_mapping: LoRAMapping)
autoregressive/serve/model_runner.py:960
↓ 2 callersMethodtext_preprocessing
(self, text)
language/t5.py:97
↓ 2 callersMethodtext_tokenize
(self,texts)
language/t5.py:73
↓ 2 callersFunctiontop_k_top_p_filtering
Filter a distribution of logits using top-k and/or nucleus (top-p) filtering Args: logits: logits distribution shape (batch size, vocabula
autoregressive/models/generate.py:16
↓ 2 callersFunctionunified_reward
(images, prompts, sess=None)
reward_utils/unireward.py:67
↓ 1 callersMethod__init__
( self, data_source: Sized, mini_repeat_count: int, batch_size: int = 1,
modified_grpo_trainer.py:136
↓ 1 callersMethod__init__
(self, data_path: str, script_args)
lazy_dataset.py:78
↓ 1 callersMethod__init__
(self, n_e, e_dim, beta)
tokenizer_lg/vqgan/quantize.py:25
↓ 1 callersMethod__init__
(self, num_features, logdet=False, affine=True, allow_reverse_init=False)
tokenizer_lg/tokenizer_image/discriminator_patchgan.py:71
↓ 1 callersMethod__init__
(self)
reward_utils/aesthscore.py:18
↓ 1 callersMethod__init__
(self, config, **kwargs)
autoregressive/modeling.py:124
↓ 1 callersMethod_add_request
( self, prompt: Optional[str], sampling_params: SamplingParams, prompt_token_i
autoregressive/serve/llm.py:221
↓ 1 callersFunction_apply_min_p
Adapted from https://github.com/oobabooga/text-generation-webui/blob/3146124ec01f02c8fb1650a6517cf1b60b537aaf/modules/sampler_hijack.py#L16C1
autoregressive/serve/sampler.py:262
↓ 1 callersFunction_apply_min_tokens_penalty
( logits: torch.Tensor, sampling_metadata: SamplingMetadata, )
autoregressive/serve/sampler.py:160
↓ 1 callersFunction_apply_penalties
(logits: torch.Tensor, prompt_tokens_tensor: torch.Tensor, output_tokens_tensor: torch.Te
autoregressive/serve/sampler.py:207
↓ 1 callersFunction_apply_top_k_top_p
( logits: torch.Tensor, p: torch.Tensor, k: torch.Tensor, )
autoregressive/serve/sampler.py:230
↓ 1 callersFunction_build_sampler_output
Construct Python objects with the output of sampling. Args: on_device_tensors: Tuple containing on-device tensors with the pr
autoregressive/serve/sampler.py:826
↓ 1 callersMethod_calculate_rewards
(self, inputs, prompts, completions, completion_ids_list)
modified_grpo_trainer.py:1007
↓ 1 callersFunction_check_if_gpu_supports_dtype
(torch_dtype: torch.dtype)
autoregressive/serve/worker.py:322
↓ 1 callersMethod_compute_loss
(self, model, inputs)
modified_grpo_trainer.py:1372
↓ 1 callersFunction_create_feature_graph
(input_batch)
fid_evaluation.py:590
↓ 1 callersFunction_create_softmax_graph
(input_batch)
fid_evaluation.py:607
↓ 1 callersMethod_enable_gradient_checkpointing
Enables gradient checkpointing for the model.
modified_grpo_trainer.py:828
↓ 1 callersFunction_extract_scores
(text_outputs)
reward_utils/unireward.py:20
↓ 1 callersMethod_get_last_hidden_state
(self, unwrapped_model, input_ids, attention_mask, logits_to_keep=None)
modified_grpo_trainer.py:851
↓ 1 callersFunction_get_logprobs
( logprobs: torch.Tensor, sampling_metadata: SamplingMetadata, sample_results: List[Tuple[List[int
autoregressive/serve/sampler.py:637
↓ 1 callersFunction_get_ranks
This function calculates the ranks of the chosen tokens in a logprob tensor. Args: x (torch.Tensor): 2D logprob tensor of shape (N,
autoregressive/serve/sampler.py:618
↓ 1 callersMethod_get_train_sampler
(self, dataset: Optional[Dataset] = None)
modified_grpo_trainer.py:784
↓ 1 callersMethod_init_cache_engine
(self)
autoregressive/serve/worker.py:182
↓ 1 callersMethod_init_executor
Initialize the worker and load the model. If speculative decoding is enabled, we instead create the speculative worker.
autoregressive/serve/gpu_executor.py:44
↓ 1 callersMethod_init_non_spec_worker
(self)
autoregressive/serve/gpu_executor.py:55
↓ 1 callersMethod_init_spec_worker
Initialize a SpecDecodeWorker, using a draft model for proposals.
autoregressive/serve/gpu_executor.py:83
↓ 1 callersMethod_init_tokenizer
(self, **tokenizer_init_kwargs)
autoregressive/serve/llm_engine.py:305
↓ 1 callersMethod_initialize_kv_caches
Initialize the KV cache in the worker(s). The workers will determine the number of blocks in both the GPU cache and the swap CPU cach
autoregressive/serve/llm_engine.py:234
↓ 1 callersFunction_load_generation_config_dict
(model_config: ModelConfig)
autoregressive/serve/llm_engine.py:40
↓ 1 callersFunction_modify_greedy_probs_inplace
Modify the probability distributions of the greedily-sampled tokens such that each sampled token has a "probability" of 1.0. This is required by
autoregressive/serve/sampler.py:775
↓ 1 callersMethod_move_model_to_vllm
(self)
modified_grpo_trainer.py:911
↓ 1 callersFunction_multinomial
( probs: torch.Tensor, num_samples: int, seq_groups: Optional[List[Tuple[List[int], SamplingParams
autoregressive/serve/sampler.py:383
↓ 1 callersMethod_norm
(self, x)
autoregressive/models/gpt.py:143
↓ 1 callersFunction_numpy_partition
(arr, kth, **kwargs)
fid_evaluation.py:640
↓ 1 callersFunction_open_npy_file
(path: str, arr_name: str)
fid_evaluation.py:568
↓ 1 callersMethod_prepare_decode
( self, seq_group_metadata_list: List[SequenceGroupMetadata], )
autoregressive/serve/model_runner.py:448
↓ 1 callersFunction_prepare_fake_inputs
Prepare fake inputs for profile run.
autoregressive/serve/model_runner.py:1217
↓ 1 callersMethod_prepare_prompt
( self, seq_group_metadata_list: List[SequenceGroupMetadata], )
autoregressive/serve/model_runner.py:248
↓ 1 callersMethod_prepare_sample
( self, seq_group_metadata_list: List[SequenceGroupMetadata], prompt_lens: List[int],
autoregressive/serve/model_runner.py:574
↓ 1 callersMethod_process_model_outputs
Apply the model output to the sequences in the scheduled seq groups. Returns RequestOutputs that can be returned to the client.
autoregressive/serve/llm_engine.py:470
↓ 1 callersFunction_read_bytes
Copied from: https://github.com/numpy/numpy/blob/fb215c76967739268de71aa4bda55dd1b062bc2e/numpy/lib/format.py#L788-L886 Read from file-like
fid_evaluation.py:538
↓ 1 callersMethod_reward_func
(self, cont, sol, **kwargs)
img_gen_grpo_rewards.py:37
↓ 1 callersMethod_reward_func
(self,cnt,lbl,**kwargs)
img_gen_grpo_rewards.py:110
↓ 1 callersMethod_reward_func
(self,cnt,lbl,**kwargs)
img_gen_grpo_rewards.py:171
↓ 1 callersMethod_reward_func
(self,cnt,sol,**kwargs)
img_gen_grpo_rewards.py:423
↓ 1 callersMethod_reward_func
(self,cnt,sol,**kwargs)
img_gen_grpo_rewards.py:450
↓ 1 callersMethod_reward_func
(self,cnt,**kwargs)
img_gen_grpo_rewards.py:536
↓ 1 callersMethod_reward_func
(self, cont_g, **kwargs)
img_gen_grpo_rewards.py:623
↓ 1 callersMethod_run_engine
(self, use_tqdm: bool)
autoregressive/serve/llm.py:238
↓ 1 callersFunction_sample
( probs: torch.Tensor, logprobs: torch.Tensor, sampling_metadata: SamplingMetadata, sampling_tensors:
autoregressive/serve/sampler.py:600
↓ 1 callersFunction_sample_with_torch
( probs: torch.Tensor, logprobs: torch.Tensor, sampling_metadata: SamplingMetadata, include_gp
autoregressive/serve/sampler.py:410
↓ 1 callersFunction_update_shapes
(pool3)
fid_evaluation.py:621
↓ 1 callersMethod_warm_up_model
(self)
autoregressive/serve/worker.py:189
↓ 1 callersMethodadd_request
Add a request to the engine's request pool. The request is added to the request pool and will be processed by the scheduler as `engin
autoregressive/serve/llm_engine.py:340
↓ 1 callersFunctionargs_calc
(script_args, training_args, model_args)
img_gen_grpo_train.py:110
↓ 1 callersMethodbasic_clean
(text)
language/t5.py:107
↓ 1 callersFunctionbatched_img
(img_batch)
test.py:95
↓ 1 callersFunctionbatched_img
(img_batch)
test_t2i.py:109
↓ 1 callersFunctionbatched_img
(img_batch)
inference_t2i.py:74
↓ 1 callersFunctionbatched_img
(img_batch)
test_t2i_rewards.py:136
↓ 1 callersFunctionbuild_imagenet_dataset
( data_path: str,image_size: int )
lazy_dataset.py:36
↓ 1 callersMethodcache_swap
( self, blocks_to_swap_in: Dict[int, int], blocks_to_swap_out: Dict[int, int],
autoregressive/serve/worker.py:196
↓ 1 callersFunctioncalc_one_img
(net, img)
reward_utils/maniqa.py:82
↓ 1 callersFunctioncalc_rewards
(prompts,imgs)
test_t2i_rewards.py:88
↓ 1 callersFunctioncalculate_activation_statistics
Calculation of the statistics used by the FID. Params: -- files : List of image files paths -- model : Instance of inception m
reward_utils/fid.py:191
↓ 1 callersMethodcalculate_adaptive_weight
(self, nll_loss, g_loss, last_layer)
tokenizer_lg/tokenizer_image/vq_loss.py:109
↓ 1 callersFunctioncalculate_fid_given_paths
Calculates the FID of two paths
reward_utils/fid.py:286
↓ 1 callersMethodcapture_model
Cuda graph capture a model. Note that CUDA graph's performance gain is negligible if number of batched tokens are larger than 200. An
autoregressive/serve/model_runner.py:982
↓ 1 callersFunctioncenter_crop_arr
Center cropping implementation from ADM. https://github.com/openai/guided-diffusion/blob/8fb3ad9197f16bbc40620447b2742e13458d2831/guided_diff
tokenizer_lg/vae/reconstruction_vae_ddp.py:60
↓ 1 callersFunctioncenter_crop_arr
Center cropping implementation from ADM. https://github.com/openai/guided-diffusion/blob/8fb3ad9197f16bbc40620447b2742e13458d2831/guided_diff
tokenizer_lg/vqgan/reconstruction_vqgan_ddp.py:62
↓ 1 callersFunctioncenter_crop_arr
Center cropping implementation from ADM. https://github.com/openai/guided-diffusion/blob/8fb3ad9197f16bbc40620447b2742e13458d2831/guided_diff
tokenizer_lg/consistencydecoder/reconstruction_cd_ddp.py:60
↓ 1 callersFunctioncolor_classification
(image, bboxes, classname)
benchmark/geneval/evaluation/evaluate_images.py:110
↓ 1 callersFunctioncompute_entropy_loss
(affinity, loss_type="softmax", temperature=0.01)
tokenizer_lg/tokenizer_image/vq_model.py:399
↓ 1 callersMethodcompute_inception_score
(self, activations: np.ndarray, split_size: int = 5000)
fid_evaluation.py:183
↓ 1 callersFunctioncompute_iou
(box_a, box_b)
benchmark/reward-server/reward_server/gen_eval.py:109
↓ 1 callersFunctioncompute_iou
(box_a, box_b)
benchmark/geneval/evaluation/evaluate_images.py:131
↓ 1 callersMethodcompute_logits
(self, hidden_states: torch.Tensor, sampling_metadata: SamplingMetadata)
autoregressive/serve/gpt_model.py:297
↓ 1 callersMethodcompute_loss
(self, model, inputs, return_outputs=False, num_items_in_batch=None)
modified_grpo_trainer.py:1362
↓ 1 callersMethodcompute_prec_recall
( self, activations_ref: np.ndarray, activations_sample: np.ndarray )
fid_evaluation.py:198
↓ 1 callersMethodcompute_statistics
(self, activations: np.ndarray)
fid_evaluation.py:178
↓ 1 callersFunctioncreat_optimizer_by_name
(model, weight_decay, learning_rate, betas, global_rank, logger)
autoregressive/train/train_c2i_fsdp.py:67
↓ 1 callersFunctioncreate_app
()
benchmark/reward-server/app_deqa.py:13
↓ 1 callersFunctioncreate_app
()
benchmark/reward-server/app_geneval.py:13
↓ 1 callersFunctioncreate_model
(device=None)
reward_utils/imagereward.py:23
↓ 1 callersFunctioncreate_model
(device=None)
reward_utils/pickscore.py:60
↓ 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
modified_grpo_trainer.py:1516
↓ 1 callersFunctioncreate_npz_from_sample_folder
Builds a single .npz file from a folder of .png samples.
tokenizer_lg/vae/reconstruction_vae_ddp.py:41
↓ 1 callersFunctioncreate_npz_from_sample_folder
Builds a single .npz file from a folder of .png samples.
tokenizer_lg/vqgan/reconstruction_vqgan_ddp.py:43
↓ 1 callersFunctioncreate_npz_from_sample_folder
Builds a single .npz file from a folder of .png samples.
tokenizer_lg/validation/val_ddp.py:36
↓ 1 callersFunctioncreate_npz_from_sample_folder
Builds a single .npz file from a folder of .png samples.
tokenizer_lg/tokenizer_image/reconstruction_vq_ddp.py:25
↓ 1 callersFunctioncreate_npz_from_sample_folder
Builds a single .npz file from a folder of .png samples.
tokenizer_lg/consistencydecoder/reconstruction_cd_ddp.py:41
↓ 1 callersFunctioncreate_npz_from_sample_folder
Builds a single .npz file from a folder of .png samples.
autoregressive/sample/sample_c2i_ddp.py:22
↓ 1 callersFunctioncreate_session
(url="http://127.0.0.1:17140/v1",api_key="unireward")
reward_utils/unireward.py:34
← previousnext →101–200 of 650, ranked by callers