MCPcopy Create free account

hub / github.com/BAAI-DCAI/SpatialBot / functions

Functions594 in github.com/BAAI-DCAI/SpatialBot

↓ 45 callersMethodfrom_pretrained
(cls, pretrained_model_name_or_path: Union[str, os.PathLike], **kwargs)
bunny/model/multimodal_encoder/siglip/siglip_encoder.py:103
↓ 24 callersFunctiontokenizer_multi_image_token
(prompt, tokenizer, image_token_index=None,return_tensors=None)
bunny/util/mm_utils.py:46
↓ 23 callersMethodappend_message
(self, role, message)
bunny/conversation.py:132
↓ 23 callersFunctiontokenizer_image_token
(prompt, tokenizer, image_token_index=IMAGE_TOKEN_INDEX, return_tensors=None)
bunny/util/mm_utils.py:82
↓ 22 callersMethodcopy
(self)
bunny/conversation.py:217
↓ 13 callersMethodget_prompt
(self)
bunny/conversation.py:31
↓ 12 callersFunctionget_model_name_from_path
(model_path)
bunny/util/mm_utils.py:104
↓ 12 callersFunctionload_pretrained_model
(model_path, model_base, model_name, model_type, load_8bit=False, load_4bit=False, d
bunny/model/builder.py:12
↓ 12 callersMethodpreprocess
(self, images, return_tensors)
bunny/model/multimodal_encoder/siglip/siglip_encoder.py:47
↓ 12 callersMethodto_gradio_chatbot
(self)
bunny/conversation.py:186
↓ 12 callersMethodwrite
(self, buf)
bunny/util/utils.py:80
↓ 11 callersMethod__init__
(self, config)
bunny/model/language_model/phi3/modeling_phi3.py:250
↓ 10 callersMethod__init__
(self, config)
bunny/model/language_model/phi/modeling_phi.py:204
↓ 10 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None,
bunny/model/multimodal_encoder/eva_clip/eva_vit.py:192
↓ 10 callersMethoddecode
( self, token_ids, skip_special_tokens: bool = False, clean_up_tokenization_sp
bunny/model/language_model/qwen2/tokenization_qwen2.py:295
↓ 9 callersMethod__init__
(self, config)
bunny/model/language_model/llama/modeling_llama.py:488
↓ 9 callersMethod__init__
(self, config)
bunny/model/multimodal_encoder/siglip/siglip_encoder.py:258
↓ 9 callersMethodget_model
(self)
bunny/model/bunny_arch.py:76
↓ 8 callersMethod__init__
(self, config)
bunny/model/language_model/qwen2/modeling_qwen2.py:174
↓ 6 callersFunctiondisable_torch_init
Disable the redundant torch default initialization to accelerate model creation.
bunny/util/utils.py:14
↓ 6 callersMethodget_vision_tower
(self)
bunny/model/bunny_arch.py:33
↓ 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
bunny/model/language_model/qwen2/modeling_qwen2.py:189
↓ 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
bunny/model/language_model/phi3/modeling_phi3.py:269
↓ 5 callersMethod__init__
(self, config=None, projector_type='v1')
bunny/model/multimodal_projector/builder.py:96
↓ 5 callersMethodget_images
(self, return_pil=False)
bunny/conversation.py:135
↓ 5 callersFunctionprocess_images
(images, image_processor, model_cfg)
bunny/util/mm_utils.py:32
↓ 4 callersMethoddevice
(self)
bunny/model/multimodal_encoder/clip/clip_encoder.py:60
↓ 4 callersFunctionget_length_grouped_indices
(lengths, batch_size, world_size, generator=None, merge=True)
bunny/train/bunny_trainer.py:83
↓ 4 callersFunctionlength
(r)
eval/gqa/eval_gqa.py:278
↓ 4 callersMethodprepare_inputs_labels_for_multimodal
( self, input_ids, position_ids, attention_mask, past_key_values, labels, images )
bunny/model/bunny_arch.py:87
↓ 4 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
bunny/model/language_model/llama/modeling_llama.py:521
↓ 3 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
bunny/model/language_model/qwen2/modeling_qwen2.py:144
↓ 3 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
bunny/model/language_model/llama/modeling_llama.py:460
↓ 3 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
bunny/model/language_model/phi3/modeling_phi3.py:222
↓ 3 callersFunctionavg
(l)
eval/gqa/eval_gqa.py:165
↓ 3 callersFunctionbuild_logger
(logger_name, logger_filename)
bunny/util/utils.py:23
↓ 3 callersFunctioneval_single
(result_file, eval_only_type=None)
eval/seed-bench/convert_seed_for_submission.py:13
↓ 3 callersFunctionexpand2square
(pil_img, background_color)
bunny/util/mm_utils.py:18
↓ 3 callersMethodforward
(self, x)
bunny/model/language_model/llama/modeling_llama.py:498
↓ 3 callersFunctionget_index
(num_frames, num_segments)
eval/seed-bench/extract_video_frames.py:37
↓ 3 callersMethodload_model
(self)
bunny/model/multimodal_encoder/clip/clip_encoder.py:21
↓ 3 callersFunctionmaybe_zero_3
(param, ignore_status=False, name=None)
bunny/train/train.py:80
↓ 3 callersMethodupdate_post_processor
Updates the underlying post processor with the current `bos_token` and `eos_token`.
bunny/model/language_model/llama/tokenization_llama_fast.py:146
↓ 3 callersFunctionvote_last_response
(state, vote_type, model_selector, request: gr.Request)
bunny/serve/gradio_web_server.py:82
↓ 3 callersFunctionxrange
(c)
eval/gqa/eval_gqa.py:274
↓ 3 callersFunctionyrange
(c)
eval/gqa/eval_gqa.py:270
↓ 2 callersMethod_make_causal_mask
Make causal mask used for bi-directional self-attention.
bunny/model/language_model/llama/modeling_llama.py:161
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
bunny/model/language_model/qwen2/modeling_qwen2.py:114
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
bunny/model/language_model/phi/modeling_phi.py:97
↓ 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
bunny/model/language_model/phi/modeling_phi.py:174
↓ 2 callersFunctionbuild_vision_projector
(config, delay_load=False, **kwargs)
bunny/model/multimodal_projector/builder.py:135
↓ 2 callersFunctionbuild_vision_tower
(vision_tower_cfg, **kwargs)
bunny/model/multimodal_encoder/builder.py:7
↓ 2 callersMethoddict
(self)
bunny/conversation.py:228
↓ 2 callersMethodfeature_select
(self, image_forward_outs)
bunny/model/multimodal_encoder/clip/clip_encoder.py:28
↓ 2 callersMethodflush
(self)
bunny/util/utils.py:94
↓ 2 callersMethodforward_features
(self, x, return_all_features=False)
bunny/model/multimodal_encoder/eva_clip/eva_vit.py:640
↓ 2 callersFunctiongetRegion
(sceneGraph, objectId)
eval/gqa/eval_gqa.py:310
↓ 2 callersFunctionget_conv_log_filename
()
bunny/serve/gradio_web_server.py:31
↓ 2 callersFunctionget_model_list
()
bunny/serve/gradio_web_server.py:37
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
bunny/model/language_model/qwen2/tokenization_qwen2.py:73
↓ 2 callersMethodget_queue_length
(self)
bunny/serve/model_worker.py:101
↓ 2 callersMethodget_status
(self)
bunny/serve/model_worker.py:108
↓ 2 callersMethodget_worker_address
(self, model_name: str)
bunny/serve/controller.py:117
↓ 2 callersMethodget_worker_status
(self, worker_name: str)
bunny/serve/controller.py:85
↓ 2 callersFunctionintersection
(r1, r2)
eval/gqa/eval_gqa.py:288
↓ 2 callersFunctionis_none
(value)
bunny/eval/model_vqa_mmbench.py:32
↓ 2 callersFunctionloadFile
(name)
eval/gqa/eval_gqa.py:108
↓ 2 callersFunctionload_image_from_base64
(image)
bunny/util/mm_utils.py:14
↓ 2 callersFunctionpreprocess
( sources: Sequence[str], tokenizer: transformers.PreTrainedTokenizer, is_multi_image:
bunny/util/data_utils.py:771
↓ 2 callersFunctionpreprocess_bunny_with_bos
( sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False,
bunny/util/data_utils.py:678
↓ 2 callersFunctionpreprocess_multimodal
( sources: Sequence[str], data_args: DataArguments )
bunny/util/data_utils.py:149
↓ 2 callersFunctionprocess_forward_input_ids
(new_input_ids, expand_len, input_ids, start_idx, tokenizer)
bunny/util/data_utils.py:81
↓ 2 callersFunctionprocess_verse_input_ids
(new_input_ids, expand_len, input_ids, end_idx, tokenizer)
bunny/util/data_utils.py:47
↓ 2 callersMethodregister_to_controller
(self)
bunny/serve/model_worker.py:68
↓ 2 callersMethodregister_worker
(self, worker_name: str, check_heart_beat: bool, worker_status: dict)
bunny/serve/controller.py:66
↓ 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
bunny/model/language_model/phi/modeling_phi.py:219
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
bunny/model/language_model/qwen2/modeling_qwen2.py:136
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
bunny/model/language_model/phi/modeling_phi.py:166
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
bunny/model/language_model/llama/modeling_llama.py:453
↓ 2 callersFunctionrotate_half
Rotates half the hidden dims of the input.
bunny/model/language_model/phi3/modeling_phi3.py:214
↓ 2 callersFunctionrotate_half
(x)
bunny/model/multimodal_encoder/eva_clip/eva_vit.py:30
↓ 2 callersMethodsend_heart_beat
(self)
bunny/serve/model_worker.py:80
↓ 2 callersFunctiontoScore
(b)
eval/gqa/eval_gqa.py:160
↓ 2 callersMethodtokenize
Converts a string to a list of tokens. If `self.legacy` is set to `False`, a prefix token is added unless the first token is special.
bunny/model/language_model/llama/tokenization_llama.py:233
↓ 1 callersMethod__init__
(self, config: Qwen2Config)
bunny/model/language_model/bunny_qwen2.py:21
↓ 1 callersMethod__init__
(self, config: Phi3Config)
bunny/model/language_model/bunny_phi3.py:21
↓ 1 callersMethod__init__
(self, config: LlamaConfig)
bunny/model/language_model/bunny_llama.py:21
↓ 1 callersMethod__init__
(self, config: PhiConfig)
bunny/model/language_model/bunny_phi.py:21
↓ 1 callersMethod__init__
(self)
bunny/model/multimodal_encoder/eva_clip/eva_clip_encoder.py:60
↓ 1 callersMethod__init__
(self)
bunny/model/multimodal_encoder/eva_clip/eva_clip_processors.py:13
↓ 1 callersFunction_build_vision_tower
( vision_tower_path: str, embed_dim: int, vision_cfg: CLIPVisionCfg )
bunny/model/multimodal_encoder/eva_clip/eva_vit.py:772
↓ 1 callersMethod_compute_answer_scores
compute the accuracy (soft score) of human answers
bunny/eval/m4c_evaluator.py:225
↓ 1 callersMethod_expand_mask
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
bunny/model/language_model/llama/modeling_llama.py:191
↓ 1 callersMethod_flash_attention_forward
Calls the forward method of Flash Attention - if the input hidden states contain at least one padding token first unpad the input, th
bunny/model/language_model/qwen2/modeling_qwen2.py:480
↓ 1 callersMethod_flash_attention_forward
Calls the forward method of Flash Attention - if the input hidden states contain at least one padding token first unpad the input, th
bunny/model/language_model/phi/modeling_phi.py:521
↓ 1 callersMethod_flash_attention_forward
Calls the forward method of Flash Attention - if the input hidden states contain at least one padding token first unpad the input, th
bunny/model/language_model/llama/modeling_llama.py:778
↓ 1 callersMethod_flash_attention_forward
Calls the forward method of Flash Attention - if the input hidden states contain at least one padding token first unpad the input, th
bunny/model/language_model/phi3/modeling_phi3.py:581
↓ 1 callersFunction_get_unpad_data
(attention_mask)
bunny/model/language_model/qwen2/modeling_qwen2.py:68
↓ 1 callersFunction_get_unpad_data
(attention_mask)
bunny/model/language_model/phi/modeling_phi.py:69
↓ 1 callersFunction_get_unpad_data
(attention_mask)
bunny/model/language_model/llama/modeling_llama.py:340
next →1–100 of 594, ranked by callers