MCPcopy Create free account

hub / github.com/apple/ml-streambridge / functions

Functions393 in github.com/apple/ml-streambridge

Methodforward
r""" Args: inputs_embeds (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`): Optionally,
streambridge/model/multimodal_encoder/siglip_encoder.py:341
Methodforward
r""" Returns:
streambridge/model/multimodal_encoder/siglip_encoder.py:420
Methodforward
(self, hidden_state)
streambridge/model/multimodal_encoder/siglip_encoder.py:471
Methodforward
r""" Returns: Examples: ```python >>> from PIL import Image >>> import requests >>> from transformer
streambridge/model/multimodal_encoder/siglip_encoder.py:500
Methodforward
(self, images)
streambridge/model/multimodal_encoder/siglip_encoder.py:581
Methodforward_head
(self, x: torch.Tensor, pre_logits: bool = False)
streambridge/model/multimodal_encoder/oryx_vit.py:609
Functionframe_transform
( image_size: Union[int, Tuple[int, int]], rescale_factor: float = 1.0, mean: Optional
streambridge/utils.py:209
Methodget_attention_map
(self)
streambridge/model/multimodal_resampler/qformer.py:169
Methodget_attn_gradients
(self)
streambridge/model/multimodal_resampler/qformer.py:163
Methodget_classifier
(self)
streambridge/model/multimodal_encoder/oryx_vit.py:434
Methodget_device
(self)
streambridge/model/multimodal_encoder/qwen2_vit.py:1056
Methodget_dtype
(self)
streambridge/model/multimodal_encoder/qwen2_vit.py:1053
Methodget_input_embeddings
(self)
streambridge/model/multimodal_resampler/qformer.py:710
Methodget_input_embeddings
(self)
streambridge/model/multimodal_encoder/siglip_encoder.py:497
Methodget_intermediate_layers
Intermediate layer accessor (NOTE: This is a WIP experiment). Inspired by DINO / DINOv2 interface
streambridge/model/multimodal_encoder/oryx_vit.py:519
Functionget_internvl_video_stream
(video_path, sampled_fps, fix_frame_num=None, max_frame_num=None)
eval/video_utils.py:156
Functionget_model_name_from_path
(model_path)
streambridge/mm_utils.py:290
Methodget_output_embeddings
(self)
streambridge/model/multimodal_resampler/qformer.py:1155
Functionget_parameter_number
(model)
eval/utils.py:198
Methodget_prompt
(self)
streambridge/conversation.py:59
Methodget_w
(weights, keyword)
streambridge/model/llava_arch.py:111
Methodget_w
(weights, keyword)
streambridge/model/oryx_arch.py:90
Methodget_w
(weights, keyword)
streambridge/model/multimodal_resampler/vlm_attention.py:48
Methodgroup_matcher
(self, coarse: bool = False)
streambridge/model/multimodal_encoder/oryx_vit.py:423
Methodhidden_size
(self)
streambridge/model/multimodal_resampler/qformer.py:1282
Methodhidden_size
(self)
streambridge/model/multimodal_resampler/perceiver.py:95
Methodhidden_size
(self)
streambridge/model/multimodal_encoder/oryx_vit.py:827
Methodhidden_size
(self)
streambridge/model/multimodal_encoder/siglip_encoder.py:611
Methodimage_size
(self)
streambridge/model/multimodal_encoder/siglip_encoder.py:624
Functionimage_transform
( image_size: int, rescale_factor: float = 1.0, mean: Optional[Tuple[float, ...]] = No
streambridge/utils.py:175
Functionimage_transform
( image_size: int, rescale_factor: float = 1.0, mean: Optional[Tuple[float, ...]] = No
eval/utils.py:27
Functioninit_weights
(self)
streambridge/model/multimodal_encoder/oryx_vit.py:102
Functioninit_weights_vit_timm
ViT weight initialization, original timm impl (for reproducibility)
streambridge/model/multimodal_encoder/oryx_vit.py:108
Methodinitialize_vision_modules
(self, model_args, fsdp=None)
streambridge/model/qwen2vl_arch.py:29
Methodinitialize_vision_modules
(self, model_args, fsdp=None)
streambridge/model/llava_arch.py:56
Methodinitialize_vision_tokenizer
(self, model_args, tokenizer)
streambridge/model/qwen2vl_arch.py:238
Methodinitialize_vision_tokenizer
(self, model_args, tokenizer)
streambridge/model/llava_arch.py:324
Functionis_local_leader
()
streambridge/utils.py:30
Functionload_csv
(path)
streambridge/utils.py:346
Functionload_csv
(path)
eval/utils.py:188
Functionload_image
(image_file, pad=False)
streambridge/utils.py:306
Functionload_image
(image_file, pad=False)
eval/utils.py:149
Functionload_json
(path)
streambridge/utils.py:324
Functionload_jsonl
(path)
streambridge/utils.py:333
Functionload_jsonl
(path)
eval/utils.py:175
Functionload_pkl
(path)
streambridge/utils.py:341
Functionload_pkl
(path)
eval/utils.py:183
Functionload_pretrained_model
(model_path, model_base, model_name, load_8bit=False, load_4bit=False, device_map="auto", overwrite_config=Non
streambridge/model/builder.py:15
Functionload_txt
(path)
streambridge/utils.py:316
Functionload_txt
(path)
eval/utils.py:159
Methodmemroy_efficient_encode_images
(self, pixel_values, image_grid_thw, spatial_merge_size=2)
streambridge/model/qwen2vl_arch.py:63
Methodno_weight_decay
(self)
streambridge/model/multimodal_encoder/oryx_vit.py:419
Methodnum_patches
(self)
streambridge/model/multimodal_encoder/siglip_encoder.py:615
Methodnum_patches_per_side
(self)
streambridge/model/multimodal_encoder/siglip_encoder.py:619
Methodprepare_inputs_for_generation
( self, input_ids, query_embeds, past=None, attention_mask=None, **model_kwargs )
streambridge/model/multimodal_resampler/qformer.py:1108
Methodprepare_inputs_for_generation
(self, input_ids, past_key_values=None, inputs_embeds=None, **kwargs)
streambridge/model/language_model/qwen2vl_qwen.py:173
Methodprepare_inputs_for_generation
(self, input_ids, past_key_values=None, inputs_embeds=None, **kwargs)
streambridge/model/language_model/llava_qwen.py:193
Methodprepare_inputs_for_generation
(self, input_ids, past_key_values=None, inputs_embeds=None, **kwargs)
streambridge/model/language_model/oryx_qwen.py:176
Methodprepare_inputs_labels_for_multimodal
(self, input_ids, position_ids, attention_mask, past_key_values, labels, images, modalities=["image"], image_s
streambridge/model/qwen2vl_arch.py:75
Methodprepare_inputs_labels_for_multimodal
(self, input_ids, position_ids, attention_mask, past_key_values, labels, images, modalities=["image"], image_s
streambridge/model/llava_arch.py:156
Functionpretty_print_semaphore
(semaphore)
streambridge/utils.py:147
Functionprocess_anyres_highres_image_genli
(image, processor)
streambridge/mm_utils.py:221
Functionprocess_anyres_video_genli_long
(image, processor)
streambridge/mm_utils.py:213
Functionprocess_anyres_video_genli_qwen
(frame, image_processor, fix_res=-1)
streambridge/mm_utils.py:374
Functionread_frames_av
( video_path, num_frames, sample='rand', fix_start=None, max_num_frames=-1, client=None, clip
streambridge/video_utils.py:144
Functionread_frames_av
( video_path, num_frames, sample='rand', fix_start=None, max_num_frames=-1, client=None, clip
eval/video_utils.py:139
Functionread_frames_decord
( video_path, num_frames, sample='rand', fix_start=None, max_num_frames=-1, client=None, clip
streambridge/video_utils.py:74
Functionread_image_patch
(patch_info)
streambridge/mm_utils.py:250
Methodreceive_one_frame
pixel_values: [1, 3, 384, 384]
eval/streaming_models/online_llava_ov.py:171
Methodreceive_user_input
( self, text, )
eval/streaming_models/online_llava_ov.py:179
Methodreset_classifier
(self, num_classes: int, global_pool=None)
streambridge/model/multimodal_encoder/oryx_vit.py:437
Functionresize_and_center_crop
(image_path, target_size)
streambridge/utils.py:280
Functionresize_and_center_crop
(image_path, target_size)
eval/utils.py:128
Functionresize_and_pad
(image_path, target_size)
streambridge/utils.py:261
Functionresize_and_pad
(image_path, target_size)
eval/utils.py:113
Functionresize_evaclip_pos_embed
(model: VisionTransformer, interpolation: str = 'bicubic')
streambridge/model/multimodal_encoder/oryx_vit.py:686
Methodresponse
( self, **generate_kwargs, )
eval/streaming_models/online_llava_ov.py:296
Methodsave_attn_gradients
(self, attn_gradients)
streambridge/model/multimodal_resampler/qformer.py:160
Functionsave_json
(file, path)
streambridge/utils.py:329
Methodset_input_embeddings
(self, value)
streambridge/model/multimodal_resampler/qformer.py:713
Methodset_output_embeddings
(self, new_embeddings)
streambridge/model/multimodal_resampler/qformer.py:995
Methodset_output_embeddings
(self, new_embeddings)
streambridge/model/multimodal_resampler/qformer.py:1158
Methodsimple_generate
( self, inputs_embeds, attention_mask, **kwargs, )
streambridge/model/language_model/qwen2vl_qwen.py:164
Methodsimple_generate
( self, inputs_embeds, attention_mask, **kwargs, )
streambridge/model/language_model/llava_qwen.py:185
Methodsplit_list_by_sizes
(lst, sizes)
streambridge/model/oryx_arch.py:166
Methodto_gradio_chatbot
(self)
streambridge/conversation.py:251
Functiontokenizer_image_token
(prompt, tokenizer, image_token_index=IMAGE_TOKEN_INDEX, return_tensors=None)
streambridge/mm_utils.py:268
Methodtrain
(self, mode = True)
streambridge/model/multimodal_encoder/oryx_vit.py:792
Methodungroup_image_and_text
(inputs_embeds, modality_indicators)
eval/streaming_models/online_oryx.py:197
Methodungroup_image_and_text
(inputs_embeds, modality_indicators)
eval/streaming_models/online_llava_ov.py:219
Methodungroup_image_and_text
(inputs_embeds, modality_indicators)
eval/streaming_models/online_qwen2_vl.py:202
Functionviolates_moderation
Check whether the text violates OpenAI moderation API.
streambridge/utils.py:127
Methodwrite
(self, buf)
streambridge/utils.py:97
← previous301–393 of 393, ranked by callers