MCPcopy Create free account

hub / github.com/QwenLM/Qwen-Audio / functions

Functions232 in github.com/QwenLM/Qwen-Audio

↓ 23 callersMethodfrom_pretrained
( cls, pretrained_model_name_or_path: Optional[Union[str, os.PathLike]], *
modeling_qwen.py:1019
↓ 13 callersMethodencode
(self, input_audios: Tensor, input_audio_lengths: Tensor, audio_span_tokens: List)
audio.py:427
↓ 11 callersMethodprocess_audio
(self, text)
tokenization_qwen.py:549
↓ 10 callersMethodgenerate
( self, inputs: Optional[torch.Tensor] = None, generation_config: Optional[GenerationC
modeling_qwen.py:1295
↓ 8 callersMethod__init__
(self, config)
modeling_qwen.py:561
↓ 6 callersFunction_parse_text
(text)
web_demo_audio.py:66
↓ 4 callersFunction_tokenize_str
(role, content)
qwen_generation_utils.py:137
↓ 4 callersFunctionapply_rotary_pos_emb
(t, freqs)
modeling_qwen.py:1394
↓ 4 callersMethodtokenize
(self, sent: str)
eval_audio/evaluate_tokenizer.py:49
↓ 3 callersFunction_replace_closed_tag
( input_tokens: List[Any], start_tags: Union[Any, Tuple[Any]], end_tags: Union[Any, Tu
tokenization_qwen.py:82
↓ 3 callersMethod_split_heads
(self, tensor, num_heads, attn_head_size)
modeling_qwen.py:400
↓ 3 callersMethodconvert_tokens_to_ids
( self, tokens: Union[bytes, str, List[Union[bytes, str]]] )
tokenization_qwen.py:255
↓ 3 callersFunctionexact_div
(x, y)
audio.py:16
↓ 2 callersMethod__init__
( self, n_mels: int, n_ctx: int, n_state: int, n_h
audio.py:337
↓ 2 callersMethod_compute
(self, predictions: np.ndarray, targets: np.ndarray, **kwargs)
eval_audio/heareval_score.py:328
↓ 2 callersFunction_list_find
( input_list: List[Any], candidates: Tuple[Any], start: int = 0, )
tokenization_qwen.py:71
↓ 2 callersFunctiondequantize_cache_torch
(qdata, scale, zero)
modeling_qwen.py:143
↓ 2 callersFunctionget_note_info
(text)
eval_audio/evaluate_note_analysis.py:27
↓ 2 callersMethodget_ntk_alpha
(self, true_seq_len)
modeling_qwen.py:737
↓ 2 callersFunctionget_stop_words_ids
(chat_format, tokenizer)
qwen_generation_utils.py:109
↓ 2 callersFunctionload_audio
Open an audio file and read as mono waveform, resampling as necessary Parameters ---------- file: str The audio file to open
audio.py:58
↓ 2 callersFunctionmake_context
( tokenizer: PreTrainedTokenizer, query: str, history: List[Tuple[str, str]] = None, system: s
qwen_generation_utils.py:119
↓ 2 callersFunctionquantize_cache_v
(fdata, bits, qmax, qmin)
modeling_qwen.py:121
↓ 2 callersMethodread_timestamps
(self, body_list)
eval_audio/evaluate_srwt.py:147
↓ 2 callersFunctionremove_sp
(text, language)
eval_audio/evaluate_asr.py:92
↓ 2 callersFunctionremove_sp
(text, language)
eval_audio/evaluate_srwt.py:90
↓ 2 callersMethodsed_eval_event_container
( x: Dict[str, List[Dict[str, Any]]] )
eval_audio/heareval_score.py:248
↓ 2 callersMethodtokenize
Converts a string in a sequence of tokens. Args: text (`str`): The sequence to be encoded. a
tokenization_qwen.py:294
↓ 2 callersFunctionwrite_json
Write a dict or a list of dicts into a JSON file :param data: Data to write :type data: list[dict[str, any]] | dict[str, any] :param path
eval_audio/metrics.py:11
↓ 1 callersMethod__init__
:param label_to_idx: Map from label string to integer index. :param name: Override the name of this scoring function. :param
eval_audio/heareval_score.py:97
↓ 1 callersMethod_attn
(self, query, key, value, registered_causal_mask, attention_mask=None, head_mask=None)
modeling_qwen.py:316
↓ 1 callersMethod_calc_stopped_samples
(self, prev_input_ids: Iterable[int])
qwen_generation_utils.py:385
↓ 1 callersMethod_compute
Compute the score based on the predictions and targets. This is a private function and the metric should be used as a functor
eval_audio/heareval_score.py:123
↓ 1 callersFunction_decode_chatml
( tokens: List[int], *, stop_words: List[str], eod_token_ids: List[int], tokenizer: PreTra
qwen_generation_utils.py:235
↓ 1 callersFunction_decode_default
( tokens: List[int], *, stop_words: List[str], eod_words: List[str], tokenizer: PreTrained
qwen_generation_utils.py:200
↓ 1 callersFunction_device_map
(num_gpus, num_layers)
utils.py:6
↓ 1 callersFunction_get_args
()
web_demo_audio.py:24
↓ 1 callersMethod_get_local_indices
(total_size, world_size, rank)
eval_audio/evaluate_note_analysis.py:101
↓ 1 callersMethod_get_local_indices
(total_size, world_size, rank)
eval_audio/evaluate_asr.py:77
↓ 1 callersMethod_get_local_indices
(total_size, world_size, rank)
eval_audio/evaluate_vocal_sound.py:72
↓ 1 callersMethod_get_local_indices
(total_size, world_size, rank)
eval_audio/evaluate_caption.py:107
↓ 1 callersMethod_get_local_indices
(total_size, world_size, rank)
eval_audio/evaluate_st.py:72
↓ 1 callersMethod_get_local_indices
(total_size, world_size, rank)
eval_audio/evaluate_aqa.py:73
↓ 1 callersMethod_get_local_indices
(total_size, world_size, rank)
eval_audio/evaluate_scene.py:73
↓ 1 callersMethod_get_local_indices
(total_size, world_size, rank)
eval_audio/evaluate_srwt.py:75
↓ 1 callersMethod_get_local_indices
(total_size, world_size, rank)
eval_audio/evaluate_emotion.py:72
↓ 1 callersFunction_import_flash_attn
()
modeling_qwen.py:85
↓ 1 callersFunction_launch_demo
(args, model, tokenizer)
web_demo_audio.py:98
↓ 1 callersFunction_load_model_tokenizer
(args)
web_demo_audio.py:43
↓ 1 callersFunction_load_tiktoken_bpe
(tiktoken_bpe_file: str)
tokenization_qwen.py:62
↓ 1 callersMethod_merge_heads
(self, tensor, num_heads, attn_head_size)
modeling_qwen.py:405
↓ 1 callersMethod_norm
(self, x)
modeling_qwen.py:1418
↓ 1 callersFunction_rotate_half
(x)
modeling_qwen.py:1386
↓ 1 callersMethod_shift
(self, filtered_timestamp_list1, filtered_timestamp_list2)
eval_audio/evaluate_srwt.py:173
↓ 1 callersMethod_tokens_match
(self, prev_tokens: torch.LongTensor, tokens: List[int])
qwen_generation_utils.py:372
↓ 1 callersMethodas_cal
(self, ts_list1, ts_list2)
eval_audio/evaluate_srwt.py:180
↓ 1 callersMethodchat
( self, tokenizer: PreTrainedTokenizer, query: str, history: Optional[HistoryT
modeling_qwen.py:1163
↓ 1 callersFunctioncompute_caption
(gts, res)
eval_audio/evaluate_caption.py:27
↓ 1 callersFunctioncompute_wer
(refs, hyps, language)
eval_audio/evaluate_asr.py:101
↓ 1 callersFunctioncompute_wer
(refs, hyps, language)
eval_audio/evaluate_srwt.py:99
↓ 1 callersFunctiondecode_tokens
( tokens: Union[torch.LongTensor, TokensType], tokenizer: PreTrainedTokenizer, raw_text_len: int,
qwen_generation_utils.py:273
↓ 1 callersMethodextract_audio_urls
(self, text)
tokenization_qwen.py:545
↓ 1 callersMethodforward
(self, x: Tensor)
audio.py:230
↓ 1 callersFunctionget_T_after_cnn
(L_in, dilation=1)
audio.py:35
↓ 1 callersFunctionget_ltor_masks_and_position_ids
Build masks and position id for left to right model.
qwen_generation_utils.py:33
↓ 1 callersFunctionload_bytesio_audio
(content, sr: int = SAMPLE_RATE)
audio.py:42
↓ 1 callersFunctionlog_mel_spectrogram
Compute the log-Mel spectrogram of Parameters ---------- audio: Union[str, np.ndarray, torch.Tensor], shape = (*) The path t
audio.py:157
↓ 1 callersFunctionmain
()
web_demo_audio.py:253
↓ 1 callersFunctionmel_filters
load the mel filterbank matrix for projecting STFT into a Mel spectrogram. Allows decoupling librosa dependency; saved using: np.sav
audio.py:139
↓ 1 callersMethodpad_input
(self, hidden_states, indices, batch, seqlen)
modeling_qwen.py:174
↓ 1 callersFunctionpad_or_trim
Pad or trim the audio array to N_SAMPLES, as expected by the encoder.
audio.py:98
↓ 1 callersFunctionpredict
(_chatbot, task_history)
web_demo_audio.py:103
↓ 1 callersMethodqkv_attention
( self, q: Tensor, k: Tensor, v: Tensor, mask: Optional[Tensor] = None )
audio.py:287
↓ 1 callersFunctionreformat_to_coco
Reformat annotations to the MSCOCO format :param predictions: List of predicted captions :type predictions: list[str] :param ground_truth
eval_audio/metrics.py:24
↓ 1 callersMethodremove_punctuation
Remove punctuation based on Unicode category.
eval_audio/evaluate_tokenizer.py:43
↓ 1 callersFunctionsinusoids
Returns sinusoids for positional embedding
audio.py:247
↓ 1 callersMethodtokenize
(self)
eval_audio/metrics.py:115
↓ 1 callersMethodunpad_input
(self, hidden_states, attention_mask)
modeling_qwen.py:165
↓ 1 callersMethodupdate_rotary_pos_emb_cache
(self, max_seq_len, offset=0, ntk_alpha=1.0)
modeling_qwen.py:1356
↓ 1 callersFunctionvalidate_score_return_type
Valid return types for the metric are - tuple(tuple(string: name of the subtype, float: the value)): This is the case with se
eval_audio/heareval_score.py:57
Method__call__
( self, input_ids: torch.LongTensor, scores: torch.FloatTensor )
qwen_generation_utils.py:363
Method__call__
(self, refs, hyps)
eval_audio/evaluate_srwt.py:129
Method__call__
Calls the compute function of the metric, and after validating the output, returns the metric score
eval_audio/heareval_score.py:114
Method__del__
(self)
eval_audio/metrics.py:110
Method__getitem__
(self, idx)
eval_audio/evaluate_note_analysis.py:61
Method__getitem__
(self, idx)
eval_audio/evaluate_asr.py:37
Method__getitem__
(self, idx)
eval_audio/evaluate_vocal_sound.py:32
Method__getitem__
(self, idx)
eval_audio/evaluate_caption.py:67
Method__getitem__
(self, idx)
eval_audio/evaluate_st.py:30
Method__getitem__
(self, idx)
eval_audio/evaluate_aqa.py:32
Method__getitem__
(self, idx)
eval_audio/evaluate_scene.py:33
Method__getitem__
(self, idx)
eval_audio/evaluate_srwt.py:35
Method__getitem__
(self, idx)
eval_audio/evaluate_emotion.py:32
Method__getstate__
(self)
tokenization_qwen.py:232
Method__init__
( self, vocab_size=151936, hidden_size=4096, num_hidden_layers=32, num
configuration_qwen.py:13
Method__init__
( self, causal=False, softmax_scale=None, attention_dropout=0.0, )
modeling_qwen.py:148
Method__init__
(self, config)
modeling_qwen.py:241
Method__init__
(self, config)
modeling_qwen.py:580
Method__init__
(self, *inputs, **kwargs)
modeling_qwen.py:648
Method__init__
(self, config)
modeling_qwen.py:682
next →1–100 of 232, ranked by callers