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
↓ 1 callers
Method
collate
(self, batch)
open_omni/train/train_dpo.py:1192
↓ 1 callers
Method
compute_advantages
( self, values: torch.FloatTensor, rewards: torch.FloatTensor, mask: torch.Flo
trl/trainer/ppo_trainer.py:1085
↓ 1 callers
Method
compute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: Dict[str, Union[torch.Tensor
trl/trainer/dpo_trainer.py:1007
↓ 1 callers
Method
compute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: Dict[str, Union[torch.Tensor
trl/trainer/reward_trainer.py:196
↓ 1 callers
Method
compute_reward
Compute the reward for a list of histories.
trl/environment/base_environment.py:353
↓ 1 callers
Method
compute_rewards
(self, prompt_image_pairs, is_async=False)
trl/trainer/ddpo_trainer.py:212
↓ 1 callers
Method
concatenated_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 callers
Function
consolidate_ckpt
(src_path, dst_path)
open_omni/model/consolidate.py:14
↓ 1 callers
Function
convert_numbers_to_words
(text)
preprocess/tts/process_cosyvoice.py:32
↓ 1 callers
Function
convert_to_scalar
Converts the stats from a flattened dict to single scalar dicts
trl/core.py:89
↓ 1 callers
Method
create_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 callers
Method
create_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 callers
Function
ctc_postprocess
(tokens, blank)
open_omni/model/speech_generator/generation.py:608
↓ 1 callers
Function
display_image
(image)
open_omni/data_processing/utils.py:180
↓ 1 callers
Function
divide_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 callers
Method
dpo_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 callers
Function
entropy_from_logits
Calculate entropy from logits.
trl/core.py:189
↓ 1 callers
Function
exact_div
(a, b, a_str, b_str, custom_error_message="")
trl/trainer/utils.py:555
↓ 1 callers
Function
find_all_linear_names
(model)
open_omni/train/train.py:261
↓ 1 callers
Function
find_all_linear_names
(model)
open_omni/train/train_dpo.py:226
↓ 1 callers
Method
forward
(self, image_features, *args, **kwargs)
open_omni/model/multimodal_resampler/qformer.py:1135
↓ 1 callers
Method
forward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
open_omni/model/language_model/llava_llama.py:69
↓ 1 callers
Method
from_str
(cls, name)
local_demo/controller.py:33
↓ 1 callers
Method
gather_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 callers
Method
generate
( self, inputs: Optional[torch.Tensor] = None, generation_config: Optional[GenerationC
open_omni/model/speech_generator/generation.py:40
↓ 1 callers
Method
generate
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 callers
Method
generate_stream
(self, params)
local_demo/model_worker.py:149
↓ 1 callers
Method
generate_stream_gate
(self, params)
local_demo/model_worker.py:212
↓ 1 callers
Method
get_2dPool
(self, image_feature)
open_omni/model/llava_arch.py:229
↓ 1 callers
Method
get_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 callers
Method
get_batch_samples
Generate samples from the model and reference model for the given batch of inputs.
trl/trainer/dpo_trainer.py:1031
↓ 1 callers
Method
get_feats
(self, waveform)
preprocess/quantize/speech2unit.py:61
↓ 1 callers
Function
get_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 callers
Function
get_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 callers
Function
get_image
(image_path)
open_omni/data_processing/utils.py:43
↓ 1 callers
Method
get_images
(self, return_pil=False, return_path=False)
open_omni/conversation.py:233
↓ 1 callers
Function
get_mm_adapter_state_maybe_zero_3
(named_params, keys_to_match)
open_omni/train/train.py:255
↓ 1 callers
Function
get_mm_adapter_state_maybe_zero_3
(named_params, keys_to_match)
open_omni/train/train_dpo.py:220
↓ 1 callers
Function
get_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 callers
Function
get_modality_length_grouped_indices_auto
(lengths, batch_size, world_size, generator=None)
open_omni/train/llava_trainer.py:203
↓ 1 callers
Function
get_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 callers
Function
get_model
(model_args, training_args, bnb_model_from_pretrained_args)
open_omni/train/train.py:1627
↓ 1 callers
Function
get_model
(model_args, training_args, bnb_model_from_pretrained_args)
open_omni/train/train_dpo.py:1316
↓ 1 callers
Method
get_model
(self)
open_omni/model/language_model/llava_mistral.py:59
↓ 1 callers
Function
get_model_output
(model, image_processor, tokenizer, video, qs, args)
open_omni/eval/model_note.py:60
↓ 1 callers
Function
get_model_output
(model, image_processor, tokenizer, video, qs, args)
open_omni/eval/model_videoqa_mc.py:60
↓ 1 callers
Function
get_peft_state_maybe_zero_3
(named_params, bias)
open_omni/train/train.py:222
↓ 1 callers
Function
get_peft_state_maybe_zero_3
(named_params, bias)
open_omni/train/train_dpo.py:187
↓ 1 callers
Function
get_peft_state_non_lora_maybe_zero_3
(named_params, require_grad_only=True)
open_omni/train/train.py:247
↓ 1 callers
Function
get_peft_state_non_lora_maybe_zero_3
(named_params, require_grad_only=True)
open_omni/train/train_dpo.py:212
↓ 1 callers
Method
get_sft_loss
(self, logits, labels)
trl/trainer/dpo_trainer.py:835
↓ 1 callers
Method
get_speech_encoder
(self)
open_omni/model/llava_arch.py:269
↓ 1 callers
Method
get_speech_projector
(self)
open_omni/model/llava_arch.py:272
↓ 1 callers
Function
get_tokenize_len
(prompts)
open_omni/train/train.py:1227
↓ 1 callers
Function
get_tokenize_len
(prompts)
open_omni/train/train_dpo.py:879
↓ 1 callers
Method
get_trainable_layers
Returns the trainable parameters of the pipeline
trl/models/modeling_sd_base.py:137
↓ 1 callers
Function
get_variable_length_grouped_indices
(lengths, batch_size, world_size, megabatch_mult=8, generator=None)
open_omni/train/llava_trainer.py:73
↓ 1 callers
Method
initialize_speech_generator
(self, model_args)
open_omni/model/llava_arch.py:174
↓ 1 callers
Method
initialize_speech_modules
(self, model_args, fsdp=None)
open_omni/model/llava_arch.py:139
↓ 1 callers
Function
instructions_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 callers
Function
is_accelerate_greater_20_0
()
trl/import_utils.py:32
↓ 1 callers
Function
is_bitsandbytes_available
()
trl/import_utils.py:65
↓ 1 callers
Function
is_torch_greater_2_0
()
trl/import_utils.py:49
↓ 1 callers
Function
is_torchvision_available
()
trl/import_utils.py:72
↓ 1 callers
Function
is_transformers_greater_than
(version: str)
trl/import_utils.py:44
↓ 1 callers
Function
is_unsloth_available
()
trl/import_utils.py:28
↓ 1 callers
Method
list_models
(self)
local_demo/controller.py:112
↓ 1 callers
Method
load_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 callers
Function
load_from_hf
(repo_id, filename, subfolder=None)
open_omni/model/builder.py:101
↓ 1 callers
Function
load_speech
(audio, input_type, mel_size, speech_normalize)
local_demo/model_worker.py:49
↓ 1 callers
Function
load_video
(video, max_frames_num=16)
local_demo/model_worker.py:60
↓ 1 callers
Method
loss
( self, advantages: torch.Tensor, clip_range: float, ratio: torch.Tensor,
trl/trainer/ddpo_trainer.py:391
↓ 1 callers
Method
loss
Calculate policy and value losses. Args: old_logprobs (`torch.FloatTensor`): Log probabilities of the mo
trl/trainer/ppo_trainer.py:1113
↓ 1 callers
Function
main
()
preprocess/tts/process_cosyvoice.py:108
↓ 1 callers
Function
make_delta
(base_model_path, target_model_path, delta_path, hub_repo_id)
open_omni/model/make_delta.py:14
↓ 1 callers
Function
make_dpo_data_module
Make dataset and collator for supervised fine-tuning.
open_omni/train/train_dpo.py:1310
↓ 1 callers
Function
make_supervised_data_module
Make dataset and collator for supervised fine-tuning.
open_omni/train/train.py:1620
↓ 1 callers
Function
maybe_zero_3
(param, ignore_status=False, name=None)
open_omni/train/llava_trainer.py:30
↓ 1 callers
Method
merge_duplicates
(cluster_ids)
preprocess/quantize/speech2unit.py:148
↓ 1 callers
Function
parse_args
Parse command-line arguments.
open_omni/eval/model_note.py:37
↓ 1 callers
Function
parse_args
Parse command-line arguments.
open_omni/eval/model_videoqa_mc.py:37
↓ 1 callers
Method
parse_tool_call
Parse request string. Expected format: <request><tool_name>query<call>
trl/environment/base_environment.py:328
↓ 1 callers
Function
peft_module_casting_to_bf16
(model)
trl/trainer/utils.py:633
↓ 1 callers
Function
pipeline_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 callers
Method
prepare_dataloader
Prepare the dataloader for training. Args: dataset (Union[`torch.utils.data.Dataset`, `datasets.Dataset`]):
trl/trainer/ppo_trainer.py:351
↓ 1 callers
Method
prepare_model_inputs
(self, input_ids: torch.Tensor, attention_mask: torch.Tensor, labels: torch.Tensor)
trl/trainer/iterative_sft_trainer.py:130
↓ 1 callers
Method
prepare_model_inputs
(self, queries: torch.Tensor, responses: torch.Tensor)
trl/trainer/ppo_trainer.py:883
↓ 1 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.py:1193
↓ 1 callers
Function
preprocess_gemma
(sources: List[List[Dict[str, str]]], tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
open_omni/train/train.py:542
↓ 1 callers
Function
preprocess_gemma
(sources: List[List[Dict[str, str]]], tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
open_omni/train/train_dpo.py:488
↓ 1 callers
Function
preprocess_llama3
( sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False, max_len=2048,
open_omni/train/train_dpo.py:618
↓ 1 callers
Function
preprocess_llama3_av
( sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False, has_units: bo
open_omni/train/train.py:907
↓ 1 callers
Function
preprocess_llama_2
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
open_omni/train/train.py:467
↓ 1 callers
Function
preprocess_llama_2
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
open_omni/train/train_dpo.py:400
↓ 1 callers
Function
preprocess_mpt
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
open_omni/train/train.py:1090
↓ 1 callers
Function
preprocess_mpt
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
open_omni/train/train_dpo.py:746
↓ 1 callers
Function
preprocess_multimodal
(sources: Sequence[str], data_args: DataArguments)
open_omni/train/train.py:398
↓ 1 callers
Function
preprocess_multimodal_movie
(sources: Sequence[str], data_args: DataArguments, video_inputs: str)
open_omni/train/train_dpo.py:383
↓ 1 callers
Function
preprocess_plain
( sources: Sequence[str], tokenizer: transformers.PreTrainedTokenizer, )
open_omni/train/train.py:1171
↓ 1 callers
Function
preprocess_plain
( sources: Sequence[str], tokenizer: transformers.PreTrainedTokenizer, )
open_omni/train/train_dpo.py:827
← previous
next →
201–300 of 668, ranked by callers