MCPcopy Create free account

hub / github.com/Fr0zenCrane/Cockatiel / functions

Functions1,946 in github.com/Fr0zenCrane/Cockatiel

↓ 2 callersFunctionget_ulysses_seq_len
Get the size of the Ulysses sequence parallel group.
llava/train/sequence_parallel/globals.py:221
↓ 2 callersFunctionget_ulysses_sp_rank
Get the rank of this process in the Ulysses sequence parallel group the caller rank belongs to.
llava/train/sequence_parallel/globals.py:231
↓ 2 callersMethodgradient_checkpointing_enable
Activates gradient checkpointing for the current model. Note that in other frameworks this feature can be referred to as "activation
llava/train/transformers_replace/modeling_utils.py:2015
↓ 2 callersFunctionhas_tokenizer
(repo_id_or_path: str)
llava/model/language_model/builder.py:35
↓ 2 callersFunctionhash_dataset_name
Compute a hash of the input string and return the first 16 characters of the hash.
llava/wids/wids.py:433
↓ 2 callersFunctionis_local_dist_rank_0
()
llava/train/transformers_replace/modeling_utils.py:136
↓ 2 callersFunctionis_mm_model
Check if the model at the given path is a visual language model. Args: model_path (str): The path to the model. Returns:
llava/model/utils.py:58
↓ 2 callersFunctionis_none
(value)
llava/eval/model_vqa_mmbench.py:41
↓ 2 callersFunctionis_scaled_image
Checks to see whether the pixel values have already been rescaled to [0, 1].
llava/model/multimodal_encoder/siglip/image_processing_siglip.py:47
↓ 2 callersFunctionis_torchvision_available
()
llava/trl/import_utils.py:71
↓ 2 callersFunctioniterate_ranges
Iterate over the ranges in a random order.
llava/wids/wids.py:657
↓ 2 callersFunctionload_yaml
(file_path)
llava/eval/mmmu_utils/data_utils.py:102
↓ 2 callersFunctionlru_json_load
(fpath)
llava/data/dataset.py:1536
↓ 2 callersFunctionmake_conv
(prompt, answer)
llava/train/train.py:180
↓ 2 callersFunctionmasked_whiten
Whiten values with masked values.
llava/trl/core.py:178
↓ 2 callersFunctionmaybe_zero_3
(param, ignore_status=False, name=None)
llava/train/llava_trainer.py:38
↓ 2 callersFunctionneed_more_runs
()
llava/eval/eval_mmvet.py:137
↓ 2 callersFunctionno_init_weights
Context manager to globally disable weight initialization to speed up loading large models. TODO(Patrick): Delete safety argument `_enable=T
llava/train/transformers_replace/modeling_utils.py:174
↓ 2 callersFunctionnorm_cdf
(x)
llava/model/multimodal_encoder/siglip/modeling_siglip.py:56
↓ 2 callersFunctionparse_tar_header
(header_bytes)
llava/wids/wids_mmtar.py:31
↓ 2 callersMethodpatch_init_and_builtins
(self)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:394
↓ 2 callersFunctionplot
(args, all_accuries)
llava/eval/vision_niah_vila/eval_vision_niah.py:322
↓ 2 callersMethodpost_config
(self)
llava/model/llava_arch.py:218
↓ 2 callersFunctionpostprocess_2d_grounding
(output, h, w, box_format="llava")
llava/eval/model_refcoco.py:73
↓ 2 callersFunctionprepare_config_for_eval
(config: PretrainedConfig, kwargs: dict)
llava/model/builder.py:214
↓ 2 callersFunctionpreprocess_OCR
(image, texts: list, data_args, tokenizer)
llava/data/dataset_impl/textocr.py:217
↓ 2 callersFunctionrebase_shardlist
Rebase the URLs in a shardlist.
llava/wids/wids_specs.py:100
↓ 2 callersMethodremove_punctuation
(self, text: str)
llava/model/multimodal_encoder/siglip/tokenization_siglip.py:280
↓ 2 callersFunctionremove_stop
(sentence, stopwords)
llava/eval/video/eval_video_nextqa.py:27
↓ 2 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
llava/train/transformers_replace/models/llama/modeling_llama.py:223
↓ 2 callersMethodresize_token_embeddings
Resizes input token embeddings matrix of the model if `new_num_tokens != config.vocab_size`. Takes care of tying weights embeddings
llava/train/transformers_replace/modeling_utils.py:1699
↓ 2 callersFunctionrms_norm
(x, weight=None, eps=1e-05)
llava/model/language_model/mpt/norm.py:53
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
llava/model/language_model/modeling_mixtral_long_context.py:239
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
llava/train/transformers_replace/models/mixtral/modeling_mixtral.py:276
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
llava/train/transformers_replace/models/llama/modeling_llama.py:157
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
llava/train/transformers_replace/models/mistral/modeling_mistral.py:138
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
llava/train/transformers_replace/models/gemma/modeling_gemma.py:127
↓ 2 callersFunctionsafe_tokenize
(tokenizer, text)
llava/eval/vision_niah_vila/eval_vision_niah.py:75
↓ 2 callersMethodsave_pretrained
Saves all of the model weights
llava/trl/models/modeling_sd_base.py:130
↓ 2 callersFunctionscheduler_step
Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion process from the learned model ou
llava/trl/models/modeling_sd_base.py:186
↓ 2 callersMethodset_progress_bar_config
Sets the progress bar config for the pipeline
llava/trl/models/modeling_sd_base.py:124
↓ 2 callersMethodshow_colour_legend
Print the colour legend.
llava/trl/environment/base_environment.py:188
↓ 2 callersFunctionslice_frames
Extract frames from a video and save them to the output directory. Parameters: video_file_name (str): Path to the video file. num_fr
llava/eval/video_mme/w_sub_eval.py:53
↓ 2 callersFunctionsmart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
llava/train/train.py:157
↓ 2 callersFunctionsplitname
Returns the basename and extension of a filename
llava/wids/wids.py:97
↓ 2 callersMethodstart
(self)
llava/train/slurm_utils.py:56
↓ 2 callersMethodstate_dict
r""" Returns the state dictionary of the model. We add the state dictionary of the value head to the state dictionary of the wrapped m
llava/trl/models/modeling_value_head.py:204
↓ 2 callersMethodstep
Perform a single step of training. Args: epoch (int): The current epoch. global_step (int): The current glob
llava/trl/trainer/ddpo_trainer.py:233
↓ 2 callersMethodstore_metrics
(self, metrics: Dict[str, float], train_eval: Literal["train", "eval"] = "train")
llava/trl/trainer/dpo_trainer.py:1231
↓ 2 callersFunctionswitchQuestionAndCategory
()
llava/eval/webpage/script.js:203
↓ 2 callersMethodtask_end_check
Check if the current generation sequence has finished.
llava/trl/environment/base_environment.py:392
↓ 2 callersMethodtasks_end_check
Check if the current generation sequences have finished.
llava/trl/environment/base_environment.py:381
↓ 2 callersMethodtext_encoder
Returns the text encoder used for encoding text inputs
llava/trl/models/modeling_sd_base.py:111
↓ 2 callersMethodto
(self, *args, **kwargs)
llava/model/multimodal_encoder/radio_torchhub_encoder.py:237
↓ 2 callersMethodtokenize
(element)
llava/trl/trainer/sft_trainer.py:410
↓ 2 callersFunctiontrl_sanitze_kwargs_for_tagging
(model, tag_names, kwargs=None)
llava/trl/trainer/utils.py:665
↓ 2 callersFunctionunflatten_varlen_lse
(lse, cu_seqlens, max_seqlen: int)
llava/train/sequence_parallel/ring/utils.py:76
↓ 2 callersMethodunpatch_init_and_builtins
(self)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:590
↓ 2 callersFunctionupdateExpandButtonVisibility
(card)
llava/eval/webpage/script.js:226
↓ 2 callersFunctionupdateModelSelect
()
llava/eval/webpage/script.js:64
↓ 2 callersFunctionvariance_scaling_
(tensor, scale=1.0, mode="fan_in", distribution="normal")
llava/model/multimodal_encoder/siglip/modeling_siglip.py:115
↓ 2 callersFunctionwups
:param pred: :param truth: :param alpha: :return:
llava/eval/video/eval_video_nextqa.py:65
↓ 1 callersMethod__init__
(self, config: GemmaConfig)
llava/model/language_model/llava_gemma.py:36
↓ 1 callersMethod__init__
(self, config: MPTConfig)
llava/model/language_model/llava_mpt.py:39
↓ 1 callersMethod__init__
(self, config: MixtralConfig)
llava/model/language_model/llava_mixtral.py:37
↓ 1 callersMethod__init__
(self, config: MistralConfig)
llava/model/language_model/llava_mistral.py:38
↓ 1 callersMethod__init__
(self, d_model: int, expansion_ratio: int, device: Optional[str] = None)
llava/model/language_model/mpt/blocks.py:28
↓ 1 callersMethod__init__
(self, config: MPTConfig)
llava/model/language_model/mpt/modeling_mpt.py:55
↓ 1 callersMethod__init__
( self, d_model: int, n_heads: int, attn_impl: str = "triton", clip_qk
llava/model/language_model/mpt/attention.py:258
↓ 1 callersMethod__init__
(self, vision_tower, args, delay_load=False)
llava/model/multimodal_encoder/vision_encoder.py:31
↓ 1 callersMethod__init__
(self, model_name_or_path: str, config: PretrainedConfig, state_dict=None)
llava/model/multimodal_encoder/siglip_encoder.py:24
↓ 1 callersMethod__init__
(self, model_name_or_path: str, config: PretrainedConfig)
llava/model/multimodal_encoder/clip_encoder.py:25
↓ 1 callersMethod__init__
( self, archive, transform=None, is_valid_file=lambda m: m.isfile() and m.name
llava/data/dataset_tar.py:55
↓ 1 callersMethod__init__
( self, data_path, image_folder, tokenizer: transformers.PreTrainedTokenizer,
llava/data/dataset_impl/textocr.py:257
↓ 1 callersMethod__init__
(self, lru_size, keep=False, localname=default_localname())
llava/wids/wids.py:375
↓ 1 callersMethod__init__
(self, data_mixture: str, tokenizer: transformers.PreTrainedTokenizer, data_args: DataArguments)
llava/train/train.py:322
↓ 1 callersMethod__init__
Calculates the running mean and standard deviation of a data stream. Reference: https://github.com/OpenLMLab/MOSS-RLHF/blob/40b91eb2f
llava/trl/trainer/utils.py:480
↓ 1 callersMethod_add_tensor_creation_wrappers
(self)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:608
↓ 1 callersMethod_aligned_size_sec
(self, param)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1487
↓ 1 callersMethod_all_gather
(self, param_list, async_op=False, hierarchy=None)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1519
↓ 1 callersMethod_allgather_param
(self, param, async_op=False, hierarchy=0)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1754
↓ 1 callersMethod_allgather_params
(self, param_list, hierarchy=0)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1924
↓ 1 callersMethod_apply_prefix_mask
(self, attn_bias: torch.Tensor, prefix_mask: torch.Tensor)
llava/model/language_model/mpt/modeling_mpt.py:171
↓ 1 callersMethod_apply_sequence_id
(self, attn_bias: torch.Tensor, sequence_id: torch.LongTensor)
llava/model/language_model/mpt/modeling_mpt.py:192
↓ 1 callersMethod_attn_bias
( self, device, dtype, attention_mask: Optional[torch.ByteTensor] = None,
llava/model/language_model/mpt/modeling_mpt.py:122
↓ 1 callersMethod_backward_compatibility_gradient_checkpointing
(self)
llava/train/transformers_replace/modeling_utils.py:1205
↓ 1 callersMethod_build_index
(self)
llava/wids/wids_mmtar.py:69
↓ 1 callersMethod_check_and_enable_flash_attn_2
Checks the availability of Flash Attention 2 and compatibility with the current model. If all checks pass and `hard_check_only` is F
llava/train/transformers_replace/modeling_utils.py:1370
↓ 1 callersMethod_check_and_enable_sdpa
Checks the availability of SDPA for a given model. If all checks pass and `hard_check_only` is False, the method will set the config
llava/train/transformers_replace/modeling_utils.py:1458
↓ 1 callersFunction_clone_world_group
Create a clone of the world group Note: We need to clone the dist world group because we use dist.get_global_rank() utility function in DeepSp
llava/train/deepspeed_replace_deprecated/utils/groups.py:363
↓ 1 callersMethod_compute_answer_scores
compute the accuracy (soft score) of human answers
llava/eval/m4c_evaluator.py:223
↓ 1 callersMethod_config_check
(self)
llava/trl/trainer/ddpo_trainer.py:568
↓ 1 callersFunction_convert_bloom_causal_lm_to_prefix_lm
Converts a BLOOM Causal LM to a Prefix LM. Supported HuggingFace model classes: - `BloomForCausalLM` See `convert_hf_causal_lm_to_pr
llava/model/language_model/mpt/hf_prefixlm_converter.py:186
↓ 1 callersFunction_convert_gpt_causal_lm_to_prefix_lm
Converts a GPT-style Causal LM to a Prefix LM. Supported HuggingFace model classes: - `GPT2LMHeadModel` - `GPTNeoForCausalLM`
llava/model/language_model/mpt/hf_prefixlm_converter.py:54
↓ 1 callersMethod_convert_head_mask_to_5d
-> [num_hidden_layers x batch x num_heads x seq_length x seq_length]
llava/train/transformers_replace/modeling_utils.py:994
↓ 1 callersFunction_convert_opt_causal_lm_to_prefix_lm
Converts an OPT Causal LM to a Prefix LM. Supported HuggingFace model classes: - `OPTForCausalLM` See `convert_hf_causal_lm_to_prefi
llava/model/language_model/mpt/hf_prefixlm_converter.py:457
↓ 1 callersMethod_convert_to_deepspeed_param
(self, param)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1114
↓ 1 callersMethod_create_tar_index
(self)
llava/wids/wids_tar.py:35
↓ 1 callersFunction_dist_allgather_fn
(input_tensor: Tensor, output_tensor: Tensor, group=None)
llava/train/deepspeed_replace/runtime/zero/mics.py:32
↓ 1 callersMethod_early_stop
r""" Handles the early stopping logic. If the policy KL is greater than the target KL, then the gradient is zeroed and the optimizatio
llava/trl/trainer/ppo_trainer.py:861
← previousnext →301–400 of 1,946, ranked by callers