MCPcopy Create free account

hub / github.com/OmniMMI/OpenOmniNexus / functions

Functions668 in github.com/OmniMMI/OpenOmniNexus

↓ 2 callersMethodgenerate
Generate responses for a list of histories.
trl/environment/base_environment.py:362
↓ 2 callersFunctionget_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 callersMethodget_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 callersMethodget_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 callersFunctionget_mm_adapter_state_maybe_zero_3
(named_params, keys_to_match)
open_omni/train/llava_trainer.py:45
↓ 2 callersMethodget_model
(self)
open_omni/model/language_model/llava_llama.py:66
↓ 2 callersMethodget_model
(self)
open_omni/model/language_model/llava_mpt.py:61
↓ 2 callersFunctionget_model_list
()
local_demo/gradio_web_server.py:37
↓ 2 callersFunctionget_model_name_from_path
(model_path)
open_omni/mm_utils.py:405
↓ 2 callersMethodget_queue_length
(self)
local_demo/model_worker.py:134
↓ 2 callersFunctionget_random_chunk
(lst, n, k, seed=42)
open_omni/eval/model_note.py:30
↓ 2 callersFunctionget_random_chunk
(lst, n, k, seed=42)
open_omni/eval/model_videoqa_mc.py:30
↓ 2 callersMethodget_speech_generator
(self)
open_omni/model/llava_arch.py:167
↓ 2 callersMethodget_status
(self)
local_demo/model_worker.py:141
↓ 2 callersMethodget_worker_address
(self, model_name: str)
local_demo/controller.py:120
↓ 2 callersFunctioninsert_separator
(X, sep)
open_omni/mm_utils.py:344
↓ 2 callersFunctionlengths_to_padding_mask
(lens)
open_omni/model/speech_generator/speech_generator.py:11
↓ 2 callersFunctionload_frames
(frames_dir)
open_omni/data_processing/utils.py:48
↓ 2 callersFunctionload_json
(path)
open_omni/data_processing/utils.py:246
↓ 2 callersFunctionload_jsonl
(save_path)
open_omni/data_processing/utils.py:240
↓ 2 callersFunctionmake_conv
(prompt, answer)
open_omni/train/train_dpo.py:475
↓ 2 callersFunctionmasked_whiten
Whiten values with masked values.
trl/core.py:171
↓ 2 callersMethodprepare_inputs_for_generation
(self, input_ids, query_embeds, past=None, attention_mask=None, **model_kwargs)
open_omni/model/multimodal_resampler/qformer.py:992
↓ 2 callersFunctionpreprocess
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 callersFunctionpreprocess_multimodal_av
(sources: Sequence[str], data_args: DataArguments)
open_omni/train/train.py:431
↓ 2 callersFunctionprocess_audio_with_whisper
(speech_path, input_type="mel", norm=True, mel_size=128)
open_omni/utils.py:52
↓ 2 callersMethodprocess_image
(self, image, image_process_mode, return_pil=False, image_format="PNG")
open_omni/conversation.py:187
↓ 2 callersMethodprocess_image
(self, image_file)
open_omni/train/train.py:1352
↓ 2 callersMethodprocess_image
(self, image_file)
open_omni/train/train_dpo.py:1003
↓ 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]
open_omni/model/multimodal_resampler/masked_drop.py:56
↓ 2 callersMethodregister_to_controller
(self)
local_demo/model_worker.py:101
↓ 2 callersMethodregister_worker
(self, worker_name: str, check_heart_beat: bool, worker_status: dict)
local_demo/controller.py:69
↓ 2 callersMethodremove_worker
(self, worker_name: str)
local_demo/controller.py:101
↓ 2 callersMethodrun
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 callersFunctionsample_frames
(frames, num_segments)
open_omni/data_processing/utils.py:58
↓ 2 callersMethodsave_pretrained
Saves all of the model weights
trl/models/modeling_sd_base.py:131
↓ 2 callersFunctionscheduler_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 callersFunctionselect_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 callersMethodsend_heart_beat
(self)
local_demo/model_worker.py:113
↓ 2 callersMethodset_progress_bar_config
Sets the progress bar config for the pipeline
trl/models/modeling_sd_base.py:125
↓ 2 callersFunctionset_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 callersMethodshow_colour_legend
Print the colour legend.
trl/environment/base_environment.py:189
↓ 2 callersFunctionsplit_list
Split a list into n (roughly) equal-sized chunks
open_omni/eval/model_note.py:20
↓ 2 callersFunctionsplit_list
Split a list into n (roughly) equal-sized chunks
open_omni/eval/model_videoqa_mc.py:20
↓ 2 callersFunctionsplit_to_even_chunks
Split a list of indices into `chunks` chunks of roughly equal lengths.
open_omni/train/llava_trainer.py:51
↓ 2 callersMethodstate_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 callersMethodstep
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 callersMethodstore_metrics
(self, metrics: Dict[str, float], train_eval: Literal["train", "eval"] = "train")
trl/trainer/dpo_trainer.py:1117
↓ 2 callersMethodtask_end_check
Check if the current generation sequence has finished.
trl/environment/base_environment.py:388
↓ 2 callersMethodtasks_end_check
Check if the current generation sequences have finished.
trl/environment/base_environment.py:377
↓ 2 callersMethodtext_encoder
Returns the text encoder used for encoding text inputs
trl/models/modeling_sd_base.py:112
↓ 2 callersFunctiontrain
(attn_implementation=None)
open_omni/train/train.py:1811
↓ 2 callersFunctiontrl_sanitze_kwargs_for_tagging
(model, tag_names, kwargs=None)
trl/trainer/utils.py:647
↓ 2 callersMethodupsample
(self, reps, tgt_units=None)
open_omni/model/speech_generator/speech_generator.py:49
↓ 1 callersFunctionFeedForward
(dim, mult=4)
open_omni/model/multimodal_resampler/perceiver.py:20
↓ 1 callersMethod__init__
(self, config: Qwen2Config)
open_omni/model/language_model/llava_qwen.py:75
↓ 1 callersMethod__init__
(self, config: LlamaConfig)
open_omni/model/language_model/llava_llama.py:47
↓ 1 callersMethod__init__
(self, config: MptConfig)
open_omni/model/language_model/llava_mpt.py:31
↓ 1 callersMethod__init__
(self, config: MistralConfig)
open_omni/model/language_model/llava_mistral.py:41
↓ 1 callersMethod__init__
(self)
open_omni/model/multimodal_projector/builder.py:9
↓ 1 callersMethod__init__
(self, vision_tower, args, delay_load=False)
open_omni/model/multimodal_encoder/clip_encoder.py:13
↓ 1 callersMethod__init__
(self, km_path)
preprocess/quantize/speech2unit.py:91
↓ 1 callersMethod__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 callersFunction_add_speaker_and_signal
Add speaker and start/end signal on each round.
open_omni/train/train.py:378
↓ 1 callersFunction_add_speaker_and_signal
Add speaker and start/end signal on each round.
open_omni/train/train_dpo.py:342
↓ 1 callersMethod_config_check
(self)
trl/trainer/ddpo_trainer.py:550
↓ 1 callersMethod_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 callersMethod_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 callersMethod_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 callersFunction_get_variance
(self, timestep, prev_timestep)
trl/models/modeling_sd_base.py:170
↓ 1 callersMethod_has_lm_head
(self)
trl/models/modeling_value_head.py:296
↓ 1 callersMethod_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 callersMethod_init_weights
r""" We initialize the weights of the value head.
trl/models/modeling_value_head.py:373
↓ 1 callersMethod_kl_penalty
(self, logprob: torch.FloatTensor, ref_logprob: torch.FloatTensor)
trl/trainer/ppo_trainer.py:1069
↓ 1 callersFunction_mask_targets
(target, tokenized_lens, speakers)
open_omni/train/train.py:367
↓ 1 callersFunction_mask_targets
(target, tokenized_lens, speakers)
open_omni/train/train_dpo.py:331
↓ 1 callersMethod_maybe_log_save_evaluate
(self)
trl/trainer/iterative_sft_trainer.py:313
↓ 1 callersMethod_prepare_deepspeed
(self, model: PreTrainedModelWrapper)
trl/trainer/dpo_trainer.py:343
↓ 1 callersMethod_prepare_deepspeed
(self, model: PreTrainedModelWrapper)
trl/trainer/ppo_trainer.py:1373
↓ 1 callersMethod_prepare_non_packed_dataloader
( self, tokenizer, dataset, dataset_text_field, max_seq_length,
trl/trainer/sft_trainer.py:371
↓ 1 callersMethod_prepare_packed_dataloader
( self, tokenizer, dataset, dataset_text_field, max_seq_length,
trl/trainer/sft_trainer.py:424
↓ 1 callersMethod_sample
( self, input_ids: torch.LongTensor, logits_processor: LogitsProcessorList, st
open_omni/model/speech_generator/generation.py:306
↓ 1 callersMethod_sample_streaming_unit
( self, input_ids: torch.LongTensor, logits_processor: LogitsProcessorList, st
open_omni/model/speech_generator/generation.py:451
↓ 1 callersMethod_save_checkpoint
(self, model, trial, metrics=None)
open_omni/train/llava_trainer.py:485
↓ 1 callersMethod_set_signature_columns_if_needed
(self)
trl/trainer/ppo_trainer.py:377
↓ 1 callersMethod_setup_optimizer
(self, trainable_layers_parameters)
trl/trainer/ddpo_trainer.py:405
↓ 1 callersMethod_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 callersMethod_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 callersMethod_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 callersMethod_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 callersFunction_uniform_assignment
(src_lens, tgt_lens)
open_omni/model/speech_generator/speech_generator.py:18
↓ 1 callersMethodadd_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 callersFunctionapply_delta
(base_model_path, target_model_path, delta_path)
open_omni/model/apply_delta.py:14
↓ 1 callersMethodbuild_Qformer
(self, vision_width, cross_attention_freq, num_query_token)
open_omni/model/multimodal_resampler/qformer.py:1117
↓ 1 callersFunctionbuild_demo
(embed_mode, vocoder, cur_dir=None, concurrency_count=10)
local_demo/gradio_web_server.py:237
↓ 1 callersFunctionbuild_unit_tokenizer
(vocab_size)
local_demo/model_worker.py:68
↓ 1 callersFunctionbuild_vocoder
(args)
local_demo/gradio_web_server.py:321
↓ 1 callersMethodcalculate_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 callersFunctionclean_text
(text)
preprocess/tts/process_cosyvoice.py:38
↓ 1 callersFunctionclip_by_value
Tensor extension to torch.clamp https://github.com/pytorch/pytorch/issues/2793#issuecomment-428784713
trl/core.py:180
← previousnext →101–200 of 668, ranked by callers