Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QwenLM/Qwen-Audio
/ functions
Functions
232 in github.com/QwenLM/Qwen-Audio
⨍
Functions
232
◇
Types & classes
49
Method
forward
(self, max_seq_len, offset=0, ntk_alpha=1.0)
modeling_qwen.py:1380
Method
forward
(self, x)
modeling_qwen.py:1421
Method
forward
(self, x: Tensor)
audio.py:222
Method
forward
( self, x: Tensor, xa: Optional[Tensor] = None, mask: Optional[Tensor] = None,
audio.py:265
Method
forward
( self, x: Tensor, xa: Optional[Tensor] = None, mask: Optional[Tensor] = None,
audio.py:322
Method
forward
x : torch.Tensor, shape = (batch_size, n_mels, n_ctx) the mel spectrogram of the audio
audio.py:371
Method
from_list_format
(self, list_format: List[Dict])
tokenization_qwen.py:525
Function
get_batch
Generate batch from context tokens.
qwen_generation_utils.py:94
Method
get_input_embeddings
(self)
modeling_qwen.py:731
Method
get_input_ids
(text)
tokenization_qwen.py:368
Method
get_output_embeddings
(self)
modeling_qwen.py:1041
Method
get_vocab
(self)
tokenization_qwen.py:252
Function
label_to_binary_vector
Converts a list of labels into a binary vector Args: label: list of integer labels num_labels: total number of labels Re
eval_audio/heareval_score.py:35
Function
label_vocab_as_dict
Returns a dictionary of the label vocabulary mapping the label column to the idx column. key sets whether the label or idx is the key in the
eval_audio/heareval_score.py:19
Function
load_model_on_gpus
(model_name_or_path, num_gpus: int = 2)
utils.py:28
Function
pad_batch
(batch: BatchTokensType, pad_id: int, seq_length: int)
qwen_generation_utils.py:25
Method
prepare_inputs_for_generation
( self, input_ids, past_key_values=None, inputs_embeds=None, **kwargs )
modeling_qwen.py:1047
Function
regenerate
(_chatbot, task_history)
web_demo_audio.py:157
Function
reset_state
(task_history)
web_demo_audio.py:198
Function
reset_user_input
()
web_demo_audio.py:195
Method
save_vocabulary
Save only the vocabulary of the tokenizer (vocabulary). Returns: `Tuple(str)`: Paths to the files saved.
tokenization_qwen.py:280
Method
setAudioToEvalAudios
(self, scores, audioIds, method)
eval_audio/metrics.py:132
Method
setEval
(self, score, method)
eval_audio/metrics.py:129
Method
setEvalAudios
(self)
eval_audio/metrics.py:139
Method
set_input_embeddings
(self, new_embeddings)
modeling_qwen.py:734
Method
set_output_embeddings
(self, new_embeddings)
modeling_qwen.py:1044
Method
stream_generator
()
modeling_qwen.py:1281
Function
switch
(val1, val2, boolean)
qwen_generation_utils.py:429
Method
to_list_format
(self, text: str)
tokenization_qwen.py:500
Function
top_k_logits
This function has been mostly taken from huggingface conversational ai code at https://medium.com/huggingface/how-to-build-a-state-of-the-
qwen_generation_utils.py:399
Function
trim
Pad or trim the audio array to N_SAMPLES, as expected by the encoder.
audio.py:123
Method
vocab_size
(self)
tokenization_qwen.py:451
← previous
201–232 of 232, ranked by callers