MCPcopy Create free account

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

Functions720 in github.com/ByteDance-Seed/Bagel

↓ 38 callersMethodforward_cache_update_text
( self, past_key_values: NaiveCache, packed_text_ids: torch.IntTensor, packed_
modeling/bagel/bagel.py:267
↓ 38 callersMethodprepare_prompts
(self, curr_kvlens, curr_rope, prompts, tokenizer, new_token_ids)
modeling/bagel/bagel.py:232
↓ 30 callersMethoddecode
(self, z: Tensor)
modeling/autoencoder.py:320
↓ 20 callersFunctionmove_generation_input_to_device
(generation_input, device)
eval/gen/gen_images_mp_rise.py:33
↓ 20 callersFunctionmove_generation_input_to_device
(generation_input, device)
eval/gen/gen_images_mp_kris.py:33
↓ 20 callersFunctionmove_generation_input_to_device
(generation_input, device)
eval/gen/gen_images_mp_imgedit.py:33
↓ 20 callersFunctiontrans_to_percent
(s)
eval/gen/rise/gpt_eval.py:484
↓ 19 callersMethodprepare_vae_latent_cfg
(self, curr_kvlens, curr_rope, image_sizes)
modeling/bagel/bagel.py:610
↓ 16 callersMethodfrom_pretrained
(cls, pretrained_model_name_or_path: Union[str, os.PathLike], **kwargs)
modeling/siglip/configuration_siglip.py:103
↓ 15 callersFunctionpil_img2rgb
(image)
data/data_utils.py:118
↓ 13 callersMethod__init__
(self, config)
modeling/siglip/modeling_siglip.py:589
↓ 12 callersMethodencode
(self, x: Tensor)
modeling/autoencoder.py:315
↓ 11 callersMethodgenerate_image
( self, packed_text_ids: torch.LongTensor, packed_text_indexes: torch.LongTensor,
modeling/bagel/bagel.py:644
↓ 11 callersMethodprepare_vae_latent
(self, curr_kvlens, curr_rope, image_sizes, new_token_ids)
modeling/bagel/bagel.py:552
↓ 10 callersFunctionmove_generation_input_to_device
(generation_input, device)
eval/gen/gedit/gen_images_gedit.py:30
↓ 9 callersFunctionadd_special_tokens
(tokenizer)
data/data_utils.py:130
↓ 9 callersFunctionbuild_transform
()
eval/vlm/utils.py:66
↓ 9 callersMethodchat
( self, tokenizer, new_token_ids, image_transform, images, pro
modeling/bagel/bagel.py:1004
↓ 9 callersMethodconvert_conv2d_to_linear
(self, config, meta=False)
modeling/bagel/siglip_navit.py:167
↓ 9 callersFunctionextract
(answer)
eval/gen/rise/gpt_eval.py:257
↓ 9 callersFunctionextract_score_and_reason
Generic extractor for score/reason pair: - Try JSON parsing first - Fallback to regex patterns if JSON fails
eval/gen/kris/metrics_common.py:193
↓ 9 callersMethodforward_cache_update_vit
( self, past_key_values: NaiveCache, packed_text_ids: torch.LongTensor, packed
modeling/bagel/bagel.py:362
↓ 9 callersFunctionload_model_and_tokenizer
(args)
eval/vlm/utils.py:30
↓ 9 callersFunctionmove_generation_input_to_device
(generation_input, device)
eval/gen/gen_images_mp_wise.py:32
↓ 9 callersMethodprepare_vit_images
(self, curr_kvlens, curr_rope, images, transforms, new_token_ids)
modeling/bagel/bagel.py:299
↓ 9 callersFunctionprocess_conversation
(images, conversation)
eval/vlm/utils.py:85
↓ 8 callersMethod__init__
(self, config)
modeling/bagel/siglip_navit.py:248
↓ 8 callersMethod__init__
(self, num_layers)
modeling/bagel/qwen2_navit.py:208
↓ 8 callersMethodforward_cache_update_vae
( self, vae_model, past_key_values: NaiveCache, padded_images: torch.Tensor,
modeling/bagel/bagel.py:491
↓ 8 callersMethodforward_inference
( self, packed_query_sequence: torch.Tensor, query_lens: torch.Tensor, packed_
modeling/bagel/qwen2_navit.py:1018
↓ 8 callersFunctionload_ae
(local_path: str)
modeling/autoencoder.py:339
↓ 8 callersMethodprepare_vae_images
(self, curr_kvlens, curr_rope, images, transforms, new_token_ids, timestep=0)
modeling/bagel/bagel.py:417
↓ 8 callersMethodto_dict
(self)
data/dataset_base.py:577
↓ 8 callersFunctionwith_article
(name: str)
eval/gen/geneval/prompts/create_prompts.py:30
↓ 7 callersMethod__init__
( self, resolution: int, in_channels: int, ch: int, ch_mult: list[int]
modeling/autoencoder.py:123
↓ 7 callersMethod__init__
(self, config)
modeling/qwen2/modeling_qwen2.py:191
↓ 7 callersMethodgenerate_text
( self, past_key_values: NaiveCache, packed_key_value_indexes: torch.LongTensor,
modeling/bagel/bagel.py:930
↓ 7 callersMethodprepare_start_tokens
(self, curr_kvlens, curr_rope, new_token_ids)
modeling/bagel/bagel.py:909
↓ 6 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
modeling/qwen2/modeling_qwen2.py:162
↓ 6 callersFunctionpad_sequence
(tensor, pad_size)
modeling/bagel/qwen2_navit.py:230
↓ 5 callersFunctionsave_json
(data, path)
eval/vlm/eval/mathvista/utilities.py:61
↓ 5 callersMethodupdate_context_text
(self, text, gen_context)
inferencer.py:40
↓ 4 callersMethod_add_image
(self, data, image, need_loss, need_vae, need_vit, enable_cfg=True)
data/interleave_datasets/interleave_t2i_dataset.py:36
↓ 4 callersFunctionapply_scale
(width, height, scale)
eval/gen/gen_images_mp_rise.py:41
↓ 4 callersFunctionapply_scale
(width, height, scale)
eval/gen/gen_images_mp_kris.py:41
↓ 4 callersFunctionapply_scale
(width, height, scale)
eval/gen/gen_images_mp_imgedit.py:41
↓ 4 callersFunctiondump
(data, f, **kwargs)
eval/gen/rise/utils.py:31
↓ 4 callersFunctionevaluate_with_gpt
Call GPT with images/text and retry on failure.
eval/gen/kris/metrics_view_change.py:174
↓ 4 callersFunctionload
(f, fmt=None)
eval/gen/rise/utils.py:57
↓ 4 callersMethodprepare_prompt
(self, image_links: List = [], text_prompt: str = "")
eval/gen/gedit/viescore/mllm_tools/openai.py:112
↓ 4 callersFunctionread_json
(path)
eval/vlm/eval/mathvista/utilities.py:45
↓ 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
modeling/qwen2/modeling_qwen2.py:205
↓ 4 callersMethodset_epoch
(self, seed)
data/dataset_base.py:157
↓ 4 callersFunctionswish
(x: Tensor)
modeling/autoencoder.py:34
↓ 3 callersMethod_apply_scale
(self, width, height, scale)
data/transforms.py:53
↓ 3 callersFunctioncache_init
Initialization for cache.
modeling/cache_utils/taylorseer.py:119
↓ 3 callersFunctioncalculate_wiscore
(consistency, realism, aesthetic_quality)
eval/gen/wise/cal_score.py:10
↓ 3 callersFunctionencode_image_to_base64
Encode image to base64 string.
eval/gen/kris/metrics_view_change.py:165
↓ 3 callersMethodevaluate
(self, image_prompts, text_prompt, extract_overall_score_only=False, extract_all_score=True, echo_output=False
eval/gen/gedit/viescore/__init__.py:37
↓ 3 callersFunctionevaluate_with_gpt
Send a chat completion request with prompt and optional images, with retry logic. Returns GPT response content or empty string on failure.
eval/gen/kris/metrics_knowledge.py:172
↓ 3 callersFunctionevaluate_with_gpt
Send chat completion request with text+image inputs, retry up to 3 times Returns assistant's content or empty string on failure
eval/gen/kris/metrics_common.py:234
↓ 3 callersMethodget_data_paths_per_worker
(self)
data/distributed_iterable_dataset.py:40
↓ 3 callersMethodget_parsed_output
(self, prompt)
eval/gen/gedit/viescore/mllm_tools/openai.py:137
↓ 3 callersFunctiongpt_generate
(inputs, temperature=0, max_tokens=4096, image_size=768, **kwargs)
eval/gen/rise/gpt_eval.py:40
↓ 3 callersMethodload_from_df
(self, idx, key)
eval/vlm/eval/mmbench/evaluate_mmbench.py:131
↓ 3 callersFunctionmove_generation_input_to_device
(generation_input, device)
eval/gen/gen_images_mp.py:22
↓ 3 callersFunctionnormalize_str
Normalize the str to lower case and make them float numbers if possible.
eval/vlm/eval/mmmu/eval_utils.py:90
↓ 3 callersFunctionset_seed
Set random seeds for reproducibility
app.py:146
↓ 3 callersMethodset_sequence_status
(self)
data/dataset_base.py:161
↓ 2 callersMethod__init__
(self, in_dim: int, out_dim: int, hidden_act: str)
modeling/bagel/modeling_utils.py:114
↓ 2 callersMethod__init__
(self, text_config=None, vision_config=None, **kwargs)
modeling/siglip/configuration_siglip.py:261
↓ 2 callersMethod_add_eos_if_not_present
Do not add eos again if user already added it.
modeling/siglip/tokenization_siglip.py:180
↓ 2 callersMethod_add_text
(self, data, text, need_loss, enable_cfg=True)
data/interleave_datasets/interleave_t2i_dataset.py:21
↓ 2 callersFunction_apply_scale
(width, height, scale)
eval/gen/gedit/gen_images_gedit.py:164
↓ 2 callersMethod_forward_one_side
(self, grid, inv_freq)
modeling/bagel/siglip_navit.py:124
↓ 2 callersFunction_make_divisible
Ensure the value is divisible by the stride.
eval/gen/gen_images_mp_rise.py:42
↓ 2 callersFunction_make_divisible
Ensure the value is divisible by the stride.
eval/gen/gen_images_mp_kris.py:42
↓ 2 callersFunction_make_divisible
Ensure the value is divisible by the stride.
eval/gen/gen_images_mp_imgedit.py:42
↓ 2 callersFunction_make_divisible
Ensure the value is divisible by the stride.
eval/gen/gedit/gen_images_gedit.py:160
↓ 2 callersMethod_make_divisible
Ensure the value is divisible by the stride.
data/transforms.py:49
↓ 2 callersFunction_to_float
(text: str)
eval/vlm/eval/vqa/evaluate_vqa.py:174
↓ 2 callersFunctionapply_rotary_pos_emb
(q, k, cos, sin)
modeling/bagel/siglip_navit.py:136
↓ 2 callersMethodattention
(self, h_: Tensor)
modeling/autoencoder.py:50
↓ 2 callersFunctioncalculate_ins_level_acc
Calculate the instruction level accuracy for given Subject results
eval/vlm/eval/mmmu/eval_utils.py:266
↓ 2 callersFunctionconvert_image_to_base64
(file_content)
eval/gen/gedit/viescore/mllm_tools/qwen25vl_eval.py:25
↓ 2 callersFunctioncount_parameters
(module: torch.nn.Module)
train/pretrain_unified_navit.py:42
↓ 2 callersFunctioncreate_logger
Create a logger that writes to a log file and stdout.
train/train_utils.py:8
↓ 2 callersMethodcuda
(self, device)
data/dataset_base.py:547
↓ 2 callersMethoddecode
( self, token_ids, skip_special_tokens: bool = False, clean_up_tokenization_sp
modeling/qwen2/tokenization_qwen2.py:278
↓ 2 callersMethoddecode
This method forwards all its arguments to SiglipTokenizer's [`~PreTrainedTokenizer.decode`]. Please refer to the docstring of this me
modeling/siglip/processing_siglip.py:112
↓ 2 callersFunctionencode_image_to_base64
Read an image file and return its base64-encoded string (or None on error).
eval/gen/kris/metrics_knowledge.py:163
↓ 2 callersFunctionencode_image_to_base64
Encode image file to base64 string.
eval/gen/kris/metrics_temporal_prediction.py:162
↓ 2 callersFunctionencode_image_to_base64
Read image file and return base64-encoded string
eval/gen/kris/metrics_common.py:164
↓ 2 callersFunctionencode_image_to_base64
Encode an image file to a base64 string.
eval/gen/kris/metrics_multi_element.py:161
↓ 2 callersFunctionevaluate_multi_element_with_gpt
Call GPT with 3 reference images and 1 predicted image in one shot.
eval/gen/kris/metrics_multi_element.py:170
↓ 2 callersFunctionevaluate_temporal_with_gpt
Send reference frames + predicted frame to GPT and return its response. Frames are sent in numerical order with the predicted frame inserted
eval/gen/kris/metrics_temporal_prediction.py:180
↓ 2 callersFunctionextract_consistency_score_and_reason
(response)
eval/gen/kris/metrics_common.py:210
↓ 2 callersFunctionextract_instruction_score_and_reason
(response)
eval/gen/kris/metrics_common.py:218
↓ 2 callersFunctionextract_quality_score_and_reason
(response)
eval/gen/kris/metrics_common.py:226
↓ 2 callersMethodfsdp_save_ckpt
( ckpt_dir, train_steps, model, ema_model, optimizer, sch
train/fsdp_utils.py:88
next →1–100 of 720, ranked by callers