MCPcopy Create free account

hub / github.com/Fr0zenCrane/Cockatiel / functions

Functions1,946 in github.com/Fr0zenCrane/Cockatiel

↓ 213 callersMethodto
(self, *args, **kwargs)
llava/train/transformers_replace/modeling_utils.py:2435
↓ 152 callersMethodsize
(self)
llava/model/multimodal_encoder/intern_encoder.py:42
↓ 145 callersMethoditems
Return an iterator over the keys of the cache.
llava/wids/wids_lru.py:44
↓ 120 callersMethodto
(self, *args, **kwargs)
llava/model/multimodal_encoder/radio_encoder.py:179
↓ 82 callersMethodkeys
Return an iterator over the keys of the cache.
llava/wids/wids_lru.py:48
↓ 64 callersMethodupdate
Updates running moments from batch's moments computed across ranks
llava/trl/trainer/utils.py:492
↓ 57 callersMethodfloat
(self, *args)
llava/train/transformers_replace/modeling_utils.py:2472
↓ 41 callersMethodcopy
(self)
llava/conversation.py:236
↓ 39 callersMethodappend_message
(self, role, message)
llava/conversation.py:147
↓ 38 callersMethodcuda
(self, *args, **kwargs)
llava/train/transformers_replace/modeling_utils.py:2424
↓ 36 callersMethodfrom_pretrained
( cls, pretrained_model_name_or_path: Optional[Union[str, os.PathLike]], *model_args,
llava/model/language_model/llava_llama.py:46
↓ 34 callersMethodvalues
Return an iterator over the values of the cache.
llava/wids/wids_lru.py:52
↓ 33 callersMethoddecode
This method forwards all its arguments to SiglipTokenizer's [`~PreTrainedTokenizer.decode`]. Please refer to the docstring of this me
llava/model/multimodal_encoder/siglip/processing_siglip.py:124
↓ 32 callersFunctiontokenizer_image_token
(prompt, tokenizer, image_token_index=IMAGE_TOKEN_INDEX, return_tensors=None, lstrip=False)
llava/mm_utils.py:335
↓ 30 callersMethodsend_recv
(self, to_send: torch.Tensor, recv_tensor: Optional[torch.Tensor] = None)
llava/train/sequence_parallel/ring/utils.py:101
↓ 29 callersFunction_add_variant
(weights_name: str, variant: Optional[str] = None)
llava/train/transformers_replace/modeling_utils.py:787
↓ 29 callersMethodwrite
(self, buf)
llava/utils/utils.py:90
↓ 27 callersMethodbatch_decode
This method forwards all its arguments to SiglipTokenizer's [`~PreTrainedTokenizer.batch_decode`]. Please refer to the docstring of t
llava/model/multimodal_encoder/siglip/processing_siglip.py:131
↓ 27 callersMethodclose
Close the dataset.
llava/wids/wids.py:624
↓ 27 callersFunctionprint_rank_0
(message, debug=False, force=False)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:111
↓ 26 callersMethodstate_dict
r""" Return the state_dict of the pretrained model.
llava/trl/models/modeling_base.py:554
↓ 24 callersMethodwait
(self)
llava/train/sequence_parallel/ring/utils.py:118
↓ 23 callersMethodgenerate
Generate response with the model given the query tensor. call the `generate` method of the model. Args: query_te
llava/trl/trainer/ppo_trainer.py:430
↓ 22 callersFunctionis_peft_available
()
llava/trl/import_utils.py:23
↓ 21 callersFunctionget_model_name_from_path
(model_path)
llava/mm_utils.py:367
↓ 21 callersMethodget_prompt
(self)
llava/conversation.py:51
↓ 21 callersFunctionload_pretrained_model
( model_path, model_name, model_base=None, load_8bit=False, load_4bit=False, device_ma
llava/model/builder.py:29
↓ 21 callersFunctionprocess_image
(image_file, data_args, image_folder)
llava/mm_utils.py:278
↓ 18 callersMethodfrom_pretrained
r""" Instantiates a new model from a pretrained model from `transformers`. The pretrained model is loaded using the `from_pretrained`
llava/trl/models/modeling_base.py:105
↓ 18 callersMethodhalf
(self, *args)
llava/train/transformers_replace/modeling_utils.py:2462
↓ 18 callersMethodtokenizer
Returns the tokenizer used for tokenizing text inputs
llava/trl/models/modeling_sd_base.py:97
↓ 17 callersMethodall_gather
(param_list=None, async_op=False, hierarchy=0)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1168
↓ 17 callersMethodcommit
(self)
llava/train/sequence_parallel/ring/utils.py:113
↓ 17 callersFunctionmasked_mean
Compute mean of tensor with a masked values.
llava/trl/core.py:151
↓ 16 callersMethodadd
(self, dataset)
llava/data/dataset_impl/textocr.py:80
↓ 16 callersFunctiondisable_torch_init
Disable the redundant torch default initialization to accelerate model creation.
llava/utils/utils.py:110
↓ 16 callersFunctionmprint
(*args, **kwargs)
llava/train/utils.py:42
↓ 15 callersMethodpreprocess
Preprocess an image or batch of images. Args: images (`ImageInput`): Image to preprocess. Expects a sing
llava/model/multimodal_encoder/image_processor.py:426
↓ 14 callersMethodfrom_pretrained
(cls, pretrained_model_name_or_path: Union[str, os.PathLike], **kwargs)
llava/model/multimodal_encoder/siglip/configuration_siglip.py:118
↓ 14 callersMethodget_vision_tower
(self)
llava/model/llava_arch.py:206
↓ 13 callersMethodds_summary
(slf: torch.Tensor, use_debug_name: bool = False)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:1436
↓ 13 callersFunctionget_pg_manager
()
llava/train/sequence_parallel/globals.py:197
↓ 13 callersFunctionprocess_images
(images, image_processor, model_cfg)
llava/mm_utils.py:325
↓ 13 callersMethodsave_pretrained
(self, output_dir, state_dict=None)
llava/model/llava_arch.py:148
↓ 12 callersMethoddevice
`torch.device`: The device on which the module is (assuming that all the module parameters are on the same device).
llava/train/transformers_replace/modeling_utils.py:849
↓ 12 callersMethodget_input_embeddings
Returns the model's input embeddings. Returns: `nn.Module`: A torch module mapping vocabulary to hidden states.
llava/train/transformers_replace/modeling_utils.py:1501
↓ 12 callersMethodget_partition_dp_group
(self, param)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:2136
↓ 12 callersMethodpost_init
A method executed at the end of each Transformer model initialization, to execute code that needs the model's modules properly initia
llava/train/transformers_replace/modeling_utils.py:1197
↓ 11 callersMethod__init__
(self, config: MixtralConfig)
llava/model/language_model/modeling_mixtral_long_context.py:1136
↓ 11 callersMethod__init__
(self, config)
llava/model/multimodal_encoder/siglip/modeling_siglip.py:387
↓ 11 callersMethodautocast
Returns the autocast context manager
llava/trl/models/modeling_sd_base.py:118
↓ 10 callersMethod__init__
( self, data_path: str, tokenizer: transformers.PreTrainedTokenizer, data_args
llava/data/dataset.py:142
↓ 10 callersMethodget_llm
(self)
llava/model/llava_arch.py:196
↓ 10 callersFunctionopencv_extract_frames
Extract frames from a video using OpenCV. Args: vpath_or_bytesio (str or BytesIO): Path to the video file or BytesIO object containi
llava/mm_utils.py:201
↓ 10 callersMethodpost_init
r""" Post initialization method. This method is called after the model is instantiated and loaded from a checkpoint. It can be used to
llava/trl/models/modeling_base.py:560
↓ 10 callersFunctionupdate_out_and_lse
( out: Optional[torch.Tensor], lse: Optional[torch.Tensor], block_out: torch.Tensor, block_lse
llava/train/sequence_parallel/ring/utils.py:45
↓ 9 callersMethod__init__
(self, config: MixtralConfig)
llava/train/transformers_replace/models/mixtral/modeling_mixtral.py:1134
↓ 9 callersMethod_load_video
(video_path, num_video_frames, loader_fps, data_args, fps=None, frame_count=None)
llava/data/dataset.py:299
↓ 9 callersMethodgenerate_content
(self, prompt: Union[str, List], generation_config: Optional[GenerationConfig] = None)
llava/model/llava_arch.py:879
↓ 9 callersFunctionget_ulysses_sp_pg
Get the Ulysses sequence parallel process group.
llava/train/sequence_parallel/globals.py:236
↓ 9 callersMethodload_state_dict
r"""Loading the ZeRO-3/MiCS partitioned checkpoints Because the self.dp_process_group is replaced with the communicator for partition
llava/train/deepspeed_replace/runtime/zero/mics.py:538
↓ 9 callersMethodlog
Log `logs` on the various objects watching training. Subclass and override this method to inject custom behavior. Args:
llava/train/llava_trainer.py:763
↓ 8 callersMethod__init__
(self, drop_prob: float = 0.0, scale_by_keep: bool = True)
llava/model/multimodal_encoder/intern/modeling_intern_vit.py:226
↓ 8 callersMethod__init__
(self, config)
llava/train/transformers_replace/models/mistral/modeling_mistral.py:174
↓ 8 callersMethod__init__
(self, config)
llava/train/transformers_replace/models/gemma/modeling_gemma.py:164
↓ 8 callersMethodembed_tokens
(self, x)
llava/model/language_model/llava_mpt.py:43
↓ 8 callersFunctionfile_descriptor
(f: Union[str, IO], mode: str = "r")
llava/utils/io.py:33
↓ 8 callersMethodfrom_pretrained
r""" Instantiate a pretrained pytorch model from a pre-trained model configuration. The model is set in evaluation mode by default us
llava/train/transformers_replace/modeling_utils.py:2483
↓ 8 callersMethodget_mm_projector
(self)
llava/model/llava_arch.py:212
↓ 8 callersFunctionrank_print
(s)
llava/model/multimodal_encoder/image_processor.py:64
↓ 8 callersMethodto_dict
(self)
llava/trl/trainer/ppo_config.py:174
↓ 8 callersFunctionzero_wrapper_for_fp_tensor_constructor
(fn: Callable, target_fp_dtype: torch.dtype)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:248
↓ 7 callersMethod__init__
(self, config)
llava/train/transformers_replace/models/llama/modeling_llama.py:192
↓ 7 callersFunction_ensure_divisibility
Ensure that numerator is divisible by the denominator.
llava/train/deepspeed_replace_deprecated/utils/groups.py:60
↓ 7 callersFunction_flash_attn_backward
(do, q, k, v, o, lse, dq, dk, dv, bias=None, causal=False, softmax_scale=None)
llava/model/language_model/mpt/flash_attn_triton.py:729
↓ 7 callersFunction_flash_attn_forward
(q, k, v, bias=None, causal=False, softmax_scale=None)
llava/model/language_model/mpt/flash_attn_triton.py:655
↓ 7 callersMethodlog
Log `logs` on the various objects watching training, including stored metrics. Args: logs (`Dict[str, float]`):
llava/trl/trainer/dpo_trainer.py:1285
↓ 7 callersMethodprepare_inputs_labels_for_multimodal
( self, input_ids, position_ids, attention_mask, past_key_values, labels, images )
llava/model/llava_arch.py:267
↓ 7 callersMethodresize
Resize an image to `(size["height"], size["width"])`. Args: image (`np.ndarray`): Image to resize.
llava/model/multimodal_encoder/image_processor.py:230
↓ 7 callersMethodtie_weights
Tie the weights between the input embeddings and the output embeddings. If the `torchscript` flag is set in the configuration, can't
llava/train/transformers_replace/modeling_utils.py:1554
↓ 6 callersFunction_dist_allgather_fn
(input_tensor: Tensor, output_tensor: Tensor, group=None)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:107
↓ 6 callersMethoddequantize
(self, quantized_param, scale)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:794
↓ 6 callersMethodflush
(self)
llava/utils/utils.py:104
↓ 6 callersFunctionpreprocess
( sources: Sequence[str], tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False,
llava/data/dataset.py:120
↓ 6 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/model/language_model/modeling_mixtral_long_context.py:276
↓ 6 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/mixtral/modeling_mixtral.py:312
↓ 6 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/mistral/modeling_mistral.py:189
↓ 6 callersMethodsystem
(self)
llava/trl/models/utils.py:33
↓ 6 callersMethodwait
(self)
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:68
↓ 5 callersMethod__init__
(self, config)
llava/train/transformers_replace/modeling_utils.py:4583
↓ 5 callersFunction_cast_if_autocast_enabled
(tensor)
llava/model/language_model/mpt/norm.py:20
↓ 5 callersMethodconcatenated_forward
Run the given model on the given batch of inputs, concatenating the chosen and rejected inputs together. We do this to avoid doing two forwar
llava/trl/trainer/dpo_trainer.py:970
↓ 5 callersFunctiongeneric_param_init_fn_
( module: nn.Module, init_fn_, n_layers: int, d_model: Optional[int] = None, init_div_is_r
llava/model/language_model/mpt/param_init_fns.py:49
↓ 5 callersFunctionget_answer
(problem, options)
scripts/convert_sqa_to_llava_base_prompt.py:42
↓ 5 callersFunctionget_choice_text
(probelm, options)
scripts/convert_sqa_to_llava_base_prompt.py:32
↓ 5 callersFunctionget_client
()
llava/eval/video/utils.py:10
↓ 5 callersFunctionget_context_text
(problem, use_caption)
scripts/convert_sqa_to_llava_base_prompt.py:23
↓ 5 callersFunctionget_image_size
(img_path)
llava/eval/mathvista_utils/utilities.py:200
↓ 5 callersFunctionget_lecture_text
(problem)
scripts/convert_sqa_to_llava_base_prompt.py:46
↓ 5 callersMethodget_partition_rank
subclass can overload to specify different relative rank in parameter partition group
llava/train/deepspeed_replace_deprecated/runtime/zero/partition_parameters.py:2139
next →1–100 of 1,946, ranked by callers