Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/csuhan/OneLLM
/ functions
Functions
248 in github.com/csuhan/OneLLM
⨍
Functions
248
◇
Types & classes
55
↳
Endpoints
1
↓ 107 callers
Function
print
(*args, **kwargs)
util/misc.py:191
↓ 18 callers
Method
append_message
(self, role, message)
data/conversation_lib.py:62
↓ 18 callers
Method
load_state_dict
(self, state_dict)
util/misc.py:339
↓ 14 callers
Method
get_prompt
(self)
data/conversation_lib.py:27
↓ 13 callers
Function
setup_for_distributed
This function disables printing when not in master process
util/misc.py:185
↓ 10 callers
Method
copy
(self)
data/conversation_lib.py:145
↓ 9 callers
Method
update
(self, **kwargs)
util/misc.py:106
↓ 8 callers
Method
encode
(self, s: str, bos: bool, eos: bool)
model/tokenizer.py:30
↓ 8 callers
Method
generate
( self, prompts: List[str], images, max_gen_len: int, temperature: flo
model/meta.py:59
↓ 7 callers
Method
__init__
( self, in_size: int, out_size: int, *, activation
model/lib/pointnet2/pytorch_utils.py:202
↓ 6 callers
Method
decode
(self, t: List[int])
model/tokenizer.py:39
↓ 4 callers
Method
__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU)
model/LLM/onellm.py:210
↓ 4 callers
Function
make_audio_features
(wav_name, mel_bins=128, target_length=1024, aug=False)
data/data_utils.py:66
↓ 4 callers
Method
state_dict
(self)
util/misc.py:336
↓ 4 callers
Function
toms
(value)
data/imu_utils.py:103
↓ 3 callers
Method
__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 callers
Function
get_imu_frames
Given a IMU signal return the frames between video_start_sec and video_end_sec
data/imu_utils.py:166
↓ 3 callers
Function
is_dist_avail_and_initialized
()
util/misc.py:202
↓ 3 callers
Method
max
(self)
util/misc.py:85
↓ 2 callers
Method
__init__
(self, neighbors, transpose_mode=True)
model/lib/point_utils.py:7
↓ 2 callers
Method
add_meter
(self, name, meter)
util/misc.py:135
↓ 2 callers
Method
backward
: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 callers
Method
cumsum
(sequence)
data/pretrain_dataset.py:283
↓ 2 callers
Function
delta
Compute the absolute value of the difference of two numbers
data/imu_utils.py:107
↓ 2 callers
Method
encode_image
(self, x, modal='image')
model/LLM/onellm.py:364
↓ 2 callers
Method
forward_inference
(self, tokens: torch.Tensor, start_pos: int, image=None, modal='image')
model/LLM/onellm.py:449
↓ 2 callers
Function
get_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 callers
Method
get_tensor_type
(dtype: torch.dtype, device: str)
util/misc.py:507
↓ 2 callers
Method
log_every
(self, iterable, print_freq, header=None, start_iter=0)
util/misc.py:138
↓ 2 callers
Function
pc_norm
pc: NxC, return NxC
data/data_utils.py:52
↓ 2 callers
Method
sample_top_p
(self, probs, p)
model/meta.py:164
↓ 2 callers
Method
synchronize_between_processes
(self)
util/misc.py:131
↓ 2 callers
Function
tosec
(value)
data/imu_utils.py:99
↓ 2 callers
Function
uniform_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 callers
Method
update
(self, value, n=1)
util/misc.py:52
↓ 1 callers
Method
__init__
(self, use_xyz: bool = True)
model/lib/pointnet2/pointnet2_utils.py:268
↓ 1 callers
Method
_allocate_kv_cache
(self, max_batch_size: int)
model/LLM/onellm.py:488
↓ 1 callers
Method
_destroy_kv_cache
(self)
model/LLM/onellm.py:493
↓ 1 callers
Method
_forward_attention
(self, x, start_pos, freqs_cis, mask, prompt)
model/LLM/onellm.py:197
↓ 1 callers
Method
_forward_ffn
(self, h)
model/LLM/onellm.py:194
↓ 1 callers
Method
_norm
Apply the RMSNorm normalization to the input tensor. Args: x (torch.Tensor): The input tensor.
model/components.py:28
↓ 1 callers
Method
_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 callers
Method
_silu_gating
(self, x, y)
model/LLM/onellm.py:173
↓ 1 callers
Method
add_speaker_and_signal
Add speaker and start/end signal on each round.
data/finetune_dataset.py:49
↓ 1 callers
Method
allocate_kv_cache
(self, max_batch_size: int, max_seq_len: int)
model/LLM/onellm.py:139
↓ 1 callers
Function
apply_rotary_emb
( xq: torch.Tensor, xk: torch.Tensor, freqs_cis: torch.Tensor, )
model/LLM/onellm.py:60
↓ 1 callers
Method
clip_encode_image
(self, x, modal='image')
model/LLM/onellm.py:336
↓ 1 callers
Function
crop_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 callers
Method
destroy_kv_cache
(self)
model/LLM/onellm.py:147
↓ 1 callers
Function
find_sublist
(a: list, b: list)
data/finetune_dataset.py:346
↓ 1 callers
Method
forward
(self, x)
model/LLM/onellm.py:219
↓ 1 callers
Function
get_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
util/pos_embed.py:37
↓ 1 callers
Function
get_args_parser
()
main_finetune.py:47
↓ 1 callers
Function
get_args_parser
()
main_pretrain.py:47
↓ 1 callers
Function
get_clip_timepoints
(clip_sampler, duration)
data/video_utils.py:12
↓ 1 callers
Function
get_grad_norm_
(parameters, norm_type: float = 2.0)
util/misc.py:343
↓ 1 callers
Method
get_images
(self, return_pil=False)
data/conversation_lib.py:65
↓ 1 callers
Method
get_indices
(self, batch_size, world_size=1, rank_id=0)
data/pretrain_dataset.py:320
↓ 1 callers
Function
get_rank
()
util/misc.py:216
↓ 1 callers
Function
get_signal_info
(signal_fn: str)
data/imu_utils.py:79
↓ 1 callers
Function
get_world_size
()
util/misc.py:210
↓ 1 callers
Function
gradio_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 callers
Method
groups
(self)
data/finetune_dataset.py:342
↓ 1 callers
Function
is_main_process
()
util/misc.py:222
↓ 1 callers
Function
load_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 callers
Function
load_audio
(audio_path)
eval/audio_cap_clothov2.py:19
↓ 1 callers
Function
load_audio
(audio_path)
demos/multi_turn_mm.py:33
↓ 1 callers
Method
load_audio
(self, audio_path)
data/pretrain_dataset.py:143
↓ 1 callers
Function
load_fmri
(fmri_path)
eval/fmri_cap_nsd.py:18
↓ 1 callers
Method
load_fmri
(self, fmri_path)
data/pretrain_dataset.py:205
↓ 1 callers
Function
load_imu
(data_dict)
eval/imu_cap_ego4d.py:20
↓ 1 callers
Method
load_imu
(self, data_dict)
data/pretrain_dataset.py:211
↓ 1 callers
Function
load_json
Load a json file
data/imu_utils.py:14
↓ 1 callers
Method
load_point
(self, point_path)
data/pretrain_dataset.py:161
↓ 1 callers
Method
load_rgbx
(self, image_path)
data/pretrain_dataset.py:169
↓ 1 callers
Method
load_trans_image_from_ceph
(self, image_path)
data/pretrain_dataset.py:133
↓ 1 callers
Function
load_video
(video_path)
eval/video_qa_msvd.py:19
↓ 1 callers
Function
load_video
(video_path)
demos/multi_turn_mm.py:38
↓ 1 callers
Method
load_video_from_ceph
(self, video_path)
data/pretrain_dataset.py:152
↓ 1 callers
Function
main
(args)
main_finetune.py:122
↓ 1 callers
Function
main
(args)
main_pretrain.py:122
↓ 1 callers
Function
model_worker
(args: argparse.Namespace)
demos/cli.py:25
↓ 1 callers
Function
multi_modal_generate
(img_path, inp)
eval/image_bench_mmvet.py:59
↓ 1 callers
Function
multi_modal_generate
(images, inps)
eval/point_cap_pointllm.py:74
↓ 1 callers
Function
multi_modal_generate
(images, inps)
eval/image_cap_cococap.py:78
↓ 1 callers
Function
multi_modal_generate
(images, inps, modal=['image'])
eval/fmri_cap_nsd.py:71
↓ 1 callers
Function
multi_modal_generate
(images, inps, modal=['image'])
eval/audio_cap_clothov2.py:73
↓ 1 callers
Function
multi_modal_generate
(images, inps)
eval/video_qa_msvd.py:77
↓ 1 callers
Function
multi_modal_generate
(images, inps, modal=['image'])
eval/imu_cap_ego4d.py:80
↓ 1 callers
Function
padIMU
Pad the signal if necessary
data/imu_utils.py:112
↓ 1 callers
Function
precompute_freqs_cis
(dim: int, end: int, theta: float = 10000.0)
model/LLM/onellm.py:42
↓ 1 callers
Function
resample
Resamples data to new sample rate
data/imu_utils.py:128
↓ 1 callers
Function
resampleIMU
(signal, timestamps)
data/imu_utils.py:158
↓ 1 callers
Function
reshape_for_broadcast
(freqs_cis: torch.Tensor, x: torch.Tensor)
model/LLM/onellm.py:51
↓ 1 callers
Method
set_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 callers
Method
stream_generate
( self, prompt: str, images, max_gen_len: int, temperature: float = 0.
model/meta.py:115
↓ 1 callers
Function
train_one_epoch
(model: torch.nn.Module, data_loader, optimizer: torch.optim.Optimizer,
engine_finetune.py:11
↓ 1 callers
Function
train_one_epoch
(model: torch.nn.Module, data_loader, optimizer: torch.optim.Optimizer,
engine_pretrain.py:12
Function
PYBIND11_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