Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OmniMMI/OpenOmniNexus
/ functions
Functions
668 in github.com/OmniMMI/OpenOmniNexus
⨍
Functions
668
◇
Types & classes
108
↳
Endpoints
9
↓ 2 callers
Method
generate
Generate responses for a list of histories.
trl/environment/base_environment.py:362
↓ 2 callers
Function
get_anyres_image_grid_shape
Calculate the shape of the image patch grid after the preprocessing for images of any resolution. Args: image_size (tuple): The size
open_omni/mm_utils.py:213
↓ 2 callers
Method
get_batch_loss_metrics
Compute the DPO loss and other metrics for the given batch of inputs for train or test. CHANGE: 1. add sft loss 2. all gather metrics
trl/trainer/dpo_trainer.py:904
↓ 2 callers
Method
get_extended_attention_mask
Makes broadcastable attention and causal masks so that future and masked tokens are ignored. Arguments: attention_mask (
open_omni/model/multimodal_resampler/qformer.py:651
↓ 2 callers
Function
get_mm_adapter_state_maybe_zero_3
(named_params, keys_to_match)
open_omni/train/llava_trainer.py:45
↓ 2 callers
Method
get_model
(self)
open_omni/model/language_model/llava_llama.py:66
↓ 2 callers
Method
get_model
(self)
open_omni/model/language_model/llava_mpt.py:61
↓ 2 callers
Function
get_model_list
()
local_demo/gradio_web_server.py:37
↓ 2 callers
Function
get_model_name_from_path
(model_path)
open_omni/mm_utils.py:405
↓ 2 callers
Method
get_queue_length
(self)
local_demo/model_worker.py:134
↓ 2 callers
Function
get_random_chunk
(lst, n, k, seed=42)
open_omni/eval/model_note.py:30
↓ 2 callers
Function
get_random_chunk
(lst, n, k, seed=42)
open_omni/eval/model_videoqa_mc.py:30
↓ 2 callers
Method
get_speech_generator
(self)
open_omni/model/llava_arch.py:167
↓ 2 callers
Method
get_status
(self)
local_demo/model_worker.py:141
↓ 2 callers
Method
get_worker_address
(self, model_name: str)
local_demo/controller.py:120
↓ 2 callers
Function
insert_separator
(X, sep)
open_omni/mm_utils.py:344
↓ 2 callers
Function
lengths_to_padding_mask
(lens)
open_omni/model/speech_generator/speech_generator.py:11
↓ 2 callers
Function
load_frames
(frames_dir)
open_omni/data_processing/utils.py:48
↓ 2 callers
Function
load_json
(path)
open_omni/data_processing/utils.py:246
↓ 2 callers
Function
load_jsonl
(save_path)
open_omni/data_processing/utils.py:240
↓ 2 callers
Function
make_conv
(prompt, answer)
open_omni/train/train_dpo.py:475
↓ 2 callers
Function
masked_whiten
Whiten values with masked values.
trl/core.py:171
↓ 2 callers
Method
prepare_inputs_for_generation
(self, input_ids, query_embeds, past=None, attention_mask=None, **model_kwargs)
open_omni/model/multimodal_resampler/qformer.py:992
↓ 2 callers
Function
preprocess
Given a list of sources, each is a conversation list. This transform: 1. Add signal '### ' at the beginning each sentence, with end signal '\
open_omni/train/train_dpo.py:849
↓ 2 callers
Function
preprocess_multimodal_av
(sources: Sequence[str], data_args: DataArguments)
open_omni/train/train.py:431
↓ 2 callers
Function
process_audio_with_whisper
(speech_path, input_type="mel", norm=True, mel_size=128)
open_omni/utils.py:52
↓ 2 callers
Method
process_image
(self, image, image_process_mode, return_pil=False, image_format="PNG")
open_omni/conversation.py:187
↓ 2 callers
Method
process_image
(self, image_file)
open_omni/train/train.py:1352
↓ 2 callers
Method
process_image
(self, image_file)
open_omni/train/train_dpo.py:1003
↓ 2 callers
Method
random_masking
Perform per-sample random masking by per-sample shuffling. Per-sample shuffling is done by argsort random noise. x: [N, L, D]
open_omni/model/multimodal_resampler/masked_drop.py:56
↓ 2 callers
Method
register_to_controller
(self)
local_demo/model_worker.py:101
↓ 2 callers
Method
register_worker
(self, worker_name: str, check_heart_beat: bool, worker_status: dict)
local_demo/controller.py:69
↓ 2 callers
Method
remove_worker
(self, worker_name: str)
local_demo/controller.py:101
↓ 2 callers
Method
run
Run the environment on a list of queries. Args: queries (list[str]): A list of queries to run the model in the environme
trl/environment/base_environment.py:263
↓ 2 callers
Function
sample_frames
(frames, num_segments)
open_omni/data_processing/utils.py:58
↓ 2 callers
Method
save_pretrained
Saves all of the model weights
trl/models/modeling_sd_base.py:131
↓ 2 callers
Function
scheduler_step
Predict the sample at the previous timestep by reversing the SDE. Core function to propagate the diffusion process from the learned model ou
trl/models/modeling_sd_base.py:185
↓ 2 callers
Function
select_best_resolution
Selects the best resolution from a list of possible resolutions based on the original size. Args: original_size (tuple): The origina
open_omni/mm_utils.py:119
↓ 2 callers
Method
send_heart_beat
(self)
local_demo/model_worker.py:113
↓ 2 callers
Method
set_progress_bar_config
Sets the progress bar config for the pipeline
trl/models/modeling_sd_base.py:125
↓ 2 callers
Function
set_seed
Helper function for reproducible behavior to set the seed in `random`, `numpy`, and `torch`. Args: seed (`int`): The seed to set.
trl/core.py:235
↓ 2 callers
Method
show_colour_legend
Print the colour legend.
trl/environment/base_environment.py:189
↓ 2 callers
Function
split_list
Split a list into n (roughly) equal-sized chunks
open_omni/eval/model_note.py:20
↓ 2 callers
Function
split_list
Split a list into n (roughly) equal-sized chunks
open_omni/eval/model_videoqa_mc.py:20
↓ 2 callers
Function
split_to_even_chunks
Split a list of indices into `chunks` chunks of roughly equal lengths.
open_omni/train/llava_trainer.py:51
↓ 2 callers
Method
state_dict
r""" Returns the state dictionary of the model. We add the state dictionary of the value head to the state dictionary of the wrapped m
trl/models/modeling_value_head.py:205
↓ 2 callers
Method
step
Perform a single step of training. Args: epoch (int): The current epoch. global_step (int): The current glob
trl/trainer/ddpo_trainer.py:229
↓ 2 callers
Method
store_metrics
(self, metrics: Dict[str, float], train_eval: Literal["train", "eval"] = "train")
trl/trainer/dpo_trainer.py:1117
↓ 2 callers
Method
task_end_check
Check if the current generation sequence has finished.
trl/environment/base_environment.py:388
↓ 2 callers
Method
tasks_end_check
Check if the current generation sequences have finished.
trl/environment/base_environment.py:377
↓ 2 callers
Method
text_encoder
Returns the text encoder used for encoding text inputs
trl/models/modeling_sd_base.py:112
↓ 2 callers
Function
train
(attn_implementation=None)
open_omni/train/train.py:1811
↓ 2 callers
Function
trl_sanitze_kwargs_for_tagging
(model, tag_names, kwargs=None)
trl/trainer/utils.py:647
↓ 2 callers
Method
upsample
(self, reps, tgt_units=None)
open_omni/model/speech_generator/speech_generator.py:49
↓ 1 callers
Function
FeedForward
(dim, mult=4)
open_omni/model/multimodal_resampler/perceiver.py:20
↓ 1 callers
Method
__init__
(self, config: Qwen2Config)
open_omni/model/language_model/llava_qwen.py:75
↓ 1 callers
Method
__init__
(self, config: LlamaConfig)
open_omni/model/language_model/llava_llama.py:47
↓ 1 callers
Method
__init__
(self, config: MptConfig)
open_omni/model/language_model/llava_mpt.py:31
↓ 1 callers
Method
__init__
(self, config: MistralConfig)
open_omni/model/language_model/llava_mistral.py:41
↓ 1 callers
Method
__init__
(self)
open_omni/model/multimodal_projector/builder.py:9
↓ 1 callers
Method
__init__
(self, vision_tower, args, delay_load=False)
open_omni/model/multimodal_encoder/clip_encoder.py:13
↓ 1 callers
Method
__init__
(self, km_path)
preprocess/quantize/speech2unit.py:91
↓ 1 callers
Method
__init__
Calculates the running mean and standard deviation of a data stream. Reference: https://github.com/OpenLMLab/MOSS-RLHF/blob/40b91eb2f
trl/trainer/utils.py:461
↓ 1 callers
Function
_add_speaker_and_signal
Add speaker and start/end signal on each round.
open_omni/train/train.py:378
↓ 1 callers
Function
_add_speaker_and_signal
Add speaker and start/end signal on each round.
open_omni/train/train_dpo.py:342
↓ 1 callers
Method
_config_check
(self)
trl/trainer/ddpo_trainer.py:550
↓ 1 callers
Method
_early_stop
r""" Handles the early stopping logic. If the policy KL is greater than the target KL, then the gradient is zeroed and the optimizatio
trl/trainer/ppo_trainer.py:825
↓ 1 callers
Method
_generate_batched
Generate responses for a list of query tensors. args: query_tensors (list[torch.Tensor]): A list of query tensors to gen
trl/environment/base_environment.py:407
↓ 1 callers
Method
_generate_samples
Generate samples from the model Args: iterations (int): Number of iterations to generate samples for batch_s
trl/trainer/ddpo_trainer.py:429
↓ 1 callers
Function
_get_variance
(self, timestep, prev_timestep)
trl/models/modeling_sd_base.py:170
↓ 1 callers
Method
_has_lm_head
(self)
trl/models/modeling_value_head.py:296
↓ 1 callers
Method
_init_weights
r""" Initializes the weights of the value head. The default initialization strategy is random. Users can pass a different initializati
trl/models/modeling_value_head.py:118
↓ 1 callers
Method
_init_weights
r""" We initialize the weights of the value head.
trl/models/modeling_value_head.py:373
↓ 1 callers
Method
_kl_penalty
(self, logprob: torch.FloatTensor, ref_logprob: torch.FloatTensor)
trl/trainer/ppo_trainer.py:1069
↓ 1 callers
Function
_mask_targets
(target, tokenized_lens, speakers)
open_omni/train/train.py:367
↓ 1 callers
Function
_mask_targets
(target, tokenized_lens, speakers)
open_omni/train/train_dpo.py:331
↓ 1 callers
Method
_maybe_log_save_evaluate
(self)
trl/trainer/iterative_sft_trainer.py:313
↓ 1 callers
Method
_prepare_deepspeed
(self, model: PreTrainedModelWrapper)
trl/trainer/dpo_trainer.py:343
↓ 1 callers
Method
_prepare_deepspeed
(self, model: PreTrainedModelWrapper)
trl/trainer/ppo_trainer.py:1373
↓ 1 callers
Method
_prepare_non_packed_dataloader
( self, tokenizer, dataset, dataset_text_field, max_seq_length,
trl/trainer/sft_trainer.py:371
↓ 1 callers
Method
_prepare_packed_dataloader
( self, tokenizer, dataset, dataset_text_field, max_seq_length,
trl/trainer/sft_trainer.py:424
↓ 1 callers
Method
_sample
( self, input_ids: torch.LongTensor, logits_processor: LogitsProcessorList, st
open_omni/model/speech_generator/generation.py:306
↓ 1 callers
Method
_sample_streaming_unit
( self, input_ids: torch.LongTensor, logits_processor: LogitsProcessorList, st
open_omni/model/speech_generator/generation.py:451
↓ 1 callers
Method
_save_checkpoint
(self, model, trial, metrics=None)
open_omni/train/llava_trainer.py:485
↓ 1 callers
Method
_set_signature_columns_if_needed
(self)
trl/trainer/ppo_trainer.py:377
↓ 1 callers
Method
_setup_optimizer
(self, trainable_layers_parameters)
trl/trainer/ddpo_trainer.py:405
↓ 1 callers
Method
_step_safety_checker
Check if the input data is valid for training. Args: input_ids (List[`torch.LongTensor`]): List of tenso
trl/trainer/iterative_sft_trainer.py:156
↓ 1 callers
Method
_step_safety_checker
Check if the input data is valid for training. Args: batch_size (int): Batch size from the config file.
trl/trainer/ppo_trainer.py:538
↓ 1 callers
Method
_train_batched_samples
Train on a batch of samples. Main training segment Args: inner_epoch (int): The current inner epoch epoch (i
trl/trainer/ddpo_trainer.py:491
↓ 1 callers
Method
_trl_activate_neftune
r""" Activates the neftune as presented in this code: https://github.com/neelsjain/NEFTune and paper: https://arxiv.org/abs/2310.05914
trl/trainer/sft_trainer.py:466
↓ 1 callers
Function
_uniform_assignment
(src_lens, tgt_lens)
open_omni/model/speech_generator/speech_generator.py:18
↓ 1 callers
Method
add_and_load_reward_modeling_adapter
r""" Add and load a reward modeling adapter. This method can only be used if the model is a `PeftModel` and if you have initialized th
trl/models/modeling_base.py:415
↓ 1 callers
Function
apply_delta
(base_model_path, target_model_path, delta_path)
open_omni/model/apply_delta.py:14
↓ 1 callers
Method
build_Qformer
(self, vision_width, cross_attention_freq, num_query_token)
open_omni/model/multimodal_resampler/qformer.py:1117
↓ 1 callers
Function
build_demo
(embed_mode, vocoder, cur_dir=None, concurrency_count=10)
local_demo/gradio_web_server.py:237
↓ 1 callers
Function
build_unit_tokenizer
(vocab_size)
local_demo/model_worker.py:68
↓ 1 callers
Function
build_vocoder
(args)
local_demo/gradio_web_server.py:321
↓ 1 callers
Method
calculate_loss
Calculate the loss for a batch of an unpacked sample Args: latents (torch.Tensor): The latents sampled f
trl/trainer/ddpo_trainer.py:325
↓ 1 callers
Function
clean_text
(text)
preprocess/tts/process_cosyvoice.py:38
↓ 1 callers
Function
clip_by_value
Tensor extension to torch.clamp https://github.com/pytorch/pytorch/issues/2793#issuecomment-428784713
trl/core.py:180
← previous
next →
101–200 of 668, ranked by callers