MCPcopy Create free account

hub / github.com/Fr0zenCrane/Cockatiel / functions

Functions1,946 in github.com/Fr0zenCrane/Cockatiel

↓ 1 callersFunctionclip_by_value
Tensor extension to torch.clamp https://github.com/pytorch/pytorch/issues/2793#issuecomment-428784713
llava/trl/core.py:187
↓ 1 callersMethodcollate
(self, batch)
llava/train/train.py:197
↓ 1 callersFunctioncomputeIoU
(bbox1, bbox2)
llava/eval/eval_refcoco.py:9
↓ 1 callersMethodcompute_advantages
( self, values: torch.FloatTensor, rewards: torch.FloatTensor, mask: torch.Flo
llava/trl/trainer/ppo_trainer.py:1131
↓ 1 callersFunctioncompute_file_md5sum
Compute the md5sum of a file in chunks. Parameters ---------- fname : Union[str, BinaryIO] Filename or file object chunksize
llava/wids/wids.py:46
↓ 1 callersMethodcompute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: Dict[str, Union[torch.Tensor
llava/trl/trainer/dpo_trainer.py:1121
↓ 1 callersMethodcompute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: Dict[str, Union[torch.Tensor
llava/trl/trainer/reward_trainer.py:209
↓ 1 callersMethodcompute_reward
Compute the reward for a list of histories.
llava/trl/environment/base_environment.py:357
↓ 1 callersMethodcompute_rewards
(self, prompt_image_pairs, is_async=False)
llava/trl/trainer/ddpo_trainer.py:213
↓ 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
llava/trl/trainer/dpo_trainer.py:777
↓ 1 callersFunctionconsolidate_ckpt
(src_path, dst_path)
llava/model/consolidate.py:30
↓ 1 callersFunctioncontext_length_extension
(config)
llava/model/language_model/builder.py:47
↓ 1 callersFunctionconvert_siglip_checkpoint
Copy/paste/tweak model's weights to our SigLIP structure.
llava/model/multimodal_encoder/siglip/convert_siglip_to_hf.py:257
↓ 1 callersFunctionconvert_to_scalar
Converts the stats from a flattened dict to single scalar dicts
llava/trl/core.py:91
↓ 1 callersFunctioncreate_custom_forward
(module)
llava/model/language_model/mpt/hf_prefixlm_converter.py:327
↓ 1 callersFunctioncreate_data_loader
(questions, image_folder, tokenizer, image_processor, model_config, batch_size=1, num_workers=4)
llava/eval/model_videochatgpt_benchmark.py:110
↓ 1 callersMethodcreate_extended_attention_mask_for_decoder
(input_shape, attention_mask, device=None)
llava/train/transformers_replace/modeling_utils.py:888
↓ 1 callersMethodcreate_model_card
Creates and saves a model card for a TRL model. Args: path (`str`): The path to save the model card to. model_name (`
llava/trl/trainer/ddpo_trainer.py:605
↓ 1 callersMethodcreate_model_card
Creates and saves a model card for a TRL model. Args: path (`str`): The path to save the model card to. model_name (`
llava/trl/trainer/ppo_trainer.py:1385
↓ 1 callersFunctioncreate_one_example_chatbot
(format, question, context, choice, answer, lecture, solution, test_example=True)
scripts/convert_sqa_to_llava_base_prompt.py:58
↓ 1 callersMethodcreate_optimizer
Setup the optimizer. We provide a reasonable default that works well. If you want to use something else, you can pass a tuple in the
llava/train/llava_trainer.py:645
↓ 1 callersFunctioncreate_rename_keys
(config)
llava/model/multimodal_encoder/siglip/convert_siglip_to_hf.py:105
↓ 1 callersFunctioncreate_test_prompt
(demo_prompt, query, response)
llava/eval/mathvista_utils/extract_answer.py:23
↓ 1 callersFunctiondeal_with_prompt
(input_text, mm_use_im_start_end)
llava/eval/mmmu_utils/model_utils.py:35
↓ 1 callersFunctiondebug_rank0
(msg: str)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:122
↓ 1 callersFunctiondefault_flax_embed_init
(tensor)
llava/model/multimodal_encoder/siglip/modeling_siglip.py:144
↓ 1 callersMethoddisable_input_require_grads
Removes the `_require_grads_hook`.
llava/train/transformers_replace/modeling_utils.py:1495
↓ 1 callersFunctiondownload_file
(remote, local, handlers=default_cmds, verbose=False)
llava/wids/wids_dl.py:110
↓ 1 callersFunctiondownload_file_no_log
Download a file from a remote url to a local path. The remote url can be a pipe: url, in which case the remainder of the url is treated as a c
llava/wids/wids_dl.py:84
↓ 1 callersMethoddpo_loss
Compute the DPO loss for a batch of policy and reference model log probabilities. Args: policy_chosen_logps: Log probabilities of
llava/trl/trainer/dpo_trainer.py:839
↓ 1 callersFunctiondrop_block_2d
DropBlock. See https://arxiv.org/pdf/1810.12890.pdf DropBlock with an experimental gaussian noise option. This layer has been tested on a few tra
llava/model/multimodal_encoder/intern/modeling_intern_vit.py:73
↓ 1 callersFunctiondrop_block_fast_2d
DropBlock. See https://arxiv.org/pdf/1810.12890.pdf DropBlock with an experimental gaussian noise option. Simplied from above without concern for
llava/model/multimodal_encoder/intern/modeling_intern_vit.py:127
↓ 1 callersFunctiondrop_path
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). This is the same as the DropConnect impl I created for E
llava/model/multimodal_encoder/intern/modeling_intern_vit.py:203
↓ 1 callersFunctiondtype_byte_size
Returns the size (in bytes) occupied by one parameter of type `dtype`. Example: ```py >>> dtype_byte_size(torch.float32) 4
llava/train/transformers_replace/modeling_utils.py:308
↓ 1 callersFunctionentropy_from_logits
Calculate entropy from logits.
llava/trl/core.py:196
↓ 1 callersMethodestimate_tokens
Helper function to estimate the total number of tokens from the model inputs. Args: inputs (`dict`): The model inputs.
llava/train/transformers_replace/modeling_utils.py:1052
↓ 1 callersFunctioneval_forward
(accelerator, model, input_embeds, answer_embeds, pad_id, answer_ids, tokenizer)
llava/eval/vision_niah_vila/eval_vision_niah.py:81
↓ 1 callersFunctioneval_model
(args)
llava/eval/run_vila.py:49
↓ 1 callersFunctioneval_model
(args)
llava/eval/model_vqa_mmbench.py:63
↓ 1 callersFunctioneval_model
(args)
llava/eval/model_videochatgpt_benchmark.py:125
↓ 1 callersFunctioneval_model
(args)
llava/eval/model_vqa_video.py:121
↓ 1 callersFunctioneval_model
(args)
llava/eval/model_vqa_nextqa.py:109
↓ 1 callersFunctioneval_model
(args)
llava/eval/model_vqa_qbench.py:28
↓ 1 callersFunctioneval_model
(args)
llava/eval/model_vqa_videodemo.py:133
↓ 1 callersFunctioneval_model
(args)
llava/eval/model_vqa_videoperception.py:157
↓ 1 callersFunctioneval_model
(model_name, questions_file, answers_file)
llava/eval/model_qa.py:36
↓ 1 callersFunctioneval_model
(args)
llava/eval/model_vqa_videomme.py:143
↓ 1 callersFunctioneval_model
(args)
llava/eval/model_refcoco.py:184
↓ 1 callersFunctioneval_model
(args)
llava/eval/model_vqa.py:31
↓ 1 callersFunctioneval_model
(args)
llava/eval/video_mme/video_eval.py:148
↓ 1 callersFunctioneval_model
(args)
llava/eval/video/model_vqa_videodemo_benchmark.py:122
↓ 1 callersFunctioneval_model
(args)
llava/data_aug/video_inference.py:112
↓ 1 callersFunctioneval_model
(args)
llava/data_aug/video_eval.py:144
↓ 1 callersFunctioneval_multi_choice
Evaluate a multiple choice instance.
llava/eval/mmmu_utils/eval_utils.py:187
↓ 1 callersFunctioneval_open
Evaluate an open question instance
llava/eval/mmmu_utils/eval_utils.py:204
↓ 1 callersFunctioneval_pope
(answers, label_file)
llava/eval/eval_pope.py:8
↓ 1 callersMethodeval_pred_list
(self, pred_list)
llava/eval/m4c_evaluator.py:244
↓ 1 callersFunctioneval_your_results
Evaluate your results against the ground truth Args: - your_results_path (str): Path to your results file - video_types (Optional[Li
llava/eval/video_mme/mme_calc.py:89
↓ 1 callersFunctioneval_your_results
Evaluate your results against the ground truth Args: - your_results_path (str): Path to your results file - video_types (Optional[Li
llava/eval/video/eval_video_videomme.py:86
↓ 1 callersFunctionevaluate
Batch evaluation for multiple choice and open questions.
llava/eval/mmmu_utils/eval_utils.py:233
↓ 1 callersFunctionevaluate_exact_match_accuracy
(entries)
llava/eval/evaluate_vqa_score.py:56
↓ 1 callersFunctionevaluate_relaxed_accuracy
(entries)
llava/eval/evaluate_vqa_score.py:46
↓ 1 callersFunctionexact_div
(a, b, a_str, b_str, custom_error_message="")
llava/trl/trainer/utils.py:573
↓ 1 callersFunctionexpand_device_map
Expand a device map to return the correspondance parameter name to device.
llava/train/transformers_replace/modeling_utils.py:4803
↓ 1 callersFunctionexternal_parameters
(self)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:131
↓ 1 callersFunctionextract_answer
(response, problem, quick_extract=False)
llava/eval/mathvista_utils/extract_answer.py:30
↓ 1 callersFunctionextract_characters_regex
(s)
llava/eval/video_mme/mme_calc.py:68
↓ 1 callersFunctionextract_characters_regex
(s)
llava/eval/video/eval_video_videomme.py:65
↓ 1 callersFunctionextract_local_position_ids
(input_ids, image_positions, image_ids, sp_rank, sp_size, image_token_len=198)
llava/train/sequence_parallel/input_utils.py:66
↓ 1 callersFunctionextract_numbers
Exact all forms of numbers from a string with regex.
llava/eval/mmmu_utils/eval_utils.py:106
↓ 1 callersFunctionfind_all_linear_names
(model, lora_llm, lora_vt)
llava/train/train.py:118
↓ 1 callersFunctionfind_submodule_and_param_name
A helper util to find the last sub-module and the param/buffer name. If `start_prefix` is supplied it'll be removed from the start of the key
llava/train/transformers_replace/modeling_utils.py:608
↓ 1 callersMethodflat_square
(self, x)
llava/model/multimodal_projector/base_projector.py:57
↓ 1 callersFunctionflatten_nested_dict
(params, parent_key="", sep="/")
llava/model/multimodal_encoder/siglip/convert_siglip_to_hf.py:243
↓ 1 callersMethodforward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
llava/model/language_model/modeling_mixtral_long_context.py:1160
↓ 1 callersMethodforward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
llava/train/transformers_replace/models/mixtral/modeling_mixtral.py:1158
↓ 1 callersMethodforward
(self, x)
llava/train/transformers_replace/models/mistral/modeling_mistral.py:184
↓ 1 callersMethodforward
(self, x)
llava/train/transformers_replace/models/gemma/modeling_gemma.py:174
↓ 1 callersMethodfreezed_module_patch
Huggingface will call model.train() at each training_step. To ensure the expected behaviors for modules like dropout, batchnorm, etc., we nee
llava/model/llava_arch.py:228
↓ 1 callersFunctionfused_init_helper_
(module: nn.Module, init_fn_)
llava/model/language_model/mpt/param_init_fns.py:37
↓ 1 callersMethodgather_stats
Gather stats from all processes. Useful in the context of distributed training. Args: stats (dict[str, Any]):
llava/trl/trainer/ppo_trainer.py:896
↓ 1 callersFunctiongen_pred_json
(output_dir, eval_type)
llava/eval/video/model_vqa_videodemo_benchmark.py:188
↓ 1 callersFunctiongen_slopes
(n_heads, alibi_bias_max=8, device=None)
llava/model/language_model/mpt/attention.py:460
↓ 1 callersMethodgenerate
r""" A simple wrapper around the `generate` method of the wrapped model. Please refer to the [`generate`](https://huggingface.co/docs/
llava/trl/models/modeling_value_head.py:190
↓ 1 callersFunctiongenerate_wids_meta
(tar_list, data_path, cache_dir, idx=0, total=0)
llava/data/simple_vila_webdataset.py:108
↓ 1 callersFunctionget_acc_with_contion
(res_pd, key, value)
llava/eval/mathvista_utils/calculate_score.py:87
↓ 1 callersMethodget_anls
(self, s1, s2)
llava/eval/m4c_evaluator.py:278
↓ 1 callersFunctionget_args
()
llava/eval/eval_textvqa.py:11
↓ 1 callersFunctionget_args
()
llava/eval/eval_science_qa_gpt4.py:11
↓ 1 callersFunctionget_args
()
llava/eval/eval_science_qa.py:10
↓ 1 callersFunctionget_args
()
llava/eval/eval_science_qa_gpt4_requery.py:11
↓ 1 callersFunctionget_args
()
scripts/convert_mmbench_for_submission.py:24
↓ 1 callersFunctionget_args
()
scripts/convert_seed_for_submission.py:21
↓ 1 callersMethodget_batch_logps
Compute the log probabilities of the given labels under the given logits. Args: logits: Logits of the model (unnormalized). Shape
llava/trl/trainer/dpo_trainer.py:920
↓ 1 callersMethodget_batch_samples
Generate samples from the model and reference model for the given batch of inputs.
llava/trl/trainer/dpo_trainer.py:1145
↓ 1 callersMethodget_by_name
(self, name)
llava/wids/wids_mmtar.py:101
↓ 1 callersFunctionget_chat_response
( prompt, client, model="gpt-3.5-turbo", temperature=0, max_tokens=256, n=1, patie
llava/eval/mathvista_utils/utilities.py:206
↓ 1 callersFunctionget_checkpoint_path
(output_dir: str, checkpoint_prefix: str = "checkpoint")
llava/train/utils.py:58
↓ 1 callersFunctionget_chunk
(lst, n, k)
llava/eval/model_vqa_mmbench.py:36
↓ 1 callersFunctionget_chunk
(lst, n, k)
llava/eval/model_videochatgpt_benchmark.py:34
← previousnext →501–600 of 1,946, ranked by callers