MCPcopy Create free account

hub / github.com/csuhan/OneLLM / functions

Functions248 in github.com/csuhan/OneLLM

↓ 107 callersFunctionprint
(*args, **kwargs)
util/misc.py:191
↓ 18 callersMethodappend_message
(self, role, message)
data/conversation_lib.py:62
↓ 18 callersMethodload_state_dict
(self, state_dict)
util/misc.py:339
↓ 14 callersMethodget_prompt
(self)
data/conversation_lib.py:27
↓ 13 callersFunctionsetup_for_distributed
This function disables printing when not in master process
util/misc.py:185
↓ 10 callersMethodcopy
(self)
data/conversation_lib.py:145
↓ 9 callersMethodupdate
(self, **kwargs)
util/misc.py:106
↓ 8 callersMethodencode
(self, s: str, bos: bool, eos: bool)
model/tokenizer.py:30
↓ 8 callersMethodgenerate
( self, prompts: List[str], images, max_gen_len: int, temperature: flo
model/meta.py:59
↓ 7 callersMethod__init__
( self, in_size: int, out_size: int, *, activation
model/lib/pointnet2/pytorch_utils.py:202
↓ 6 callersMethoddecode
(self, t: List[int])
model/tokenizer.py:39
↓ 4 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU)
model/LLM/onellm.py:210
↓ 4 callersFunctionmake_audio_features
(wav_name, mel_bins=128, target_length=1024, aug=False)
data/data_utils.py:66
↓ 4 callersMethodstate_dict
(self)
util/misc.py:336
↓ 4 callersFunctiontoms
(value)
data/imu_utils.py:103
↓ 3 callersMethod__init__
:param mlp: list of int, spec of the pointnet before the global max_pool :param npoint: int, number of features :param radius
model/lib/pointnet2/pointnet2_modules.py:98
↓ 3 callersFunctionget_imu_frames
Given a IMU signal return the frames between video_start_sec and video_end_sec
data/imu_utils.py:166
↓ 3 callersFunctionis_dist_avail_and_initialized
()
util/misc.py:202
↓ 3 callersMethodmax
(self)
util/misc.py:85
↓ 2 callersMethod__init__
(self, neighbors, transpose_mode=True)
model/lib/point_utils.py:7
↓ 2 callersMethodadd_meter
(self, name, meter)
util/misc.py:135
↓ 2 callersMethodbackward
:param ctx: :param grad_out: (B, C, npoint, nsample) tensor of the gradients of the output from forward :return:
model/lib/point_utils.py:50
↓ 2 callersMethodcumsum
(sequence)
data/pretrain_dataset.py:283
↓ 2 callersFunctiondelta
Compute the absolute value of the difference of two numbers
data/imu_utils.py:107
↓ 2 callersMethodencode_image
(self, x, modal='image')
model/LLM/onellm.py:364
↓ 2 callersMethodforward_inference
(self, tokens: torch.Tensor, start_pos: int, image=None, modal='image')
model/LLM/onellm.py:449
↓ 2 callersFunctionget_1d_sincos_pos_embed_from_grid
embed_dim: output dimension for each position pos: a list of positions to be encoded: size (M,) out: (M, D)
util/pos_embed.py:48
↓ 2 callersMethodget_tensor_type
(dtype: torch.dtype, device: str)
util/misc.py:507
↓ 2 callersMethodlog_every
(self, iterable, print_freq, header=None, start_iter=0)
util/misc.py:138
↓ 2 callersFunctionpc_norm
pc: NxC, return NxC
data/data_utils.py:52
↓ 2 callersMethodsample_top_p
(self, probs, p)
model/meta.py:164
↓ 2 callersMethodsynchronize_between_processes
(self)
util/misc.py:131
↓ 2 callersFunctiontosec
(value)
data/imu_utils.py:99
↓ 2 callersFunctionuniform_crop
Perform uniform spatial sampling on the images and corresponding boxes. Args: images (tensor): images to perform uniform crop. The di
data/video_utils.py:43
↓ 2 callersMethodupdate
(self, value, n=1)
util/misc.py:52
↓ 1 callersMethod__init__
(self, use_xyz: bool = True)
model/lib/pointnet2/pointnet2_utils.py:268
↓ 1 callersMethod_allocate_kv_cache
(self, max_batch_size: int)
model/LLM/onellm.py:488
↓ 1 callersMethod_destroy_kv_cache
(self)
model/LLM/onellm.py:493
↓ 1 callersMethod_forward_attention
(self, x, start_pos, freqs_cis, mask, prompt)
model/LLM/onellm.py:197
↓ 1 callersMethod_forward_ffn
(self, h)
model/LLM/onellm.py:194
↓ 1 callersMethod_norm
Apply the RMSNorm normalization to the input tensor. Args: x (torch.Tensor): The input tensor.
model/components.py:28
↓ 1 callersMethod_probe_tokenizer_style
Given a sentence, e.g. "My darling", some tokenizers will make the space a seperate token, while some others will merge the space int
data/finetune_dataset.py:29
↓ 1 callersMethod_silu_gating
(self, x, y)
model/LLM/onellm.py:173
↓ 1 callersMethodadd_speaker_and_signal
Add speaker and start/end signal on each round.
data/finetune_dataset.py:49
↓ 1 callersMethodallocate_kv_cache
(self, max_batch_size: int, max_seq_len: int)
model/LLM/onellm.py:139
↓ 1 callersFunctionapply_rotary_emb
( xq: torch.Tensor, xk: torch.Tensor, freqs_cis: torch.Tensor, )
model/LLM/onellm.py:60
↓ 1 callersMethodclip_encode_image
(self, x, modal='image')
model/LLM/onellm.py:336
↓ 1 callersFunctioncrop_boxes
Perform crop on the bounding boxes given the offsets. Args: boxes (ndarray or None): bounding boxes to perform crop. The dimension
data/video_utils.py:24
↓ 1 callersMethoddestroy_kv_cache
(self)
model/LLM/onellm.py:147
↓ 1 callersFunctionfind_sublist
(a: list, b: list)
data/finetune_dataset.py:346
↓ 1 callersMethodforward
(self, x)
model/LLM/onellm.py:219
↓ 1 callersFunctionget_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
util/pos_embed.py:37
↓ 1 callersFunctionget_args_parser
()
main_finetune.py:47
↓ 1 callersFunctionget_args_parser
()
main_pretrain.py:47
↓ 1 callersFunctionget_clip_timepoints
(clip_sampler, duration)
data/video_utils.py:12
↓ 1 callersFunctionget_grad_norm_
(parameters, norm_type: float = 2.0)
util/misc.py:343
↓ 1 callersMethodget_images
(self, return_pil=False)
data/conversation_lib.py:65
↓ 1 callersMethodget_indices
(self, batch_size, world_size=1, rank_id=0)
data/pretrain_dataset.py:320
↓ 1 callersFunctionget_rank
()
util/misc.py:216
↓ 1 callersFunctionget_signal_info
(signal_fn: str)
data/imu_utils.py:79
↓ 1 callersFunctionget_world_size
()
util/misc.py:210
↓ 1 callersFunctiongradio_worker
The gradio worker is responsible for displaying the WebUI and relay the requests to model workers. It should be launched only once. Args
demos/multi_turn_mm.py:146
↓ 1 callersMethodgroups
(self)
data/finetune_dataset.py:342
↓ 1 callersFunctionis_main_process
()
util/misc.py:222
↓ 1 callersFunctionload_and_transform_video_data
( video_file, video_path, clip_duration=2, clips_per_video=5, sample_rate=16000, with_
data/video_utils.py:145
↓ 1 callersFunctionload_audio
(audio_path)
eval/audio_cap_clothov2.py:19
↓ 1 callersFunctionload_audio
(audio_path)
demos/multi_turn_mm.py:33
↓ 1 callersMethodload_audio
(self, audio_path)
data/pretrain_dataset.py:143
↓ 1 callersFunctionload_fmri
(fmri_path)
eval/fmri_cap_nsd.py:18
↓ 1 callersMethodload_fmri
(self, fmri_path)
data/pretrain_dataset.py:205
↓ 1 callersFunctionload_imu
(data_dict)
eval/imu_cap_ego4d.py:20
↓ 1 callersMethodload_imu
(self, data_dict)
data/pretrain_dataset.py:211
↓ 1 callersFunctionload_json
Load a json file
data/imu_utils.py:14
↓ 1 callersMethodload_point
(self, point_path)
data/pretrain_dataset.py:161
↓ 1 callersMethodload_rgbx
(self, image_path)
data/pretrain_dataset.py:169
↓ 1 callersMethodload_trans_image_from_ceph
(self, image_path)
data/pretrain_dataset.py:133
↓ 1 callersFunctionload_video
(video_path)
eval/video_qa_msvd.py:19
↓ 1 callersFunctionload_video
(video_path)
demos/multi_turn_mm.py:38
↓ 1 callersMethodload_video_from_ceph
(self, video_path)
data/pretrain_dataset.py:152
↓ 1 callersFunctionmain
(args)
main_finetune.py:122
↓ 1 callersFunctionmain
(args)
main_pretrain.py:122
↓ 1 callersFunctionmodel_worker
(args: argparse.Namespace)
demos/cli.py:25
↓ 1 callersFunctionmulti_modal_generate
(img_path, inp)
eval/image_bench_mmvet.py:59
↓ 1 callersFunctionmulti_modal_generate
(images, inps)
eval/point_cap_pointllm.py:74
↓ 1 callersFunctionmulti_modal_generate
(images, inps)
eval/image_cap_cococap.py:78
↓ 1 callersFunctionmulti_modal_generate
(images, inps, modal=['image'])
eval/fmri_cap_nsd.py:71
↓ 1 callersFunctionmulti_modal_generate
(images, inps, modal=['image'])
eval/audio_cap_clothov2.py:73
↓ 1 callersFunctionmulti_modal_generate
(images, inps)
eval/video_qa_msvd.py:77
↓ 1 callersFunctionmulti_modal_generate
(images, inps, modal=['image'])
eval/imu_cap_ego4d.py:80
↓ 1 callersFunctionpadIMU
Pad the signal if necessary
data/imu_utils.py:112
↓ 1 callersFunctionprecompute_freqs_cis
(dim: int, end: int, theta: float = 10000.0)
model/LLM/onellm.py:42
↓ 1 callersFunctionresample
Resamples data to new sample rate
data/imu_utils.py:128
↓ 1 callersFunctionresampleIMU
(signal, timestamps)
data/imu_utils.py:158
↓ 1 callersFunctionreshape_for_broadcast
(freqs_cis: torch.Tensor, x: torch.Tensor)
model/LLM/onellm.py:51
↓ 1 callersMethodset_epoch
r""" Sets the epoch for this sampler. When :attr:`shuffle=True`, this ensures all replicas use a different random ordering for each ep
data/finetune_dataset.py:425
↓ 1 callersMethodstream_generate
( self, prompt: str, images, max_gen_len: int, temperature: float = 0.
model/meta.py:115
↓ 1 callersFunctiontrain_one_epoch
(model: torch.nn.Module, data_loader, optimizer: torch.optim.Optimizer,
engine_finetune.py:11
↓ 1 callersFunctiontrain_one_epoch
(model: torch.nn.Module, data_loader, optimizer: torch.optim.Optimizer,
engine_pretrain.py:12
FunctionPYBIND11_MODULE
model/lib/pointnet2/src/pointnet2_api.cpp:10
Method__call__
(self, pics)
data/data_utils.py:36
next →1–100 of 248, ranked by callers