MCPcopy Create free account

hub / github.com/OmniMMI/OpenOmniNexus / functions

Functions668 in github.com/OmniMMI/OpenOmniNexus

↓ 1 callersMethodcollate
(self, batch)
open_omni/train/train_dpo.py:1192
↓ 1 callersMethodcompute_advantages
( self, values: torch.FloatTensor, rewards: torch.FloatTensor, mask: torch.Flo
trl/trainer/ppo_trainer.py:1085
↓ 1 callersMethodcompute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: Dict[str, Union[torch.Tensor
trl/trainer/dpo_trainer.py:1007
↓ 1 callersMethodcompute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: Dict[str, Union[torch.Tensor
trl/trainer/reward_trainer.py:196
↓ 1 callersMethodcompute_reward
Compute the reward for a list of histories.
trl/environment/base_environment.py:353
↓ 1 callersMethodcompute_rewards
(self, prompt_image_pairs, is_async=False)
trl/trainer/ddpo_trainer.py:212
↓ 1 callersMethodconcatenated_inputs
Concatenate the chosen and rejected inputs into a single tensor. Args: batch: A batch of data. Must contain the keys 'chosen_inpu
trl/trainer/dpo_trainer.py:663
↓ 1 callersFunctionconsolidate_ckpt
(src_path, dst_path)
open_omni/model/consolidate.py:14
↓ 1 callersFunctionconvert_numbers_to_words
(text)
preprocess/tts/process_cosyvoice.py:32
↓ 1 callersFunctionconvert_to_scalar
Converts the stats from a flattened dict to single scalar dicts
trl/core.py:89
↓ 1 callersMethodcreate_model_card
Creates and saves a model card for a TRL model. Args: path (`str`): The path to save the model card to. model_name (`
trl/trainer/ddpo_trainer.py:581
↓ 1 callersMethodcreate_model_card
Creates and saves a model card for a TRL model. Args: path (`str`): The path to save the model card to. model_name (`
trl/trainer/ppo_trainer.py:1332
↓ 1 callersFunctionctc_postprocess
(tokens, blank)
open_omni/model/speech_generator/generation.py:608
↓ 1 callersFunctiondisplay_image
(image)
open_omni/data_processing/utils.py:180
↓ 1 callersFunctiondivide_to_patches
Divides an image into patches of a specified size. Args: image (PIL.Image.Image): The input image. patch_size (int): The siz
open_omni/mm_utils.py:191
↓ 1 callersMethoddpo_loss
Compute the DPO loss for a batch of policy and reference model log probabilities. Args: policy_chosen_logps: Log probabilities of
trl/trainer/dpo_trainer.py:732
↓ 1 callersFunctionentropy_from_logits
Calculate entropy from logits.
trl/core.py:189
↓ 1 callersFunctionexact_div
(a, b, a_str, b_str, custom_error_message="")
trl/trainer/utils.py:555
↓ 1 callersFunctionfind_all_linear_names
(model)
open_omni/train/train.py:261
↓ 1 callersFunctionfind_all_linear_names
(model)
open_omni/train/train_dpo.py:226
↓ 1 callersMethodforward
(self, image_features, *args, **kwargs)
open_omni/model/multimodal_resampler/qformer.py:1135
↓ 1 callersMethodforward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
open_omni/model/language_model/llava_llama.py:69
↓ 1 callersMethodfrom_str
(cls, name)
local_demo/controller.py:33
↓ 1 callersMethodgather_stats
Gather stats from all processes. Useful in the context of distributed training. Args: stats (dict[str, Any]):
trl/trainer/ppo_trainer.py:860
↓ 1 callersMethodgenerate
( self, inputs: Optional[torch.Tensor] = None, generation_config: Optional[GenerationC
open_omni/model/speech_generator/generation.py:40
↓ 1 callersMethodgenerate
r""" A simple wrapper around the `generate` method of the wrapped model. Please refer to the [`generate`](https://huggingface.co/docs/
trl/models/modeling_value_head.py:191
↓ 1 callersMethodgenerate_stream
(self, params)
local_demo/model_worker.py:149
↓ 1 callersMethodgenerate_stream_gate
(self, params)
local_demo/model_worker.py:212
↓ 1 callersMethodget_2dPool
(self, image_feature)
open_omni/model/llava_arch.py:229
↓ 1 callersMethodget_batch_logps
Compute the log probabilities of the given labels under the given logits. Args: logits: Logits of the model (unnormalized). Shape
trl/trainer/dpo_trainer.py:798
↓ 1 callersMethodget_batch_samples
Generate samples from the model and reference model for the given batch of inputs.
trl/trainer/dpo_trainer.py:1031
↓ 1 callersMethodget_feats
(self, waveform)
preprocess/quantize/speech2unit.py:61
↓ 1 callersFunctionget_formatting_func_from_dataset
r""" Finds the correct formatting function based on the dataset structure. Currently supported datasets are: - `ChatML` with [{"role": str, "c
trl/extras/dataset_formatting.py:60
↓ 1 callersFunctionget_global_statistics
Computes element-wise mean and variance of the tensor across processes. Reference: https://github.com/OpenLMLab/MOSS-RLHF/blob/40b91eb2f2b71b
trl/trainer/utils.py:501
↓ 1 callersFunctionget_image
(image_path)
open_omni/data_processing/utils.py:43
↓ 1 callersMethodget_images
(self, return_pil=False, return_path=False)
open_omni/conversation.py:233
↓ 1 callersFunctionget_mm_adapter_state_maybe_zero_3
(named_params, keys_to_match)
open_omni/train/train.py:255
↓ 1 callersFunctionget_mm_adapter_state_maybe_zero_3
(named_params, keys_to_match)
open_omni/train/train_dpo.py:220
↓ 1 callersFunctionget_modality_length_grouped_indices
Return a list of indices so that each slice of `batch_size` consecutive indices correspond to elements of similar lengths. To do this, the in
open_omni/train/llava_trainer.py:89
↓ 1 callersFunctionget_modality_length_grouped_indices_auto
(lengths, batch_size, world_size, generator=None)
open_omni/train/llava_trainer.py:203
↓ 1 callersFunctionget_modality_length_grouped_indices_mm
Return a list of indices so that each slice of `batch_size` consecutive indices correspond to elements of similar lengths. To do this, the in
open_omni/train/llava_trainer.py:129
↓ 1 callersFunctionget_model
(model_args, training_args, bnb_model_from_pretrained_args)
open_omni/train/train.py:1627
↓ 1 callersFunctionget_model
(model_args, training_args, bnb_model_from_pretrained_args)
open_omni/train/train_dpo.py:1316
↓ 1 callersMethodget_model
(self)
open_omni/model/language_model/llava_mistral.py:59
↓ 1 callersFunctionget_model_output
(model, image_processor, tokenizer, video, qs, args)
open_omni/eval/model_note.py:60
↓ 1 callersFunctionget_model_output
(model, image_processor, tokenizer, video, qs, args)
open_omni/eval/model_videoqa_mc.py:60
↓ 1 callersFunctionget_peft_state_maybe_zero_3
(named_params, bias)
open_omni/train/train.py:222
↓ 1 callersFunctionget_peft_state_maybe_zero_3
(named_params, bias)
open_omni/train/train_dpo.py:187
↓ 1 callersFunctionget_peft_state_non_lora_maybe_zero_3
(named_params, require_grad_only=True)
open_omni/train/train.py:247
↓ 1 callersFunctionget_peft_state_non_lora_maybe_zero_3
(named_params, require_grad_only=True)
open_omni/train/train_dpo.py:212
↓ 1 callersMethodget_sft_loss
(self, logits, labels)
trl/trainer/dpo_trainer.py:835
↓ 1 callersMethodget_speech_encoder
(self)
open_omni/model/llava_arch.py:269
↓ 1 callersMethodget_speech_projector
(self)
open_omni/model/llava_arch.py:272
↓ 1 callersFunctionget_tokenize_len
(prompts)
open_omni/train/train.py:1227
↓ 1 callersFunctionget_tokenize_len
(prompts)
open_omni/train/train_dpo.py:879
↓ 1 callersMethodget_trainable_layers
Returns the trainable parameters of the pipeline
trl/models/modeling_sd_base.py:137
↓ 1 callersFunctionget_variable_length_grouped_indices
(lengths, batch_size, world_size, megabatch_mult=8, generator=None)
open_omni/train/llava_trainer.py:73
↓ 1 callersMethodinitialize_speech_generator
(self, model_args)
open_omni/model/llava_arch.py:174
↓ 1 callersMethodinitialize_speech_modules
(self, model_args, fsdp=None)
open_omni/model/llava_arch.py:139
↓ 1 callersFunctioninstructions_formatting_function
r""" return a callable function that takes in an "instructions" dataset and returns a formatted dataset, based on the tokenizer apply chat tem
trl/extras/dataset_formatting.py:34
↓ 1 callersFunctionis_accelerate_greater_20_0
()
trl/import_utils.py:32
↓ 1 callersFunctionis_bitsandbytes_available
()
trl/import_utils.py:65
↓ 1 callersFunctionis_torch_greater_2_0
()
trl/import_utils.py:49
↓ 1 callersFunctionis_torchvision_available
()
trl/import_utils.py:72
↓ 1 callersFunctionis_transformers_greater_than
(version: str)
trl/import_utils.py:44
↓ 1 callersFunctionis_unsloth_available
()
trl/import_utils.py:28
↓ 1 callersMethodlist_models
(self)
local_demo/controller.py:112
↓ 1 callersMethodload_checkpoint
Light wrapper around accelerate's register_lad_state_pre_hook which is run before loading state
trl/models/modeling_sd_base.py:149
↓ 1 callersFunctionload_from_hf
(repo_id, filename, subfolder=None)
open_omni/model/builder.py:101
↓ 1 callersFunctionload_speech
(audio, input_type, mel_size, speech_normalize)
local_demo/model_worker.py:49
↓ 1 callersFunctionload_video
(video, max_frames_num=16)
local_demo/model_worker.py:60
↓ 1 callersMethodloss
( self, advantages: torch.Tensor, clip_range: float, ratio: torch.Tensor,
trl/trainer/ddpo_trainer.py:391
↓ 1 callersMethodloss
Calculate policy and value losses. Args: old_logprobs (`torch.FloatTensor`): Log probabilities of the mo
trl/trainer/ppo_trainer.py:1113
↓ 1 callersFunctionmain
()
preprocess/tts/process_cosyvoice.py:108
↓ 1 callersFunctionmake_delta
(base_model_path, target_model_path, delta_path, hub_repo_id)
open_omni/model/make_delta.py:14
↓ 1 callersFunctionmake_dpo_data_module
Make dataset and collator for supervised fine-tuning.
open_omni/train/train_dpo.py:1310
↓ 1 callersFunctionmake_supervised_data_module
Make dataset and collator for supervised fine-tuning.
open_omni/train/train.py:1620
↓ 1 callersFunctionmaybe_zero_3
(param, ignore_status=False, name=None)
open_omni/train/llava_trainer.py:30
↓ 1 callersMethodmerge_duplicates
(cluster_ids)
preprocess/quantize/speech2unit.py:148
↓ 1 callersFunctionparse_args
Parse command-line arguments.
open_omni/eval/model_note.py:37
↓ 1 callersFunctionparse_args
Parse command-line arguments.
open_omni/eval/model_videoqa_mc.py:37
↓ 1 callersMethodparse_tool_call
Parse request string. Expected format: <request><tool_name>query<call>
trl/environment/base_environment.py:328
↓ 1 callersFunctionpeft_module_casting_to_bf16
(model)
trl/trainer/utils.py:633
↓ 1 callersFunctionpipeline_step
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`, *optional*): The prompt or prompts to guide t
trl/models/modeling_sd_base.py:309
↓ 1 callersMethodprepare_dataloader
Prepare the dataloader for training. Args: dataset (Union[`torch.utils.data.Dataset`, `datasets.Dataset`]):
trl/trainer/ppo_trainer.py:351
↓ 1 callersMethodprepare_model_inputs
(self, input_ids: torch.Tensor, attention_mask: torch.Tensor, labels: torch.Tensor)
trl/trainer/iterative_sft_trainer.py:130
↓ 1 callersMethodprepare_model_inputs
(self, queries: torch.Tensor, responses: torch.Tensor)
trl/trainer/ppo_trainer.py:883
↓ 1 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.py:1193
↓ 1 callersFunctionpreprocess_gemma
(sources: List[List[Dict[str, str]]], tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
open_omni/train/train.py:542
↓ 1 callersFunctionpreprocess_gemma
(sources: List[List[Dict[str, str]]], tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
open_omni/train/train_dpo.py:488
↓ 1 callersFunctionpreprocess_llama3
( sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False, max_len=2048,
open_omni/train/train_dpo.py:618
↓ 1 callersFunctionpreprocess_llama3_av
( sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False, has_units: bo
open_omni/train/train.py:907
↓ 1 callersFunctionpreprocess_llama_2
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
open_omni/train/train.py:467
↓ 1 callersFunctionpreprocess_llama_2
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
open_omni/train/train_dpo.py:400
↓ 1 callersFunctionpreprocess_mpt
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
open_omni/train/train.py:1090
↓ 1 callersFunctionpreprocess_mpt
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
open_omni/train/train_dpo.py:746
↓ 1 callersFunctionpreprocess_multimodal
(sources: Sequence[str], data_args: DataArguments)
open_omni/train/train.py:398
↓ 1 callersFunctionpreprocess_multimodal_movie
(sources: Sequence[str], data_args: DataArguments, video_inputs: str)
open_omni/train/train_dpo.py:383
↓ 1 callersFunctionpreprocess_plain
( sources: Sequence[str], tokenizer: transformers.PreTrainedTokenizer, )
open_omni/train/train.py:1171
↓ 1 callersFunctionpreprocess_plain
( sources: Sequence[str], tokenizer: transformers.PreTrainedTokenizer, )
open_omni/train/train_dpo.py:827
← previousnext →201–300 of 668, ranked by callers