MCPcopy Create free account

hub / github.com/Ucas-HaoranWei/Vary / functions

Functions246 in github.com/Ucas-HaoranWei/Vary

Method__getitem__
(self, i)
Vary-master/vary/data/caption_opt.py:152
Method__init__
(self, logger, log_level=logging.INFO)
Vary-master/vary/utils/utils.py:65
Method__init__
(self, keywords, tokenizer, input_ids)
Vary-master/vary/utils/utils.py:131
Method__init__
(self, config)
Vary-master/vary/model/vary_qwen_vary.py:236
Method__init__
(self, config)
Vary-master/vary/model/vary_opt.py:201
Method__init__
(self, scale, always_apply=False, p=0.5)
Vary-master/vary/model/plug/transforms.py:41
Method__init__
(self, scale, always_apply=False, p=0.5)
Vary-master/vary/model/plug/transforms.py:75
Method__init__
(self, mean=None, std=None)
Vary-master/vary/model/plug/blip_process.py:36
Method__init__
(self, N=2, M=10, isPIL=False, augs=[])
Vary-master/vary/model/plug/blip_process.py:358
Method__init__
(self, N=2, M=10, p=0.0, tensor_in_tensor_out=True, augs=[])
Vary-master/vary/model/plug/blip_process.py:384
Method__init__
( self, image_size=384, mean=None, std=None, min_scale=0.5, max_scale=1.0 )
Vary-master/vary/model/plug/blip_process.py:437
Method__init__
(self, image_size=384, mean=None, std=None)
Vary-master/vary/model/plug/blip_process.py:477
Method__init__
( self, vocab_size=151936, hidden_size=4096, num_hidden_layers=32, num
Vary-master/vary/model/llm/qwen/configuration_qwen.py:13
Method__init__
(self, config)
Vary-master/vary/model/llm/qwen/modeling_qwen.py:108
Method__init__
(self, config)
Vary-master/vary/model/llm/qwen/modeling_qwen.py:384
Method__init__
(self, *inputs, **kwargs)
Vary-master/vary/model/llm/qwen/modeling_qwen.py:450
Method__init__
(self, config)
Vary-master/vary/model/llm/qwen/modeling_qwen.py:484
Method__init__
(self, config)
Vary-master/vary/model/llm/qwen/modeling_qwen.py:721
Method__init__
(self, dim, base=10000)
Vary-master/vary/model/llm/qwen/modeling_qwen.py:1045
Method__init__
(self, dim: int, eps: float = 1e-6)
Vary-master/vary/model/llm/qwen/modeling_qwen.py:1108
Method__init__
(self, stop_words_ids: Iterable[Iterable[int]], eos_token_id: int)
Vary-master/vary/model/llm/qwen/qwen_generation_utils.py:318
Method__init__
( self, vocab_file, errors="replace", **kwargs, )
Vary-master/vary/model/llm/qwen/tokenization_qwen.py:50
Method__init__
(self, num_embeddings: int, embedding_dim: int)
Vary-master/vary/model/llm/opt/modeling_opt.py:114
Method__init__
( self, embed_dim: int, num_heads: int, dropout: float = 0.0, is_decod
Vary-master/vary/model/llm/opt/modeling_opt.py:140
Method__init__
(self, config: OPTConfig)
Vary-master/vary/model/llm/opt/modeling_opt.py:309
Method__init__
(self, config: OPTConfig)
Vary-master/vary/model/llm/opt/modeling_opt.py:526
Method__init__
(self, config)
Vary-master/vary/model/llm/opt/modeling_opt.py:900
Method__init__
( self, embedding_dim: int, mlp_dim: int, act: Type[nn.Module] = nn.GELU,
Vary-master/vary/model/vision_encoder/sam.py:26
Method__init__
(self, num_channels: int, eps: float = 1e-6)
Vary-master/vary/model/vision_encoder/sam.py:44
Method__init__
Args: img_size (int): Input image size. patch_size (int): Patch size. in_chans (int): Number of input ima
Vary-master/vary/model/vision_encoder/sam.py:60
Method__init__
Args: dim (int): Number of input channels. num_heads (int): Number of attention heads. qkv_bias (bool):
Vary-master/vary/model/vision_encoder/sam.py:237
Method__init__
Args: kernel_size (Tuple): kernel size of the projection layer. stride (Tuple): stride of the projection layer.
Vary-master/vary/model/vision_encoder/sam.py:418
Method__init__
(self, datasets, tokenizer, multimodal_cfg)
Vary-master/vary/data/conversation_dataset_qwen.py:21
Method__init__
( self, datasets: str, tokenizer: transformers.PreTrainedTokenizer, multimoda
Vary-master/vary/data/base_dataset.py:17
Method__init__
(self, datasets, tokenizer, multimodal_cfg)
Vary-master/vary/data/caption_opt.py:22
Method__len__
(self)
Vary-master/vary/model/llm/qwen/tokenization_qwen.py:89
Method__len__
(self)
Vary-master/vary/data/base_dataset.py:64
Method_add_tokens
(self, new_tokens: Union[List[str], List[AddedToken]], special_tokens: bool = False)
Vary-master/vary/model/llm/qwen/tokenization_qwen.py:111
Method_aug
(self, img, ops, apply_or_not)
Vary-master/vary/model/plug/blip_process.py:417
Method_convert_id_to_token
Converts an id to a token, special tokens included
Vary-master/vary/model/llm/qwen/tokenization_qwen.py:194
Method_convert_token_to_id
Converts a token to an id using the vocab, special tokens included
Vary-master/vary/model/llm/qwen/tokenization_qwen.py:200
Method_decode
( self, token_ids: Union[int, List[int]], skip_special_tokens: bool = False, e
Vary-master/vary/model/llm/qwen/tokenization_qwen.py:217
Method_init_weights
Initialize the weights.
Vary-master/vary/model/llm/qwen/modeling_qwen.py:453
Method_init_weights
(self, module)
Vary-master/vary/model/llm/opt/modeling_opt.py:440
Method_mask_targets
(self, target, tokenized_lens, speakers)
Vary-master/vary/data/conversation_dataset_qwen.py:99
Function_prepare_decoder_attention_mask
(self, attention_mask, input_shape, inputs_embeds, past_key_values_length)
Vary-master/vary/utils/llama_flash_attn_monkey_patch.py:94
Method_reorder_cache
( past_key_values: Tuple[Tuple[torch.Tensor]], beam_idx: torch.Tensor )
Vary-master/vary/model/llm/qwen/modeling_qwen.py:872
Method_reorder_cache
(past, beam_idx)
Vary-master/vary/model/llm/opt/modeling_opt.py:1105
Method_safe_save
Collects the state dict and dump to disk.
Vary-master/vary/train/trainer_vit_fixlr.py:27
Method_set_gradient_checkpointing
(self, module, value=False)
Vary-master/vary/model/llm/qwen/modeling_qwen.py:476
Method_set_gradient_checkpointing
(self, module, value=False)
Vary-master/vary/model/llm/opt/modeling_opt.py:451
Method_tokenize
Converts a string in a sequence of tokens (string), using the tokenizer. Split in words for word-based vocabulary or sub-words for su
Vary-master/vary/model/llm/qwen/tokenization_qwen.py:208
Method_tokenize_fn
Tokenize a list of strings.
Vary-master/vary/data/conversation_dataset_qwen.py:74
Method_upcast_and_reordered_attn
( self, query, key, value, attention_mask=None, head_mask=None )
Vary-master/vary/model/llm/qwen/modeling_qwen.py:208
Methodapply
(self, img, **params)
Vary-master/vary/model/plug/transforms.py:49
Methodapply
(self, img, **params)
Vary-master/vary/model/plug/transforms.py:83
Methodapply
(self, img, **params)
Vary-master/vary/model/plug/transforms.py:112
Functionautocontrast_func
same output as PIL.ImageOps.autocontrast
Vary-master/vary/model/plug/blip_process.py:50
Functionbrightness_func
same output as PIL.ImageEnhance.Contrast
Vary-master/vary/model/plug/blip_process.py:160
Functionbuild_logger
(logger_name, logger_filename)
Vary-master/vary/utils/utils.py:18
Methodchat
( self, tokenizer: PreTrainedTokenizer, query: str, history: Optional[HistoryT
Vary-master/vary/model/llm/qwen/modeling_qwen.py:884
Methodchat_stream
( self, tokenizer: PreTrainedTokenizer, query: str, history: O
Vary-master/vary/model/llm/qwen/modeling_qwen.py:940
Functioncolor_func
same output as PIL.ImageEnhance.Color
Vary-master/vary/model/plug/blip_process.py:128
Functioncontrast_func
same output as PIL.ImageEnhance.Contrast
Vary-master/vary/model/plug/blip_process.py:146
Methodconvert_tokens_to_string
Converts a sequence of tokens in a single string.
Vary-master/vary/model/llm/qwen/tokenization_qwen.py:170
Methodcreate_custom_forward
(module)
Vary-master/vary/model/llm/qwen/modeling_qwen.py:663
Methodcreate_custom_forward
(module)
Vary-master/vary/model/llm/opt/modeling_opt.py:757
Methodcreate_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
Vary-master/vary/train/trainer_vit_fixlr.py:65
Methodcustom_forward
(*inputs)
Vary-master/vary/model/llm/qwen/modeling_qwen.py:664
Methodcustom_forward
(*inputs)
Vary-master/vary/model/llm/opt/modeling_opt.py:758
Functioncutout_func
(img, pad_size, replace=(0, 0, 0))
Vary-master/vary/model/plug/blip_process.py:240
Functioncutout_level_to_args
(cutout_const, MAX_LEVEL, replace_value)
Vary-master/vary/model/plug/blip_process.py:281
Methoddict
(self)
Vary-master/vary/utils/conversation.py:162
Functionequalize_func
same output as PIL.ImageOps.equalize PIL's implementation is different from cv2.equalize
Vary-master/vary/model/plug/blip_process.py:83
Methodexpand2square
(pil_img, background_color=(122, 116, 104))
Vary-master/vary/utils/conversation.py:81
Methodexpand2square
(pil_img, background_color)
Vary-master/vary/data/base_dataset.py:41
Functionf
(im)
Vary-master/vary/model/plug/transforms.py:17
Functionfind_all_linear_names
(model)
Vary-master/vary/utils/utils.py:227
Methodflush
(self)
Vary-master/vary/utils/utils.py:88
Functionforward
Input shape: Batch x Time x Channel attention_mask: [bsz, q_len]
Vary-master/vary/utils/llama_flash_attn_monkey_patch.py:15
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
Vary-master/vary/model/vary_qwen_vary.py:99
Methodforward
( self, input_ids: Optional[torch.LongTensor] = None, past_key_values: Optional[Tuple[
Vary-master/vary/model/vary_qwen_vary.py:252
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
Vary-master/vary/model/vary_opt.py:92
Methodforward
( self, input_ids: Optional[torch.LongTensor] = None, past_key_values: Optional[Tuple[
Vary-master/vary/model/vary_opt.py:219
Methodforward
( self, hidden_states: Optional[Tuple[torch.FloatTensor]], layer_past: Optional[Tuple[
Vary-master/vary/model/llm/qwen/modeling_qwen.py:274
Methodforward
(self, hidden_states)
Vary-master/vary/model/llm/qwen/modeling_qwen.py:375
Methodforward
( self, hidden_states: Optional[Tuple[torch.FloatTensor]], layer_past: Optional[Tuple[
Vary-master/vary/model/llm/qwen/modeling_qwen.py:401
Methodforward
( self, input_ids: Optional[torch.LongTensor] = None, past_key_values: Optional[Tuple[
Vary-master/vary/model/llm/qwen/modeling_qwen.py:543
Methodforward
( self, input_ids: Optional[torch.LongTensor] = None, past_key_values: Optional[Tuple[
Vary-master/vary/model/llm/qwen/modeling_qwen.py:808
Methodforward
(self, max_seq_len, offset=0, ntk_alpha=1.0)
Vary-master/vary/model/llm/qwen/modeling_qwen.py:1077
Methodforward
(self, x)
Vary-master/vary/model/llm/qwen/modeling_qwen.py:1116
Methodforward
`input_ids_shape` is expected to be [bsz x seqlen].
Vary-master/vary/model/llm/opt/modeling_opt.py:120
Methodforward
Input shape: Batch x Time x Channel
Vary-master/vary/model/llm/opt/modeling_opt.py:174
Methodforward
Args: hidden_states (`torch.FloatTensor`): input to the layer of shape `(batch, seq_len, embed_dim)` attention_mask (
Vary-master/vary/model/llm/opt/modeling_opt.py:327
Methodforward
r""" Args: input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`): Indices of input sequence toke
Vary-master/vary/model/llm/opt/modeling_opt.py:604
Methodforward
r""" Args: input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`): Indices of input sequence toke
Vary-master/vary/model/llm/opt/modeling_opt.py:933
Methodforward
(self, x: torch.Tensor)
Vary-master/vary/model/vision_encoder/sam.py:37
Methodforward
(self, x: torch.Tensor)
Vary-master/vary/model/vision_encoder/sam.py:50
Methodforward
(self, x: torch.Tensor)
Vary-master/vary/model/vision_encoder/sam.py:152
Methodforward
(self, x: torch.Tensor)
Vary-master/vary/model/vision_encoder/sam.py:215
← previousnext →101–200 of 246, ranked by callers