MCPcopy Create free account

hub / github.com/JavisVerse/JavisGPT / functions

Functions412 in github.com/JavisVerse/JavisGPT

↓ 26 callersFunctionrank0_print
(*args, **kwargs)
javisgpt/utils.py:24
↓ 16 callersMethod__init__
(self, config)
javisgpt/model/qwen2_5_vl/modeling_qwen2_5_vl.py:629
↓ 16 callersMethod__init__
(self, config)
javisgpt/model/qwen2_vl/modeling_qwen2_vl.py:464
↓ 16 callersMethodupdate
(self, cfg: dict)
javisgpt/model/beats/BEATs.py:65
↓ 13 callersMethodupdate
(self, data)
javisgpt/utils.py:178
↓ 12 callersMethod_shape
(self, tensor: torch.Tensor, seq_len: int, bsz: int)
javisgpt/model/blocks.py:253
↓ 9 callersMethodget_input_embeddings
(self)
javisgpt/model/qwen2_vl/modeling_qwen2_vl.py:1073
↓ 9 callersFunctionpreprocess_qwen
( sources, tokenizer: transformers.PreTrainedTokenizer, max_len=2048, system_message: str = "You are a hel
javisgpt/train/train_audio_video.py:186
↓ 9 callersFunctionprocess_video
(video_file, data_args, backend:Literal['decord', 'pyav']='decord', return_duration=False,
javisgpt/mm_utils.py:70
↓ 8 callersFunctionprocess_audio
(wav_path, audio_length_s=None, max_audio_length_s=None, audio_sr=16000)
javisgpt/mm_utils.py:28
↓ 7 callersMethodsave
(self)
javisgpt/utils.py:185
↓ 6 callersMethod__init__
(self, config, bias: bool = False)
javisgpt/model/qwen2_5_vl/modular_qwen2_5_vl.py:122
↓ 6 callersFunctionapply_rotary_pos_emb_vision
(tensor: torch.Tensor, freqs: torch.Tensor)
javisgpt/model/qwen2_vl/modeling_qwen2_vl.py:251
↓ 6 callersMethodcopy
(self)
javisgpt/conversation.py:290
↓ 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
javisgpt/model/qwen2_5_vl/modeling_qwen2_5_vl.py:689
↓ 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
javisgpt/model/qwen2_vl/modeling_qwen2_vl.py:478
↓ 5 callersFunctionget_model_and_tokenizer
( model_args, training_args, require_prev_vocab_size=False, tokenizer_only=False, maybe_merge_lora=Fa
javisgpt/train/train_audio_video.py:612
↓ 5 callersFunctionl2norm
(t)
javisgpt/model/beats/quantizer.py:21
↓ 5 callersFunctionnormal_
(data)
javisgpt/model/beats/backbone.py:768
↓ 4 callersMethod__init__
(self, input_size, output_size=None, hidden_size=None, act=nn.GELU())
javisgpt/model/blocks.py:193
↓ 4 callersMethodbatch_decode
This method forwards all its arguments to Qwen2TokenizerFast's [`~PreTrainedTokenizer.batch_decode`]. Please refer to the docstring o
javisgpt/model/processing_model.py:163
↓ 4 callersFunctionceil_by_factor
Returns the smallest integer greater than or equal to 'number' that is divisible by 'factor'.
javisgpt/model/qwenvl_vision_process.py:43
↓ 4 callersMethoddecode
This method forwards all its arguments to Qwen2TokenizerFast's [`~PreTrainedTokenizer.decode`]. Please refer to the docstring of this
javisgpt/model/processing_model.py:170
↓ 4 callersFunctionget_length_grouped_indices_auto_single
(lengths, batch_size, world_size, generator=None)
javisgpt/train/llava_trainer.py:152
↓ 4 callersMethodparse_avgen_embed
(self, hidden_states, input_ids, avgen_id=GEN_AUDIO_VIDEO_TOKEN_INDEX)
javisgpt/model/javisgpt_arch.py:825
↓ 4 callersFunctionquant_noise
Wraps modules and applies quantization noise to the weights for subsequent quantization with Iterative Product Quantization as described
javisgpt/model/beats/modules.py:121
↓ 4 callersFunctionrotate_half
Rotates half the hidden dims of the input.
javisgpt/model/qwen2_5_vl/modeling_qwen2_5_vl.py:213
↓ 4 callersFunctionround_by_factor
Returns the closest integer to 'number' that is divisible by 'factor'.
javisgpt/model/qwenvl_vision_process.py:38
↓ 4 callersFunctionsmart_pad
(x: torch.Tensor, pad_len, dim=0, mode="constant", value=0, pos:Literal["right", "left", "both"
javisgpt/model/blocks.py:38
↓ 4 callersFunctionsmart_resize
Rescales the image so that the following conditions are met: 1. Both dimensions (height and width) are divisible by 'factor'. 2. The to
javisgpt/model/qwenvl_vision_process.py:53
↓ 3 callersMethod_get_item
(self, sources: Union[List[dict], dict])
javisgpt/train/train_audio_video.py:385
↓ 3 callersMethod_prepare_4d_causal_attention_mask_with_cache_position
Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_l
javisgpt/model/qwen2_5_vl/modeling_qwen2_5_vl.py:1328
↓ 3 callersMethod_prepare_4d_causal_attention_mask_with_cache_position
Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_l
javisgpt/model/qwen2_vl/modeling_qwen2_vl.py:1274
↓ 3 callersFunctionapply_multimodal_rotary_pos_emb
Applies Rotary Position Embedding with Multimodal Sections to the query and key tensors (https://qwenlm.github.io/blog/qwen2-vl/). Explanation:
javisgpt/model/qwen2_5_vl/modeling_qwen2_5_vl.py:644
↓ 3 callersFunctionapply_multimodal_rotary_pos_emb
Applies Rotary Position Embedding with Multimodal Sections to the query and key tensors (https://qwenlm.github.io/blog/qwen2-vl/). Explanation:
javisgpt/model/qwen2_vl/modeling_qwen2_vl.py:203
↓ 3 callersFunctioncalc_zero_loss
(module: torch.nn.Module)
javisgpt/utils.py:125
↓ 3 callersMethodcheck_input_conds
(self, input_conds, is_training=True, require_mask=False)
interface/javisdit_interface.py:352
↓ 3 callersFunctiondisable_torch_init
Disable the redundant torch default initialization to accelerate model creation.
javisgpt/utils.py:115
↓ 3 callersFunctionfloor_by_factor
Returns the largest integer less than or equal to 'number' that is divisible by 'factor'.
javisgpt/model/qwenvl_vision_process.py:48
↓ 3 callersFunctionget_layernorm
(hidden_size: torch.Tensor, eps: float, affine: bool, use_kernel: bool)
javisgpt/model/blocks.py:26
↓ 3 callersFunctionget_length_grouped_indices
Return a list of indices so that each slice of `batch_size` consecutive indices correspond to elements of similar lengths. To do this, the in
javisgpt/train/llava_trainer.py:129
↓ 3 callersMethodget_output_embeddings
(self)
javisgpt/model/javisgpt_arch.py:156
↓ 3 callersFunctionmaybe_zero_3
(param, ignore_status=False, name=None)
javisgpt/train/ckpt_utils.py:10
↓ 3 callersMethodpad_sequence
(self, input_ids, batch_first, padding_value)
javisgpt/train/train_audio_video.py:525
↓ 3 callersMethodpreprocess
( self, source: torch.Tensor, fbank_mean: float = 15.41663, fb
javisgpt/model/beats/BEATs.py:116
↓ 3 callersFunctionprocess_image
(image_file, data_args, patch_min=28, pixel_max=1920*1080)
javisgpt/mm_utils.py:53
↓ 3 callersFunctionrotate_half
Rotates half the hidden dims of the input.
javisgpt/model/qwen2_vl/modeling_qwen2_vl.py:196
↓ 3 callersFunctionset_random_seed
(seed)
javisgpt/utils.py:161
↓ 2 callersMethod__init__
(self, cfg_path, video_folder='./', audio_folder='./')
interface/javisdit_interface.py:35
↓ 2 callersMethod__init__
(self, **kwargs)
javisgpt/model/javisgpt_arch.py:64
↓ 2 callersMethod__init__
(self)
javisgpt/model/beats/modules.py:44
↓ 2 callersMethod__init__
(self, args)
javisgpt/model/beats/backbone.py:27
↓ 2 callersMethod_preprocess
Preprocess an image or batch of images. Copy of the `preprocess` method from `CLIPImageProcessor`. Args: images (`ImageI
javisgpt/model/qwen2_vl/image_processing_qwen2_vl.py:198
↓ 2 callersFunctionapply_rotary_pos_emb_vision
( q: torch.Tensor, k: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor )
javisgpt/model/qwen2_5_vl/modeling_qwen2_5_vl.py:220
↓ 2 callersFunctionbuild_dataloader
(dataset, tokenizer, gt_questions, data_args=None, **kwargs)
javisgpt/eval/dataset.py:404
↓ 2 callersFunctioncreate_dynamic_module
Creates a dynamic module in the cache directory for modules.
assets/src/dynamic_modules_utils.py:65
↓ 2 callersFunctionema_inplace
(moving_avg, new, decay)
javisgpt/model/beats/quantizer.py:25
↓ 2 callersMethodencode_text
(self, texts: Union[str, List[str]])
interface/javisdit_interface.py:322
↓ 2 callersMethodextract_features
( self, source: Optional[torch.Tensor] = None, fbank: Optional[torch.Tenso
javisgpt/model/beats/BEATs.py:131
↓ 2 callersFunctionfetch_image
(ele: dict[str, str | Image.Image], size_factor: int = IMAGE_FACTOR)
javisgpt/model/qwenvl_vision_process.py:82
↓ 2 callersMethodforward_padding_mask
( self, features: torch.Tensor, padding_mask: torch.Tensor, )
javisgpt/model/beats/Tokenizers.py:109
↓ 2 callersMethodforward_padding_mask
( self, target_len: int, padding_mask: torch.Tensor, )
javisgpt/model/beats/BEATs.py:102
↓ 2 callersMethodforward_sdpa
(self, x1, x2, attention_mask_1:torch.Tensor=None, attention_mask_2:torch.Tensor=None)
javisgpt/model/blocks.py:386
↓ 2 callersMethodgenerate_audio_video_direct
(self, avgen_embeds: Union[torch.Tensor, str], embed_only=False)
javisgpt/model/javisgpt_arch.py:868
↓ 2 callersFunctionget_adapter_keys_to_match_by_stage
(args)
javisgpt/train/ckpt_utils.py:80
↓ 2 callersMethodget_audio_projector
(self)
javisgpt/model/javisgpt_arch.py:168
↓ 2 callersMethodget_avgen_cond_projector
(self)
javisgpt/model/javisgpt_arch.py:177
↓ 2 callersMethodget_avgen_query
(self)
javisgpt/model/javisgpt_arch.py:174
↓ 2 callersMethodget_avsync_projector
(self)
javisgpt/model/javisgpt_arch.py:171
↓ 2 callersMethodget_caption_embedding
(self, texts: Union[str, List[str]])
interface/javisdit_interface.py:331
↓ 2 callersMethodget_dtype
(self)
javisgpt/model/qwen2_vl/modeling_qwen2_vl.py:991
↓ 2 callersMethodget_input_embeddings
(self)
javisgpt/model/javisgpt_arch.py:150
↓ 2 callersFunctionget_peft_state_maybe_zero_3
(named_params, bias)
javisgpt/train/ckpt_utils.py:26
↓ 2 callersMethodget_prior_embedding
(self, texts: Union[str, List[str]])
interface/javisdit_interface.py:344
↓ 2 callersFunctionget_relative_imports
Get the list of modules that are relatively imported in a module file. Args: module_file (`str` or `os.PathLike`): The module file t
assets/src/dynamic_modules_utils.py:80
↓ 2 callersMethodis_image_file
(self, filename)
javisgpt/conversation.py:244
↓ 2 callersMethodpad_temporal
(self, data, padding_value=0.0)
javisgpt/train/train_audio_video.py:533
↓ 2 callersMethodprocess_image
(self, image, image_process_mode, return_pil=False, image_format="PNG")
javisgpt/conversation.py:183
↓ 2 callersFunctionsafe_save_model_for_hf_trainer
Collects the state dict and dump to disk.
javisgpt/train/ckpt_utils.py:101
↓ 2 callersMethodsample
( self, input_conds: Union[torch.Tensor, List[torch.Tensor]], image_size=None, resolution=Non
interface/javisdit_interface.py:456
↓ 2 callersFunctionsmart_nframes
calculate the number of frames for video used for model inputs. Args: ele (dict): a dict contains the configuration of video.
javisgpt/model/qwenvl_vision_process.py:127
↓ 2 callersFunctionsplit_to_even_chunks
Split a list of indices into `chunks` chunks of roughly equal lengths.
javisgpt/train/llava_trainer.py:51
↓ 1 callersMethod__init__
( self, vocab_size=152064, hidden_size=8192, intermediate_size=29568,
javisgpt/model/qwen2_5_vl/configuration_qwen2_5_vl.py:193
↓ 1 callersMethod__init__
( self, vocab_size=152064, hidden_size=8192, intermediate_size=29568,
javisgpt/model/qwen2_vl/configuration_qwen2_vl.py:167
↓ 1 callersMethod__init__
(self, num_tokens, codebook_dim, decay=0.99, eps=1e-5, kmeans_init=True, codebook_init_path='')
javisgpt/model/beats/quantizer.py:71
↓ 1 callersMethod_append_prev_key_padding_mask
( key_padding_mask: Optional[Tensor], prev_key_padding_mask: Optional[Tensor],
javisgpt/model/beats/backbone.py:690
↓ 1 callersMethod_dynamic_frequency_update
dynamic RoPE layers should recompute `inv_freq` in the following situations: 1 - growing beyond the cached sequence length (allow sca
javisgpt/model/qwen2_5_vl/modeling_qwen2_5_vl.py:585
↓ 1 callersMethod_dynamic_frequency_update
dynamic RoPE layers should recompute `inv_freq` in the following situations: 1 - growing beyond the cached sequence length (allow sca
javisgpt/model/qwen2_vl/modeling_qwen2_vl.py:152
↓ 1 callersMethod_get_image_nums_and_video_nums
Get the number of images and videos for each sample to calculate the separation length of the sample tensor. These parameters are not
javisgpt/model/qwen2_5_vl/modeling_qwen2_5_vl.py:1989
↓ 1 callersMethod_get_input_buffer
( self, incremental_state: Optional[Dict[str, Dict[str, Optional[Tensor]]]] )
javisgpt/model/beats/backbone.py:733
↓ 1 callersMethod_get_train_sampler
(self)
javisgpt/train/llava_trainer.py:279
↓ 1 callersMethod_relative_positions_bucket
(self, relative_positions, bidirectional=True)
javisgpt/model/beats/backbone.py:395
↓ 1 callersMethod_reset_parameters
(self)
javisgpt/model/blocks.py:256
↓ 1 callersMethod_save
(self, output_dir: Optional[str] = None, state_dict=None)
javisgpt/train/llava_trainer.py:441
↓ 1 callersMethod_set_input_buffer
( self, incremental_state: Dict[str, Dict[str, Optional[Tensor]]], buffer:
javisgpt/model/beats/backbone.py:743
↓ 1 callersMethod_update_causal_mask
( self, attention_mask: torch.Tensor, input_tensor: torch.Tensor, cache_positi
javisgpt/model/qwen2_5_vl/modeling_qwen2_5_vl.py:1244
↓ 1 callersMethod_update_causal_mask
( self, attention_mask: torch.Tensor, input_tensor: torch.Tensor, cache_positi
javisgpt/model/qwen2_vl/modeling_qwen2_vl.py:1197
↓ 1 callersFunctionapply_rotary_pos_emb_flashatt
( q: torch.Tensor, k: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor )
javisgpt/model/qwen2_5_vl/modular_qwen2_5_vl.py:68
↓ 1 callersFunctionapply_rotary_pos_emb_flashatt
( q: torch.Tensor, k: torch.Tensor, cos: torch.Tensor, sin: torch.Tensor )
javisgpt/model/qwen2_5_vl/modeling_qwen2_5_vl.py:163
↓ 1 callersMethodapply_sparse_mask
(self, attn_weights, tgt_len: int, src_len: int, bsz: int)
javisgpt/model/beats/backbone.py:750
next →1–100 of 412, ranked by callers