MCPcopy Create free account

hub / github.com/ByteDance-Seed/Bagel / functions

Functions720 in github.com/ByteDance-Seed/Bagel

Methodforward
Args: sequence_length: length of sequence. packed_text_ids: 1-D int tensor, packed text token ids. packed
modeling/bagel/bagel.py:101
Methodforward
(self, pixel_values: torch.FloatTensor, interpolate_pos_encoding=False)
modeling/siglip/modeling_siglip.py:298
Methodforward
( self, input_ids: Optional[torch.LongTensor] = None, position_ids: Optional[torch.Lon
modeling/siglip/modeling_siglip.py:324
Methodforward
Input shape: Batch x Time x Channel
modeling/siglip/modeling_siglip.py:367
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.LongTensor] = None
modeling/siglip/modeling_siglip.py:439
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
modeling/siglip/modeling_siglip.py:524
Methodforward
Args: hidden_states (`torch.FloatTensor`): Input to the layer of shape `(batch, seq_len, embed_dim)`.
modeling/siglip/modeling_siglip.py:613
Methodforward
r""" Args: inputs_embeds (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`): Optionally,
modeling/siglip/modeling_siglip.py:840
Methodforward
r""" Returns:
modeling/siglip/modeling_siglip.py:926
Methodforward
r""" Returns: Examples: ```python >>> from transformers import AutoTokenizer, SiglipTextModel >>> model = S
modeling/siglip/modeling_siglip.py:1006
Methodforward
r""" Returns:
modeling/siglip/modeling_siglip.py:1060
Methodforward
(self, hidden_state)
modeling/siglip/modeling_siglip.py:1113
Methodforward
r""" Returns: Examples: ```python >>> from PIL import Image >>> import requests >>> from transformer
modeling/siglip/modeling_siglip.py:1147
Methodforward
r""" Returns: Examples: ```python >>> from PIL import Image >>> import requests >>> from transformer
modeling/siglip/modeling_siglip.py:1327
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the image classification/regression lo
modeling/siglip/modeling_siglip.py:1460
Methodforward
Args: img (PIL Image): Image to be resized. img_num (int): Number of images, used to change max_tokens. Retur
data/transforms.py:60
Methodfrom_pretrained
(cls, pretrained_model_name_or_path: Union[str, os.PathLike], **kwargs)
modeling/siglip/configuration_siglip.py:199
Methodfrom_text_vision_configs
r""" Instantiate a [`SiglipConfig`] (or a derived class) from siglip text model configuration and siglip vision model configuration.
modeling/siglip/configuration_siglip.py:278
Functionfull_and_noise_mask
(b, h, q_idx, kv_idx)
data/data_utils.py:17
Methodget_data_paths
(self, *args, **kwargs)
data/distributed_iterable_dataset.py:17
Methodget_decoder
(self)
modeling/qwen2/modeling_qwen2.py:839
Methodget_decoder
(self)
modeling/bagel/qwen2_navit.py:1128
Functionget_file_path
Search for a file across a directory and return its absolute path. Args: filename (Union[str, os.PathLike]): The name of the file to
eval/gen/gedit/viescore/utils.py:70
Functionget_flattened_position_ids_extrapolate
(img_h, img_w, patch_size, max_num_patches_per_side)
data/data_utils.py:53
Functionget_flattened_position_ids_interpolate
(img_h, img_w, patch_size, max_num_patches_per_side)
data/data_utils.py:61
Methodget_image_features
r""" Returns: image_features (`torch.FloatTensor` of shape `(batch_size, output_dim`): The image embeddings obtained by
modeling/siglip/modeling_siglip.py:1274
Functionget_image_size
(img_path)
eval/vlm/eval/mathvista/utilities.py:171
Methodget_input_embeddings
(self)
modeling/qwen2/modeling_qwen2.py:679
Methodget_input_embeddings
(self)
modeling/qwen2/modeling_qwen2.py:824
Methodget_input_embeddings
(self)
modeling/bagel/siglip_navit.py:386
Methodget_input_embeddings
(self)
modeling/bagel/qwen2_navit.py:1113
Methodget_input_embeddings
(self)
modeling/siglip/modeling_siglip.py:998
Methodget_input_embeddings
(self)
modeling/siglip/modeling_siglip.py:1142
Functionget_multi_choice_info
Given the list of options for multiple choice question Return the index2ans and all_choices
eval/vlm/eval/mmmu/data_utils.py:71
Methodget_output_embeddings
(self)
modeling/qwen2/modeling_qwen2.py:830
Methodget_output_embeddings
(self)
modeling/bagel/qwen2_navit.py:1119
Methodget_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
modeling/siglip/tokenization_siglip.py:151
Methodget_text_features
r""" Returns: text_features (`torch.FloatTensor` of shape `(batch_size, output_dim`): The text embeddings obtained by
modeling/siglip/modeling_siglip.py:1225
Methodget_vocab
(self)
modeling/qwen2/tokenization_qwen2.py:204
Methodget_vocab
(self)
modeling/siglip/tokenization_siglip.py:145
Functiongrad_checkpoint_check_fn
(module)
train/fsdp_utils.py:236
Functioninpainting
图像分割后随机空白部分patch,用于inpainting任务 参数: image: PIL.Image 输入图像(RGB模式) h_splits: int 行分割数(垂直方向分割块数) w_splits: int 列分割数
data/transforms.py:220
Functionis_bool_word
(text)
eval/vlm/eval/mathvista/utilities.py:126
Functionis_digit_string
(text)
eval/vlm/eval/mathvista/utilities.py:134
Functionis_float_string
(text)
eval/vlm/eval/mathvista/utilities.py:145
Functionis_str_a_list_of_ints_0_to_10
(s)
eval/gen/gedit/viescore/utils.py:108
Functionis_str_valid_score_format_brackets
(s)
eval/gen/gedit/viescore/utils.py:124
Functionload_csv
(f)
eval/gen/rise/utils.py:75
Functionload_json
(pth)
eval/gen/rise/utils.py:61
Functionload_jsonl
(f)
eval/gen/rise/utils.py:64
Functionload_pkl
(pth)
eval/gen/rise/utils.py:58
Functionload_tsv
(f)
eval/gen/rise/utils.py:78
Functionload_xlsx
(f)
eval/gen/rise/utils.py:72
Functionload_yaml
(file_path)
eval/vlm/eval/mmmu/data_utils.py:87
Functionmerge_images
Merge multiple images into one image Args: image_links (List, optional): List of image links. Defaults to []. Returns:
eval/gen/gedit/viescore/mllm_tools/utils.py:30
Methodmodel_input_names
(self)
modeling/siglip/processing_siglip.py:128
Functionmotion_blur_opencv
(image, kernel_size=15, angle=0)
data/transforms.py:144
Methodnum_layers
(self)
modeling/bagel/qwen2_navit.py:213
Functionparse_multi_choice_response
Parse the prediction from the generated response. Return the predicted index e.g., A, B, C, D.
eval/vlm/eval/mmmu/eval_utils.py:22
Methodparse_row
(self, row)
data/interleave_datasets/edit_dataset.py:21
Functionpil_image_to_base64
(pil_image, format="PNG")
eval/gen/gedit/viescore/mllm_tools/utils.py:7
Methodpin_memory
(self)
data/dataset_base.py:517
Functionpost_process
(response)
eval/vlm/eval/vqa/evaluate_vqa.py:300
Methodprepare_for_tokenization
(self, text, **kwargs)
modeling/qwen2/tokenization_qwen2.py:326
Functionprepare_img
()
modeling/siglip/convert_siglip_to_hf.py:225
Methodpreprocess
Preprocess an image or batch of images. Args: images (`ImageInput`): Image to preprocess. Expects a sing
modeling/siglip/image_processing_siglip.py:100
Functionprocess_edit_image
(image, prompt, show_thinking, cfg_text_scale, cfg_img_scale, cfg_interval,
app.py:431
Functionprocess_image_eval
Thread worker: evaluate a single image and save results
eval/gen/kris/metrics_knowledge.py:403
Functionprocess_image_eval
Thread worker: evaluate a single image and save results
eval/gen/kris/metrics_common.py:326
Functionprocess_image_eval
Helper for threaded evaluation of a single image.
eval/gen/kris/metrics_view_change.py:283
Functionprocess_multi_element_image_eval
Thread worker: evaluate one image, save results and return packaged data.
eval/gen/kris/metrics_multi_element.py:315
Functionprocess_problem
(pid, results, label, args)
eval/vlm/eval/mathvista/extract_answer_mp.py:87
Functionprocess_prompt
(prompt_id, prompt_data, config)
eval/gen/wise/gpt_eval_mp.py:197
Functionprocess_single_item
(key, item, result_img_folder, origin_img_root, prompts, output_jsonl_path)
eval/gen/imgedit/basic_bench.py:90
Functionprocess_single_item
(item, vie_score, max_retries=10000)
eval/gen/gedit/test_gedit_score.py:24
Functionprocess_temporal_image_eval
Thread worker: evaluate and package results for one image.
eval/gen/kris/metrics_temporal_prediction.py:361
Functionprocess_text_to_image
(prompt, show_thinking, cfg_text_scale, cfg_interval, timestep_shift,
app.py:339
Functionprocess_understanding
(image, prompt, show_thinking, do_sample, text_temperature, max_new_tokens)
app.py:485
Functionread_csv
(file)
eval/vlm/eval/mathvista/utilities.py:30
Functionread_file_to_string
Reads the contents of a text file and returns it as a string. :param file_path: The path to the text file. :return: A string containing
eval/gen/gedit/viescore/utils.py:31
Functionread_files_to_string
Reads the contents of multiple text files and returns them as a single string, with each file's contents separated by a newline. :param
eval/gen/gedit/viescore/utils.py:48
Functionread_frames_decord
(video_path, num_frames, sample='rand', fix_start=None, clip=None, min_num_frames=4)
data/video_utils.py:63
Functionread_frames_folder
(video_path, num_frames, sample='rand', fix_start=None, min_num_frames=4)
data/video_utils.py:98
Functionread_jsonl
(file)
eval/vlm/eval/mathvista/utilities.py:50
Functionread_pandas_csv
(csv_path)
eval/vlm/eval/mathvista/utilities.py:38
Functionread_pickle
(path)
eval/vlm/eval/mathvista/utilities.py:56
Functionremove_noise_mask
(b, h, q_idx, kv_idx)
data/data_utils.py:20
Functionsample_mask
(b, h, q_idx, kv_idx)
data/data_utils.py:23
Functionsample_mp4_frames
(mp4_p, n_frames=None, fps=None, return_frame_indices=False, random_sample=False)
data/video_utils.py:135
Functionsample_mp4_frames_by_indices
(mp4_p, frame_indices: list)
data/video_utils.py:157
Functionsave_args
(args, path_dir)
eval/vlm/eval/mmmu/data_utils.py:139
Functionsave_array_img
(path, image)
eval/vlm/eval/mathvista/utilities.py:66
Functionsave_json
(filename, ds)
eval/vlm/eval/mmmu/data_utils.py:66
Functionsave_jsonl
Save a dictionary of data to a JSON Lines file with the filename as key and caption as value. Args: filename (str): The path to the
eval/vlm/eval/mmmu/data_utils.py:121
Methodsave_vocabulary
(self, save_directory: str, filename_prefix: Optional[str] = None)
modeling/qwen2/tokenization_qwen2_fast.py:121
Methodsave_vocabulary
(self, save_directory: str, filename_prefix: Optional[str] = None)
modeling/qwen2/tokenization_qwen2.py:297
Methodsave_vocabulary
(self, save_directory: str, filename_prefix: Optional[str] = None)
modeling/siglip/tokenization_siglip.py:349
Methodseq_lens
(self)
modeling/bagel/qwen2_navit.py:217
Methodset_decoder
(self, decoder)
modeling/qwen2/modeling_qwen2.py:836
Methodset_decoder
(self, decoder)
modeling/bagel/qwen2_navit.py:1125
← previousnext →601–700 of 720, ranked by callers