MCPcopy Create free account

hub / github.com/boson-ai/higgs-audio / functions

Functions316 in github.com/boson-ai/higgs-audio

↓ 1 callersMethodgenerate
Generate audio from a chatml sample. Args: chat_ml_sample: A chatml sample. max_new_tokens: The maximum numbe
boson_multimodal/serve/serve_engine.py:341
↓ 1 callersMethodget_delay
(self)
boson_multimodal/audio_processing/descriptaudiocodec/dac/model/base.py:78
↓ 1 callersMethodgraph
(self)
boson_multimodal/model/higgs_audio/cuda_graph_runner.py:23
↓ 1 callersMethodinit_embed_
Initialize codebook. Args: data (tensor): [B * T, D].
boson_multimodal/audio_processing/quantization/core_vq_lsx_version.py:179
↓ 1 callersMethodinit_embed_
(self, data)
boson_multimodal/audio_processing/quantization/core_vq.py:139
↓ 1 callersFunctionis_logging_process
()
boson_multimodal/audio_processing/quantization/ddp_utils.py:24
↓ 1 callersFunctionkmeans
Memory-efficient K-means clustering. Args: samples (tensor): shape [N, D] num_clusters (int): number of centroids. nu
boson_multimodal/audio_processing/quantization/core_vq_lsx_version.py:83
↓ 1 callersFunctionkmeans
(samples, num_clusters: int, num_iters: int = 10)
boson_multimodal/audio_processing/quantization/core_vq.py:73
↓ 1 callersFunctionlaplace_smoothing
(x, n_categories: int, epsilon: float = 1e-5)
boson_multimodal/audio_processing/quantization/core_vq.py:52
↓ 1 callersFunctionmain
( model_path, audio_tokenizer, max_new_tokens, transcript, scene_prompt, temperature,
examples/generation.py:625
↓ 1 callersFunctionmain
(example: str)
examples/serve_engine/run_hf_example.py:18
↓ 1 callersFunctionmain
(args)
examples/vllm/run_chat_completion.py:184
↓ 1 callersFunctionmerge_input_ids_with_audio_features
Merge input_ids with audio features into final embeddings. Args: audio_features_embed (`torch.Tensor` of shape `(num_audios, max_aud
boson_multimodal/model/higgs_audio/utils.py:110
↓ 1 callersFunctionnormalize_chinese_punctuation
Convert Chinese (full-width) punctuation marks to English (half-width) equivalents.
examples/generation.py:44
↓ 1 callersFunctionprepare_chatml_dataframe_single_process
Prepare the ChatML DataFrame.
boson_multimodal/dataset/chatml_dataset.py:493
↓ 1 callersFunctionprepare_chunk_text
Chunk the text into smaller pieces. We will later feed the chunks one by one to the model. Parameters ---------- text : str The t
examples/generation.py:83
↓ 1 callersFunctionprepare_generation_context
Prepare the context for generation. The context contains the system message, user message, assistant message, and audio prompt if any.
examples/generation.py:387
↓ 1 callersMethodreplace_
(self, samples, mask)
boson_multimodal/audio_processing/quantization/core_vq_lsx_version.py:200
↓ 1 callersMethodreplace_
(self, samples, mask)
boson_multimodal/audio_processing/quantization/core_vq.py:151
↓ 1 callersFunctionrun_generate_multispeaker
(stream: bool = False)
examples/vllm/run_chat_completion.py:131
↓ 1 callersFunctionrun_smart_voice
()
examples/vllm/run_chat_completion.py:34
↓ 1 callersFunctionrun_voice_clone
(stream: bool = False)
examples/vllm/run_chat_completion.py:63
↓ 1 callersMethodsave
(self, path)
boson_multimodal/audio_processing/descriptaudiocodec/dac/model/base.py:28
↓ 1 callersMethodset_audio_special_tokens
(self, tokenizer: AutoTokenizer)
boson_multimodal/model/higgs_audio/modeling_higgs_audio.py:914
↓ 1 callersFunctionshould_merge
(_text: str)
boson_multimodal/serve/utils.py:105
↓ 1 callersFunctionsnake
(x, alpha)
boson_multimodal/audio_processing/descriptaudiocodec/dac/nn/layers.py:19
↓ 1 callersFunctiontest
()
boson_multimodal/audio_processing/quantization/ac.py:263
Method__aiter__
(self)
boson_multimodal/serve/serve_engine.py:134
Method__anext__
(self)
boson_multimodal/serve/serve_engine.py:137
Method__call__
Collate the input data with support for long audio processing.
boson_multimodal/data_collator/higgs_audio_collator.py:151
Method__call__
(self, input_ids, scores, **kwargs)
boson_multimodal/serve/serve_engine.py:164
Method__getitem__
Retrieve a dataset sample by index.
boson_multimodal/dataset/chatml_dataset.py:517
Method__init__
( self, model_path, audio_tokenizer, device=None, device_id=None,
examples/generation.py:179
Method__init__
( self, whisper_processor: WhisperProcessor, audio_in_token_id, audio_out_toke
boson_multimodal/data_collator/higgs_audio_collator.py:68
Method__init__
( self, tokenizer: "AutoTokenizer", skip_prompt: bool = False, timeout: Option
boson_multimodal/serve/serve_engine.py:76
Method__init__
(self, stop_signal: threading.Event)
boson_multimodal/serve/serve_engine.py:161
Method__init__
Initialize the HiggsAudioServeEngine, a serving wrapper for the HiggsAudioModel. The model, tokenizer, and audio tokenizer will be do
boson_multimodal/serve/serve_engine.py:182
Method__init__
(self, model)
boson_multimodal/model/higgs_audio/cuda_graph_runner.py:13
Method__init__
( self, num_mel_bins=128, encoder_layers=32, encoder_attention_heads=20,
boson_multimodal/model/higgs_audio/configuration_higgs_audio.py:10
Method__init__
(self, config: HiggsAudioConfig, layer_idx: Optional[int] = None)
boson_multimodal/model/higgs_audio/audio_head.py:29
Method__init__
(self, config: HiggsAudioConfig)
boson_multimodal/model/higgs_audio/modeling_higgs_audio.py:166
Method__init__
(self, config: HiggsAudioEncoderConfig)
boson_multimodal/model/higgs_audio/modeling_higgs_audio.py:191
Method__init__
( self, config: HiggsAudioConfig, layer_idx: int, fast_forward: bool = False, use_audio_attention: boo
boson_multimodal/model/higgs_audio/modeling_higgs_audio.py:397
Method__init__
:param original_embedding: An instance of nn.Embedding (the original embedding layer). :param freeze_until_idx: The index up to which
boson_multimodal/model/higgs_audio/custom_modules.py:14
Method__init__
(self, sampling_rate=16000)
boson_multimodal/audio_processing/higgs_audio_tokenizer.py:30
Method__init__
( self, n_filters: int = 32, D: int = 128, target_bandwidths: Sequence[Union[i
boson_multimodal/audio_processing/higgs_audio_tokenizer.py:44
Method__init__
(self, in_channels, out_channels, bias=True)
boson_multimodal/audio_processing/semantic_module.py:12
Method__init__
( self, in_channels: int, out_channels: int, kernel_size=3, dilation=1
boson_multimodal/audio_processing/semantic_module.py:58
Method__init__
( self, in_channels: int, out_channels: int, kernel_size: int, stride:
boson_multimodal/audio_processing/semantic_module.py:87
Method__init__
( self, in_channels: int, out_channels: int, stride: int, dilations=(1, 1), unit_kernel_size=3, bias=T
boson_multimodal/audio_processing/semantic_module.py:126
Method__init__
( self, input_channels: int, encode_channels: int, channel_ratios=(1, 1),
boson_multimodal/audio_processing/semantic_module.py:151
Method__init__
( self, in_channels: int, out_channels: int, stride: int, dilations=(1, 1), unit_kernel_size=3, bias=T
boson_multimodal/audio_processing/semantic_module.py:196
Method__init__
( self, code_dim: int, output_channels: int, decode_channels: int, cha
boson_multimodal/audio_processing/semantic_module.py:233
Method__init__
( self, dimension: int = 256, codebook_dim: int = None, n_q: int = 8,
boson_multimodal/audio_processing/quantization/vq.py:43
Method__init__
( self, dim: int, codebook_size: int, codebook_dim: tp.Optional[int] = None,
boson_multimodal/audio_processing/quantization/core_vq_lsx_version.py:307
Method__init__
(self, *, num_quantizers, **kwargs)
boson_multimodal/audio_processing/quantization/core_vq_lsx_version.py:383
Method__init__
( self, dim: int, codebook_size: int, codebook_dim: tp.Optional[int] = None,
boson_multimodal/audio_processing/quantization/core_vq.py:242
Method__init__
(self, *, num_quantizers, **kwargs)
boson_multimodal/audio_processing/quantization/core_vq.py:318
Method__init__
(self, fo: tp.IO[bytes], total_range_bits: int = 24)
boson_multimodal/audio_processing/quantization/ac.py:96
Method__init__
(self, fo: tp.IO[bytes], total_range_bits: int = 24)
boson_multimodal/audio_processing/quantization/ac.py:185
Method__init__
(self, dim: int = 16, dilation: int = 1)
boson_multimodal/audio_processing/descriptaudiocodec/dac/model/dac.py:25
Method__init__
(self, dim: int = 16, stride: int = 1)
boson_multimodal/audio_processing/descriptaudiocodec/dac/model/dac.py:44
Method__init__
( self, d_model: int = 64, strides: list = [2, 4, 8, 8], d_latent: int = 256,
boson_multimodal/audio_processing/descriptaudiocodec/dac/model/dac.py:65
Method__init__
(self, input_dim: int = 16, output_dim: int = 8, stride: int = 1, out_pad=0)
boson_multimodal/audio_processing/descriptaudiocodec/dac/model/dac.py:95
Method__init__
( self, input_channel, channels, rates, d_out: int = 1, )
boson_multimodal/audio_processing/descriptaudiocodec/dac/model/dac.py:117
Method__init__
(self, channels)
boson_multimodal/audio_processing/descriptaudiocodec/dac/nn/layers.py:28
Method__init__
( self, input_dim: int = 512, n_codebooks: int = 9, codebook_size: int = 1024,
boson_multimodal/audio_processing/descriptaudiocodec/dac/nn/quantize.py:101
Method__iter__
Retrieve a sample by iterating through the dataset.
boson_multimodal/dataset/chatml_dataset.py:524
Function_ceil_to_next_power_of_two
(self, x)
boson_multimodal/data_collator/higgs_audio_collator.py:19
Method_forward_core
( self, hidden_states: torch.Tensor, causal_mask: torch.Tensor, position_ids:
boson_multimodal/model/higgs_audio/modeling_higgs_audio.py:1078
Method_freeze_parameters
(self)
boson_multimodal/model/higgs_audio/modeling_higgs_audio.py:218
Function_get_sequence_parallel_world_size
()
boson_multimodal/model/higgs_audio/utils.py:745
Method_init_weights
(self, module)
boson_multimodal/model/higgs_audio/common.py:17
Function_patched_scaled_dot_product_attention
( query, key, value, attn_mask=None, dropout_p=0.0, is_causal=False, scale=None, enable_gqa=False
boson_multimodal/model/higgs_audio/modeling_higgs_audio.py:76
Function_patched_shape
(tensor: torch.Tensor, seq_len: int, bsz: int, num_heads: int, head_dim: int)
boson_multimodal/model/higgs_audio/modeling_higgs_audio.py:70
Method_sample
r""" Generates sequences of token ids for joint text/audio models using **multinomial sampling**. This function may also be revised t
boson_multimodal/model/higgs_audio/modeling_higgs_audio.py:1624
Functionall_gather_tensors
(input_, size=None, dim=0, group=None)
boson_multimodal/model/higgs_audio/utils.py:574
Functionasync_generator_wrap
Wrap an async generator with the first element.
boson_multimodal/serve/utils.py:19
Functionattention_decorator
(attn_func=None)
boson_multimodal/model/higgs_audio/utils.py:482
Functionaverage_metrics
Average a dictionary of metrics across all workers, using the optional `count` as unormalized weight.
boson_multimodal/audio_processing/quantization/distrib.py:111
Methodbackward
(ctx, grad_output)
boson_multimodal/model/higgs_audio/utils.py:570
Methodbackward
(ctx, grad_output)
boson_multimodal/model/higgs_audio/utils.py:661
Methodbackward
(ctx, grad_output)
boson_multimodal/model/higgs_audio/utils.py:683
Methodbin_search
(low_idx: int, high_idx: int)
boson_multimodal/audio_processing/quantization/ac.py:235
Methodcal_num_tokens
( self, encode_whisper_embed: bool = True, encode_audio_in_tokens: bool = False,
boson_multimodal/dataset/chatml_dataset.py:80
Methodcalculate_rec_loss
(self, rec, target)
boson_multimodal/audio_processing/higgs_audio_tokenizer.py:156
Methodcodebook
(self)
boson_multimodal/audio_processing/quantization/core_vq_lsx_version.py:341
Methodcodebook
(self)
boson_multimodal/audio_processing/quantization/core_vq.py:276
Methodcodebook_size
(self)
boson_multimodal/audio_processing/higgs_audio_tokenizer.py:150
Functioncontains_chinese
(text: str)
boson_multimodal/serve/utils.py:63
Methoddecode
(self, vq_code: torch.Tensor)
boson_multimodal/audio_processing/higgs_audio_tokenizer.py:296
Methoddecode
Decode the given codes to the quantized representation.
boson_multimodal/audio_processing/quantization/vq.py:113
Methoddecode
(self, embed_ind)
boson_multimodal/audio_processing/quantization/core_vq_lsx_version.py:350
Methoddecode
(self, q_indices: torch.Tensor)
boson_multimodal/audio_processing/quantization/core_vq_lsx_version.py:419
Methoddecode
(self, embed_ind)
boson_multimodal/audio_processing/quantization/core_vq.py:285
Methoddecode
(self, q_indices: torch.Tensor)
boson_multimodal/audio_processing/quantization/core_vq.py:354
Functiondeepspeed_ulysses_attention
Perform all-to-all before and after the attention function.
boson_multimodal/model/higgs_audio/utils.py:479
Functiondeepspeed_ulysses_rope
Slice the corresponding cos and sin chunks for rope.
boson_multimodal/model/higgs_audio/utils.py:510
Methoddelta
Return the current range width.
boson_multimodal/audio_processing/quantization/ac.py:107
Methoddelta
(self)
boson_multimodal/audio_processing/quantization/ac.py:198
← previousnext →101–200 of 316, ranked by callers