MCPcopy Create free account

hub / github.com/Fr0zenCrane/Cockatiel / functions

Functions1,946 in github.com/Fr0zenCrane/Cockatiel

↓ 3 callersFunctionprocess_single_sample
(data)
llava/eval/mmmu_utils/data_utils.py:117
↓ 3 callersMethodpush_to_hub
Overwrite the `push_to_hub` method in order to force-add the tag "sft" when pushing the model on the Hub. Please refer to `~transform
llava/trl/trainer/dpo_trainer.py:1302
↓ 3 callersMethodrelease_handler
(self, key, value)
llava/wids/wids.py:389
↓ 3 callersFunctionsafely_merge_info
(out_fpath, info)
llava/data_aug/caption2qa.py:36
↓ 3 callersMethodsave_pretrained
r""" Save the pretrained model to a directory. This method is a wrapper around `transformers.PreTrainedModel.save_pretrained`. Please
llava/trl/models/modeling_base.py:525
↓ 3 callersMethodunet
Returns the 2d U-Net model used for diffusion.
llava/trl/models/modeling_sd_base.py:83
↓ 3 callersFunctionunwrap_model
Recursively unwraps a model from potential containers (as used in distributed training). Args: model (`torch.nn.Module`): The model
llava/train/transformers_replace/modeling_utils.py:4789
↓ 3 callersFunctionupdateQuestionSelect
(question_id)
llava/eval/webpage/script.js:48
↓ 3 callersFunctionurldir
Return the directory part of a url.
llava/wids/wids_index.py:49
↓ 2 callersMethod__init__
(self, normalized_shape, eps=1e-05, weight=True, dtype=None, device=None)
llava/model/language_model/mpt/norm.py:61
↓ 2 callersMethod__init__
(self, text_config=None, vision_config=None, **kwargs)
llava/model/multimodal_encoder/siglip/configuration_siglip.py:276
↓ 2 callersMethod__init__
( self, scatter_idx: int = 2, gather_idx: int = 1, use_pack_qkv: bool = False,
llava/train/sequence_parallel/hybrid_attn.py:70
↓ 2 callersMethod__init__
(self)
llava/train/sequence_parallel/globals.py:35
↓ 2 callersMethod__init__
A context manager to partition the model parameters during the model construction with MiCS partition strategy. Model states are partitioned
llava/train/deepspeed_replace_deprecated/runtime/zero/mics.py:69
↓ 2 callersMethod__init__
(self, config, **kwargs)
llava/trl/models/modeling_value_head.py:26
↓ 2 callersMethod__str__
(self)
llava/wids/wids.py:305
↓ 2 callersMethod_add_eos_if_not_present
Do not add eos again if user already added it.
llava/model/multimodal_encoder/siglip/tokenization_siglip.py:202
↓ 2 callersMethod_allgather_params_coalesced
blocking call avoid explicit memory copy in _allgather_params
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1815
↓ 2 callersFunction_bwd_kernel_one_col_block
( start_n, Q, K, V, Bias, DO, DQ, DK, DV, LSE, D, softmax_scal
llava/model/language_model/mpt/flash_attn_triton.py:298
↓ 2 callersFunction_bwd_store_dk_dv
( dk_ptrs, dv_ptrs, dk, dv, offs_n, offs_d, seqlen_k, headdim, EVEN_M: tl.
llava/model/language_model/mpt/flash_attn_triton.py:269
↓ 2 callersMethod_convert_to_zero_parameters
(self, param_list)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1062
↓ 2 callersMethod_copy_lm_head_original_to_resized
( self, new_lm_head, old_lm_head, num_tokens_to_copy, transposed, has_new_lm_head_bias )
llava/train/transformers_replace/modeling_utils.py:1956
↓ 2 callersFunction_dist_allgather_fn
(input_tensor: Tensor, output_tensor: Tensor, group=None)
llava/train/deepspeed_replace_deprecated/runtime/zero/mics.py:33
↓ 2 callersMethod_generate_batched
( self, model: PreTrainedModelWrapper, query_tensors: List[torch.Tensor], leng
llava/trl/trainer/ppo_trainer.py:506
↓ 2 callersFunction_get_attn_modules
Helper that gets a list of the model's attention modules. Each module has a `bias` buffer used for causal masking. The Prefix LM conv
llava/model/language_model/mpt/hf_prefixlm_converter.py:70
↓ 2 callersMethod_get_checkpoint_from_hub
( cls, pretrained_model, pretrained_model_name_or_path, index_filename,
llava/trl/models/modeling_base.py:337
↓ 2 callersMethod_get_summary_and_patch_from_tokens
(self, tokens)
llava/model/multimodal_encoder/radio_encoder.py:195
↓ 2 callersFunction_get_unpad_data
(attention_mask, seqlens_in_batch)
llava/train/transformers_replace/models/llama/modeling_llama.py:44
↓ 2 callersFunction_load_state_dict_into_meta_model
This is somewhat similar to `_load_state_dict_into_model`, but deals with a model that has some or all of its params on a `meta` device. It r
llava/train/transformers_replace/modeling_utils.py:657
↓ 2 callersFunction_load_state_dict_into_model
(model_to_load, state_dict, start_prefix)
llava/train/transformers_replace/modeling_utils.py:547
↓ 2 callersFunction_no_gather_coalesced
(params: Iterable[Parameter])
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:800
↓ 2 callersFunction_normal_param_init_fn_
( module: nn.Module, std: float, n_layers: int, d_model: Optional[int] = None, init_div_is
llava/model/language_model/mpt/param_init_fns.py:164
↓ 2 callersMethod_padding_size
(self, param)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1483
↓ 2 callersMethod_post_init_method
(self, module)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:371
↓ 2 callersMethod_pre_all_gather
(self, params, params_buffers=None)
llava/train/deepspeed_replace/runtime/zero/mics.py:188
↓ 2 callersMethod_pre_all_gather
(self, params, params_buffers=None)
llava/train/deepspeed_replace_deprecated/runtime/zero/mics.py:211
↓ 2 callersMethod_prepare_dataset
( self, dataset, tokenizer, packing, dataset_text_field, max_s
llava/trl/trainer/sft_trainer.py:351
↓ 2 callersFunction_reset_is_causal
(num_query_tokens: int, num_key_tokens: int, original_is_causal: bool)
llava/model/language_model/mpt/attention.py:31
↓ 2 callersMethod_set_config_defaults
(self, config, config_defaults)
llava/model/language_model/mpt/configuration_mpt.py:150
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
llava/model/language_model/modeling_mixtral_long_context.py:198
↓ 2 callersMethod_set_default_torch_dtype
Change the default dtype and return the previous one. This is needed when wanting to instantiate the model under specific dtype.
llava/train/transformers_replace/modeling_utils.py:1322
↓ 2 callersMethod_set_gradient_checkpointing
(self, enable: bool = True, gradient_checkpointing_func: Callable = checkpoint)
llava/train/transformers_replace/modeling_utils.py:2057
↓ 2 callersFunction_to_float
(text: str)
llava/eval/evaluate_vqa_score.py:27
↓ 2 callersFunction_update_out_and_lse
( out: torch.Tensor, lse: torch.Tensor, block_out: torch.Tensor, block_lse: torch.Tensor, )
llava/train/sequence_parallel/ring/utils.py:30
↓ 2 callersMethod_validate_config
(self)
llava/model/language_model/mpt/configuration_mpt.py:156
↓ 2 callersMethod_zero_init_param
(self, param)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1052
↓ 2 callersFunctionadd_dataset
(dataset)
llava/data/datasets_mixture.py:47
↓ 2 callersMethodall_gather_coalesced
( params: Iterable[Parameter], safe_mode: bool = False, quantize: bool = False )
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1218
↓ 2 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
llava/train/transformers_replace/models/llama/modeling_llama.py:164
↓ 2 callersFunctionauto_upgrade
(config)
llava/model/utils.py:76
↓ 2 callersFunctionbuild_datasets
( data_args: DataArguments, training_args: TrainingArguments, tokenizer: PreTrainedTokenizer,
llava/data/dataset.py:2406
↓ 2 callersFunctionbuild_llm_and_tokenizer
( model_name_or_path: str, config: PretrainedConfig, attn_implementation=None, model_max_lengt
llava/model/language_model/builder.py:57
↓ 2 callersFunctionbuild_mm_projector
(model_type_or_path: str, config: PretrainedConfig)
llava/model/multimodal_projector/builder.py:27
↓ 2 callersFunctionbuild_prompt_chatbot
( problems, shot_qids, prompt_format, use_caption=False, options=["A", "B", "C", "D", "E"], is_test=False
scripts/convert_sqa_to_llava_base_prompt.py:237
↓ 2 callersMethodbuild_tokenized_answer
Llama tokenizer does satisfy `enc(a + b) = enc(a) + enc(b)`. It does ensure `enc(a + b) = enc(a) + enc(a + b)[len(enc(a)):]`.
llava/trl/trainer/dpo_trainer.py:544
↓ 2 callersFunctionbuild_vision_tower
(model_name_or_path: str, config: PretrainedConfig)
llava/model/multimodal_encoder/builder.py:29
↓ 2 callersFunctioncalculate_ins_level_acc
Calculate the instruction level accuracy for given Subject results
llava/eval/mmmu_utils/eval_utils.py:259
↓ 2 callersFunctioncheck_shards
Check that a list of shards is well-formed. This checks that the list is a list of dictionaries, and that each dictionary has a "url" and a "
llava/wids/wids_specs.py:59
↓ 2 callersFunctioncheck_valid_inputs
(*tensors, valid_dtypes=[torch.float16, torch.bfloat16])
llava/model/language_model/mpt/attention.py:113
↓ 2 callersMethodcomplete
Mark the history as completed.
llava/trl/environment/base_environment.py:115
↓ 2 callersMethodcompute_reference_log_probs
Computes log probabilities of the reference model for a single padded batch of a DPO specific dataset.
llava/trl/trainer/dpo_trainer.py:752
↓ 2 callersMethodcompute_rewards
Compute per token rewards from scores and KL-penalty. Args: scores (`torch.FloatTensor`): Scores from th
llava/trl/trainer/ppo_trainer.py:1077
↓ 2 callersFunctionconversations_formatting_function
r""" return a callable function that takes in a "messages" dataset and returns a formatted dataset, based on the tokenizer apply chat template
llava/trl/extras/dataset_formatting.py:31
↓ 2 callersMethodconvert_to_zero_parameters
(param_list)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1451
↓ 2 callersFunctioncreate_data_loader
( loaded_data, image_folder, tokenizer, image_processor, model_config, conv_mode, batch_size=1, num_worker
llava/eval/model_refcoco.py:173
↓ 2 callersFunctioncreate_one_example
(format, question, context, choice, answer, lecture, solution, test_example=True)
scripts/convert_sqa_to_llava_base_prompt.py:123
↓ 2 callersFunctioncreate_one_example_gpt4
(format, question, context, choice, answer, lecture, solution, test_example=True)
scripts/convert_sqa_to_llava_base_prompt.py:178
↓ 2 callersFunctioncreate_reference_model
Creates a static reference copy of a model. Note that model will be in `.eval()` mode. Args: model (`PreTrainedModelWrapper`): The m
llava/trl/models/modeling_base.py:599
↓ 2 callersFunctiondefault_localname
(dldir="/tmp/_wids_cache")
llava/wids/wids.py:355
↓ 2 callersFunctiondisable_dropout_in_model
(model: torch.nn.Module)
llava/trl/trainer/utils.py:567
↓ 2 callersFunctiondisable_torch_init
Disable the redundant torch default initialization to accelerate model creation.
llava/utils.py:111
↓ 2 callersFunctiondisplayAnswers
(index)
llava/eval/webpage/script.js:116
↓ 2 callersFunctiondownload_and_open
(remote, local, mode="rb", handlers=default_cmds, verbose=False)
llava/wids/wids_dl.py:129
↓ 2 callersFunctiondraw_bounding_boxes
(image, bboxes, labels, color="green", width=2, fontcolor=None)
llava/eval/model_refcoco.py:43
↓ 2 callersFunctioneval_single
(annotation_file, result_file)
llava/eval/eval_textvqa.py:37
↓ 2 callersMethodforward
(self, x)
llava/train/transformers_replace/models/llama/modeling_llama.py:202
↓ 2 callersFunctionfree_param
Free underlying storage of a parameter.
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:290
↓ 2 callersMethodfrom_bytesio
(cls, file_path: str, decode_audio: bool = True, decoder: str = "pyav")
llava/data/utils.py:26
↓ 2 callersMethodgenerate
( self, input_ids: Optional[torch.FloatTensor] = None, images: Optional[torch.FloatTen
llava/model/llava_arch.py:859
↓ 2 callersMethodgenerate
Generate responses for a list of histories.
llava/trl/environment/base_environment.py:366
↓ 2 callersFunctiongenerate_and_load_tar_meta
(data_path, tar_path, cache_dir, overwrite=False)
llava/data/simple_vila_webdataset.py:55
↓ 2 callersFunctiongenerate_and_load_tar_meta
(data_path, tar_path, cache_dir, overwrite=False)
llava/data/vila_webdataset.py:37
↓ 2 callersMethodget_at_index
(self, index)
llava/wids/wids_mmtar.py:97
↓ 2 callersMethodget_at_offset
(self, offset)
llava/wids/wids_mmtar.py:90
↓ 2 callersMethodget_batch_loss_metrics
Compute the DPO loss and other metrics for the given batch of inputs for train or test. CHANGE: 1. add sft loss 2. all gather metrics
llava/trl/trainer/dpo_trainer.py:1024
↓ 2 callersFunctionget_chunk
(lst, n, k)
llava/eval/model_vqa_video.py:47
↓ 2 callersFunctionget_chunk
(lst, n, k)
llava/eval/model_vqa_nextqa.py:41
↓ 2 callersMethodget_features
(self, x: torch.Tensor)
llava/model/multimodal_encoder/radio_torchhub_encoder.py:253
↓ 2 callersMethodget_file
Read an arbitrary file from the Tar archive. Args: name (str): File name to retrieve. Returns: io.BufferedReader
llava/data/dataset_tar.py:129
↓ 2 callersFunctionget_frame_from_vcap
(vidcap, num_frames=10, max_fps=0.0, fps=None, frame_count=None, video_file_name=None)
llava/mm_utils.py:30
↓ 2 callersFunctionget_frame_from_vcap_with_fps
num_frames is the max number of frames the model can support. frame_count is the number of frames in the input video. max_fps is the max
llava/mm_utils.py:89
↓ 2 callersFunctionget_half_index
(cu_seqlens, *, front: bool)
llava/train/sequence_parallel/ring/zigzag_ring_flash_attn_varlen.py:31
↓ 2 callersFunctionget_key
(sample_set)
llava/eval/model_videochatgpt_benchmark.py:119
↓ 2 callersFunctionget_model_config
(config)
llava/model/utils.py:25
↓ 2 callersFunctionget_model_output
( model, image_processor, tokenizer, video_path, qs, conv_mode="vicuna_v1", num_vi
llava/eval/video_mme/video_eval.py:55
↓ 2 callersFunctionget_oauth_token
(p_token_url, p_client_id, p_client_secret, p_scope)
llava/3rd_party/gpt4v_nvhost_video.py:35
↓ 2 callersFunctionget_pred_idx
Get the index (e.g. 2) from the prediction (e.g. 'C')
llava/eval/eval_science_qa_gpt4.py:30
↓ 2 callersFunctionget_pred_idx
Get the index (e.g. 2) from the prediction (e.g. 'C')
llava/eval/eval_science_qa.py:30
↓ 2 callersFunctionget_ring_type
Get the RingAttn implementation type.
llava/train/sequence_parallel/globals.py:256
↓ 2 callersFunctionget_state_dict_dtype
Returns the first found floating dtype in `state_dict` if there is one, otherwise returns the first dtype.
llava/train/transformers_replace/modeling_utils.py:295
← previousnext →201–300 of 1,946, ranked by callers