MCPcopy Create free account

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

Functions393 in github.com/apple/ml-streambridge

↓ 38 callersMethodfrom_pretrained
(cls, pretrained_model_name_or_path: Union[str, os.PathLike], **kwargs)
streambridge/model/multimodal_encoder/siglip_encoder.py:104
↓ 15 callersMethod__init__
(self, model_args, vision_tower)
streambridge/model/multimodal_resampler/qformer.py:1231
↓ 14 callersMethod__init__
(self, config)
streambridge/model/multimodal_encoder/qwen2_vit.py:504
↓ 11 callersMethodget_model
(self)
streambridge/model/oryx_arch.py:101
↓ 9 callersMethod__init__
(self, config)
streambridge/model/multimodal_encoder/siglip_encoder.py:245
↓ 8 callersMethodget_input_embeddings
(self)
streambridge/model/activate_videollm.py:134
↓ 7 callersMethodtranspose_for_scores
(self, x)
streambridge/model/multimodal_resampler/qformer.py:172
↓ 6 callersFunctionapply_rotary_pos_emb_vision
(tensor: torch.Tensor, freqs: torch.Tensor)
streambridge/model/multimodal_encoder/qwen2_vit.py:253
↓ 6 callersMethodget_input_embeddings
(self)
eval/streaming_models/online_oryx.py:117
↓ 6 callersMethodget_input_embeddings
(self)
eval/streaming_models/online_llava_ov.py:118
↓ 6 callersMethodget_input_embeddings
(self)
eval/streaming_models/online_qwen2_vl.py:106
↓ 6 callersMethodget_output_embeddings
(self)
streambridge/model/multimodal_resampler/qformer.py:992
↓ 6 callersMethodget_vision_tower
(self)
streambridge/model/oryx_arch.py:34
↓ 6 callersFunctionload_json
(path)
eval/utils.py:166
↓ 6 callersMethodprepare_inputs_labels_for_multimodal
Generate the input embeds with both text tokens and visual tokens. Args: input_ids (Tensor): [N, L] position_ids (Ten
streambridge/model/oryx_arch.py:107
↓ 6 callersFunctionrank0_print
(*args)
streambridge/utils.py:21
↓ 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
streambridge/model/multimodal_encoder/qwen2_vit.py:518
↓ 5 callersFunctionbuild_vision_tower
(vision_tower_cfg, **kwargs)
streambridge/model/multimodal_encoder/builder.py:10
↓ 5 callersMethodget_model
(self)
streambridge/model/qwen2vl_arch.py:38
↓ 5 callersMethodget_model
(self)
streambridge/model/llava_arch.py:122
↓ 5 callersMethodload_model
(self, device_map=None)
streambridge/model/multimodal_encoder/oryx_vit.py:775
↓ 5 callersMethodpreprocess
(self, images, return_tensors)
streambridge/model/multimodal_encoder/siglip_encoder.py:48
↓ 4 callersMethod__init__
( self, dim: int, num_heads: int, mlp_ratio: float = 4.0, qkv_bias: bo
streambridge/model/multimodal_encoder/oryx_vit.py:205
↓ 4 callersFunctionbuild_vision_projector
(config, delay_load=False, **kwargs)
streambridge/model/multimodal_projector/builder.py:151
↓ 4 callersFunctionbuild_vision_resampler
(model_args, delay_load=False, **kwargs)
streambridge/model/multimodal_resampler/builder.py:24
↓ 4 callersMethoddecide_response
(self, samples)
streambridge/model/activate_videollm.py:344
↓ 4 callersMethodinit_weights
(self, mode: Literal["jax", "jax_nlhb", "moco", ""] = "")
streambridge/model/multimodal_encoder/oryx_vit.py:410
↓ 4 callersMethodmaybe_autocast
(self)
streambridge/model/activate_videollm.py:124
↓ 4 callersMethodreceive_one_frame
pixel_values: [1, h*w, c*dim]
eval/streaming_models/online_qwen2_vl.py:154
↓ 4 callersFunctionrotate_half
Rotates half the hidden dims of the input.
streambridge/model/multimodal_encoder/qwen2_vit.py:201
↓ 4 callersFunctionsave_json
(file, path)
eval/utils.py:171
↓ 4 callersFunctiontrunc_normal_
r"""The original timm.models.layers.weight_init.trunc_normal_ can not handle bfloat16 yet, here we first convert the tensor to float32, apply the
streambridge/model/multimodal_encoder/oryx_vit.py:74
↓ 3 callersFunctionapply_multimodal_rotary_pos_emb
Applies Rotary Position Embedding with Multimodal Sections to the query and key tensors (https://qwenlm.github.io/blog/qwen2-vl/). Explanation:
streambridge/model/multimodal_encoder/qwen2_vit.py:208
↓ 3 callersMethodget_vision_tower
(self)
streambridge/model/qwen2vl_arch.py:26
↓ 3 callersMethodget_vision_tower
(self)
streambridge/model/llava_arch.py:50
↓ 3 callersMethodintialize_system_prompts
(self, system_message = 'You are a helpful assistant.')
eval/streaming_models/online_qwen2_vl.py:145
↓ 3 callersMethodload_model
(self, device_map=None)
streambridge/model/multimodal_encoder/siglip_encoder.py:568
↓ 3 callersFunctionresize_video_qwen
(image, patch_size=56)
streambridge/mm_utils.py:327
↓ 3 callersMethodsimple_generate
( self, inputs_embeds, attention_mask, **kwargs, )
streambridge/model/language_model/oryx_qwen.py:168
↓ 2 callersMethod__init__
(self, in_channels, out_channels, twoview=False)
streambridge/model/multimodal_projector/builder.py:38
↓ 2 callersMethodcopy
(self)
streambridge/conversation.py:275
↓ 2 callersMethoddownsample_4
(self, x)
streambridge/model/multimodal_resampler/perceiver.py:32
↓ 2 callersMethodencode_images_llava_ov
(self, pixel_values)
streambridge/model/activate_videollm.py:151
↓ 2 callersFunctionexpand2square
(pil_img, background_color=tuple(int(x*255) for x in OPENAI_DATASET_MEAN))
streambridge/utils.py:248
↓ 2 callersFunctionframe_transform
( image_size: Union[int, Tuple[int, int]], rescale_factor: float = 1.0, mean: Optional
eval/utils.py:61
↓ 2 callersMethodget_extended_attention_mask
Makes broadcastable attention and causal masks so that future and masked tokens are ignored. Arguments: attention_mask (
streambridge/model/multimodal_resampler/qformer.py:724
↓ 2 callersFunctionget_frame_indices
(num_frames, vlen, sample='rand', fix_start=None, input_fps=1, max_num_frames=-1)
streambridge/video_utils.py:22
↓ 2 callersFunctionget_frame_indices
(num_frames, vlen, sample='rand', fix_start=None, input_fps=1, max_num_frames=-1)
eval/video_utils.py:22
↓ 2 callersFunctionget_llava_ov_video_stream
(video_path, sampled_fps, fix_frame_num=None, max_frame_num=None)
eval/video_utils.py:234
↓ 2 callersFunctionget_oryx_video_stream
(video_path, sampled_fps, fix_frame_num=None, max_frame_num=None)
eval/video_utils.py:207
↓ 2 callersFunctionget_qwen2_vl_video_stream
(video_path, sampled_fps, fix_frame_num=None, max_frame_num=None)
eval/video_utils.py:184
↓ 2 callersMethodinclude_video_features
(self, video_features)
eval/streaming_models/online_oryx.py:120
↓ 2 callersMethodinclude_video_features
(self, video_features)
eval/streaming_models/online_llava_ov.py:121
↓ 2 callersMethodinclude_video_features
(self, video_features)
eval/streaming_models/online_qwen2_vl.py:109
↓ 2 callersMethodinitialize_vision_modules
(self, model_args, fsdp=None)
streambridge/model/oryx_arch.py:40
↓ 2 callersMethodinitialize_vision_tokenizer
(self, model_args, tokenizer)
streambridge/model/oryx_arch.py:323
↓ 2 callersFunctionis_torch_distributed
()
streambridge/utils.py:26
↓ 2 callersFunctionmy_apply_rotary_pos_emb_vision
(tensor: torch.Tensor, freqs: torch.Tensor)
streambridge/model/multimodal_encoder/qwen2_vit.py:264
↓ 2 callersFunctionnorm_cdf
(x)
streambridge/model/multimodal_encoder/oryx_vit.py:39
↓ 2 callersFunctionpad_image
Resize and pad an image to a target resolution while maintaining aspect ratio. Args: image (PIL.Image.Image): The input image.
streambridge/mm_utils.py:99
↓ 2 callersFunctionprocess_anyres_video_genli
(image, processor, fix_res=-1)
streambridge/mm_utils.py:200
↓ 2 callersMethodprocess_image
(self, image, image_process_mode, return_pil=False, image_format="PNG")
streambridge/conversation.py:190
↓ 2 callersMethodrandom_masking
Perform per-sample random masking by per-sample shuffling. Per-sample shuffling is done by argsort random noise. x: [N, L, D]
streambridge/model/multimodal_resampler/masked_drop.py:61
↓ 2 callersMethodreceive_one_frame
pixel_values: [1, 3, 384, 384]
eval/streaming_models/online_oryx.py:149
↓ 2 callersMethodreceive_user_input
( self, text, )
eval/streaming_models/online_oryx.py:158
↓ 2 callersMethodreceive_user_input
( self, text, )
eval/streaming_models/online_qwen2_vl.py:163
↓ 2 callersMethodrescale_positional_embedding
(self, out_size)
streambridge/model/multimodal_encoder/oryx_vit.py:452
↓ 2 callersFunctionresize_and_center_crop
(img, target_size)
streambridge/mm_utils.py:358
↓ 2 callersFunctionresize_images
(image, patch_size=14, base_size=896)
streambridge/mm_utils.py:119
↓ 2 callersFunctionresize_video
(image, patch_size=14, base_size=896)
streambridge/mm_utils.py:160
↓ 2 callersMethodresponse
( self, **generate_kwargs, )
eval/streaming_models/online_qwen2_vl.py:279
↓ 1 callersMethod__init__
( self, mllm='llava-ov', dtype=torch.bfloat16, max_txt_len=8*1024, lor
streambridge/model/activate_videollm.py:43
↓ 1 callersMethod__init__
(self, config: Qwen2Config)
streambridge/model/language_model/qwen2vl_qwen.py:27
↓ 1 callersMethod__init__
(self, config: Qwen2Config)
streambridge/model/language_model/llava_qwen.py:47
↓ 1 callersMethod__init__
(self, config: Qwen2Config)
streambridge/model/language_model/oryx_qwen.py:26
↓ 1 callersMethod_dynamic_frequency_update
dynamic RoPE layers should recompute `inv_freq` in the following situations: 1 - growing beyond the cached sequence length (allow sca
streambridge/model/multimodal_encoder/qwen2_vit.py:157
↓ 1 callersMethod_intermediate_layers
( self, x: torch.Tensor, n: Union[int, Sequence] = 1, )
streambridge/model/multimodal_encoder/oryx_vit.py:497
↓ 1 callersFunction_no_grad_trunc_normal_
(tensor, mean, std, a, b)
streambridge/model/multimodal_encoder/oryx_vit.py:36
↓ 1 callersMethod_pos_embed
(self, x: torch.Tensor)
streambridge/model/multimodal_encoder/oryx_vit.py:464
↓ 1 callersMethodadd_token_per_frame
(self, image_feature)
streambridge/model/llava_arch.py:143
↓ 1 callersMethodadd_token_per_frame
(self, image_feature)
eval/streaming_models/online_llava_ov.py:135
↓ 1 callersMethodapply_pooling
(self, image_features, pooling_factor)
streambridge/model/llava_arch.py:128
↓ 1 callersMethodapply_pooling
(self, image_features)
streambridge/model/activate_videollm.py:137
↓ 1 callersMethodapply_pooling
(self, image_features, pooling_factor)
eval/streaming_models/online_llava_ov.py:141
↓ 1 callersMethodbuild_Qformer
(self, vision_width, cross_attention_freq, num_query_token)
streambridge/model/multimodal_resampler/qformer.py:1247
↓ 1 callersMethodcompressor
(self, max_len, token_per_frame, inputs_embeds, modality_indicators)
eval/streaming_models/online_oryx.py:193
↓ 1 callersMethodcompressor
(self, max_len, token_per_frame, inputs_embeds, modality_indicators)
eval/streaming_models/online_llava_ov.py:215
↓ 1 callersMethodcompressor
(self, max_len, token_per_frame, inputs_embeds, modality_indicators)
eval/streaming_models/online_qwen2_vl.py:198
↓ 1 callersMethodcreate_custom_tensor
(self, current_frame_num)
streambridge/model/activate_videollm.py:180
↓ 1 callersFunctioncreate_siglip_vit
( model_name: str = "siglip_so400m_patch14_384", image_size: int = 384, select_layer: int = -1,
streambridge/model/multimodal_encoder/oryx_vit.py:698
↓ 1 callersMethoddevice
(self)
streambridge/model/activate_videollm.py:121
↓ 1 callersMethoddevice
(self)
eval/streaming_models/online_oryx.py:104
↓ 1 callersMethoddevice
(self)
eval/streaming_models/online_llava_ov.py:105
↓ 1 callersMethoddevice
(self)
eval/streaming_models/online_qwen2_vl.py:93
↓ 1 callersMethoddownsample
(self, x)
streambridge/model/multimodal_resampler/perceiver.py:29
↓ 1 callersMethodencode_images
(self, pixel_values, image_grid_thw, spatial_merge_size=2)
streambridge/model/qwen2vl_arch.py:54
↓ 1 callersMethodencode_images
(self, images, pooling_factor=4)
streambridge/model/llava_arch.py:149
↓ 1 callersMethodencode_images
(self, pixel_values)
eval/streaming_models/online_oryx.py:134
↓ 1 callersMethodencode_images
(self, pixel_values)
eval/streaming_models/online_llava_ov.py:155
↓ 1 callersMethodencode_images
(self, pixel_values, image_grid_thw, spatial_merge_size=2)
eval/streaming_models/online_qwen2_vl.py:123
next →1–100 of 393, ranked by callers