MCPcopy Create free account

hub / github.com/ASLP-lab/OSUM-Pangu / functions

Functions1,198 in github.com/ASLP-lab/OSUM-Pangu

↓ 55 callersFunctionto_numpy
(tensor)
wenet/bin/export_onnx_cpu.py:59
↓ 49 callersMethoddecode
Decode input speech Args: methods:(List[str]): list of decoding methods to use, which could could contain the fo
wenet/transformer/asr_model.py:310
↓ 42 callersFunctionmake_pad_mask
Make mask tensor containing indices of padded part. See description of make_non_pad_mask. Args: lengths (torch.Tensor): Batch of len
wenet/utils/mask.py:201
↓ 40 callersFunctionget_feat_from_wav_path
...
common_utils/utils4infer.py:60
↓ 32 callersMethodlog_softmax
log_softmax of frame activations Args: Tensor hs_pad: 3d tensor (B, Tmax, eprojs) Returns: torch.Tensor: log
wenet/transformer/ctc.py:121
↓ 29 callersMethodupdate
(self)
wenet/dataset/dataset.py:62
↓ 20 callersMethodkeys
(self)
tools/compute-cer.py:246
↓ 16 callersFunctionopen_or_fd
fd = open_or_fd(file) Open file, gzipped file, pipe, or forward the file-descriptor. Eventually seeks in the 'file' argument contains ':offset'
wenet/dataset/kaldi_io.py:54
↓ 14 callersFunctioninit_model
(configs, encoder)
wenet/ssl/init_model.py:12
↓ 13 callersMethodargmax
argmax of frame activations Args: torch.Tensor hs_pad: 3d tensor (B, Tmax, eprojs) Returns: torch.Tensor: arg
wenet/transformer/ctc.py:131
↓ 12 callersMethod__init__
(self, dataset: IterDataPipe, buffer_size: int = 500, key_f
wenet/dataset/datapipes.py:154
↓ 12 callersMethod_add_bos_eos
(self, bos, eos, inputs_embeds, attention_mask, target=None)
wenet/llm_asr/llmasr_model_instruct_version.py:1633
↓ 12 callersFunctiontensor_to_scalar
(x)
wenet/utils/common.py:359
↓ 10 callersMethod__init__
(self, module)
wenet/bin/export_onnx_bpu.py:520
↓ 10 callersMethod_get_embedding_from_wav
return: wav_embedding: (b, l, v) wav_mask: (b, l), wav为有效值的位置为true
wenet/llm_asr/llmasr_model_instruct_version.py:1581
↓ 10 callersMethodgenerate
Generates responses for given prompts using Gemma model.
wenet/LLM/causallm_model.py:84
↓ 10 callersFunctionread_key
[key] = read_key(fd) Read the utterance-key from the opened ark/stream descriptor 'fd'.
wenet/dataset/kaldi_io.py:129
↓ 10 callersFunctionread_lists
(list_file)
wenet/utils/file_utils.py:18
↓ 9 callersFunctionDataset
Construct dataset from arguments We have two shuffle stage in the Dataset. The first is global shuffle at shards tar/raw file level.
wenet/dataset/dataset.py:387
↓ 9 callersMethod__init__
( self, optimizer: torch.optim.Optimizer, warmup_steps: Union[int, float, List[Union[i
wenet/utils/scheduler.py:43
↓ 9 callersMethod__init__
( self, in_features: int, out_features: int, r: int = 0,
wenet/finetune/lora/layers.py:105
↓ 9 callersMethod_sampler
Sample from logits. Args: logits: (1,1,vocab_size) temperatures: top_ps: top_ks:
wenet/llm_asr/llmasr_model_instruct_version.py:1747
↓ 9 callersFunctioninit_tokenizer
(configs)
wenet/utils/init_tokenizer.py:26
↓ 9 callersFunctions
(n)
tools/fst/ctc_token_fst_corrected.py:14
↓ 9 callersMethodtokenize
(self, label: str)
wenet/cli/model.py:141
↓ 8 callersMethod_build_tiktoken
(self)
wenet/text/whisper_tokenizer.py:46
↓ 8 callersFunctionadd_sos_eos
Add <sos> and <eos> labels. Args: ys_pad (torch.Tensor): batch of padded target sequences (B, Lmax) sos (int): index of <sos>
wenet/utils/common.py:113
↓ 8 callersMethodgenerate4chat
( self, wavs, wavs_len, prompt=" ", do_sample=True
wenet/llm_asr/llmasr_model_instruct_version.py:893
↓ 8 callersMethodgenerate4chat_think
( self, wavs, wavs_len, do_sample=True, top_k=2,
wenet/llm_asr/llmasr_model_instruct_version.py:983
↓ 8 callersMethodgenerate_text2text
( self, device, text, )
wenet/llm_asr/llmasr_model_instruct_version.py:1494
↓ 8 callersMethodgenerate_tts
( self, device, prompt, text, )
wenet/llm_asr/llmasr_model_instruct_version.py:1245
↓ 8 callersFunctionget_answer_prompt_by_task
(task_tag, answer_tag, asr_txt=None)
wenet/llm_asr/wav_instrcut_tools.py:108
↓ 8 callersFunctionload_model_and_tokenizer
封装了加载模型和分词器的逻辑 Args: checkpoint_path (str): 模型权重文件路径 config_path (str): 模型配置文件路径 device (torch.device): 加载模型的设备 R
common_utils/utils4infer.py:19
↓ 8 callersMethodposition_encoding
(self, offset: Union[int, torch.Tensor], size: int)
wenet/transformer/subsampling.py:32
↓ 8 callersMethodstart
(self)
wenet/utils/common.py:347
↓ 8 callersFunctionto_numpy
(tensors)
wenet/bin/export_onnx_gpu.py:722
↓ 7 callersMethod__init__
(self)
wenet/transformer/subsampling.py:27
↓ 7 callersMethod_forward_linearx
(self, name: str, x: torch.Tensor,
wenet/transformer/attention.py:83
↓ 7 callersFunctionmask_to_bias
(mask: torch.Tensor, dtype: torch.dtype)
wenet/utils/common.py:316
↓ 7 callersMethodoutput_size
(self)
wenet/transformer/encoder.py:121
↓ 6 callersMethod__init__
Actually, this implements stacking frames and skipping frames. if m = 1 and n = 1, just return the origin features. if m = 1
wenet/paraformer/layers.py:25
↓ 6 callersMethod_build_hugging_face
(self)
wenet/text/hugging_face_tokenizer.py:26
↓ 6 callersFunctiondistort
Distort a waveform in sample point level Args: x: the origin wavefrom func: the distort function rate: sample point-level
wenet/dataset/wav_distortion.py:262
↓ 6 callersMethodforward_attention
Compute attention context vector. Args: value (torch.Tensor): Transformed value, size (#batch, ..., n_head, time2
wenet/transformer/attention.py:133
↓ 6 callersFunctionload_checkpoint
(model: torch.nn.Module, path: str)
wenet/utils/checkpoint.py:37
↓ 6 callersFunctionlog_add
Stable log add
wenet/utils/common.py:305
↓ 6 callersFunctionmake_non_pad_mask
Make mask tensor containing indices of non-padded part. The sequences in a batch may have different lengths. To enable batch computing, paddi
wenet/utils/mask.py:230
↓ 6 callersFunctionoverride_config
(configs, override_list)
wenet/utils/config.py:18
↓ 6 callersFunctionpad_list
Perform padding for the list of tensors. Args: xs (List): List of Tensors [(T_1, `*`), (T_2, `*`), ..., (T_B, `*`)]. pad_value (f
wenet/utils/common.py:30
↓ 6 callersMethodset_epoch
(self, epoch)
wenet/dataset/dataset.py:168
↓ 5 callersMethod__init__
Construct an PositionalEncoding object.
wenet/transformer/embedding.py:38
↓ 5 callersFunctiondb2amp
(db)
wenet/dataset/wav_distortion.py:23
↓ 5 callersFunctiondo_s2t_speech_understanding
(model, input_wav_path, input_prompt)
infer_code/infer_ASR.py:38
↓ 5 callersFunctiondo_s2t_speech_understanding
(model, input_wav_path, input_prompt)
infer_code/infer_VED.py:38
↓ 5 callersFunctiondo_s2t_speech_understanding
(model, input_wav_path, input_prompt)
infer_code/infer_SRWT.py:38
↓ 5 callersFunctiondo_s2t_speech_understanding
(model, input_wav_path, input_prompt)
infer_code/infer_STTC.py:38
↓ 5 callersFunctiondo_s2t_speech_understanding
(model, input_wav_path, input_prompt)
infer_code/infer_SAP.py:38
↓ 5 callersFunctiondo_s2t_speech_understanding
(model, input_wav_path, input_prompt)
infer_code/infer_SSR.py:38
↓ 5 callersFunctiondo_s2t_speech_understanding
(model, input_wav_path, input_prompt)
infer_code/infer_SGC.py:38
↓ 5 callersFunctiondo_s2t_speech_understanding
(model, input_wav_path, input_prompt)
infer_code/infer_SER.py:38
↓ 5 callersMethodforward_qkv
Transform query, key and value. Args: query (torch.Tensor): Query tensor (#batch, ..., time1, size). key (torch.Tenso
wenet/transformer/attention.py:109
↓ 5 callersFunctionget_dataset
(data_type, data_list_file, tokenizer: BaseTokenizer, conf,
wenet/dataset/dataset.py:230
↓ 5 callersFunctionil
(n)
tools/fst/ctc_token_fst_corrected.py:6
↓ 5 callersMethodinit_state
( self, batch_size: int, device: torch.device, method: str = "zero", )
wenet/transducer/predictor.py:165
↓ 5 callersMethodoutput_size
(self)
wenet/squeezeformer/encoder.py:184
↓ 5 callersFunctionprint_input_output_info
(onnx_model, name, prefix="\t\t")
wenet/bin/export_onnx_cpu.py:66
↓ 5 callersFunctionsave_data
(tensor, dirs, prefix)
tools/onnx2horizonbin.py:69
↓ 5 callersFunctionth_accuracy
Calculate accuracy. Args: pad_outputs (Tensor): Prediction tensors (B * Lmax, D). pad_targets (LongTensor): Target label tensors
wenet/utils/common.py:272
↓ 4 callersMethodT
(self, w)
wenet/finetune/lora/layers.py:144
↓ 4 callersMethodT
(self, w)
wenet/finetune/lora/layers.py:230
↓ 4 callersMethod__init__
Construct an MultiHeadedAttention object.
wenet/transformer/attention.py:47
↓ 4 callersMethod__init__
(self, encoder: BaseEncoder, ctc: CTC, beam_size: int = 10)
wenet/bin/export_onnx_gpu.py:44
↓ 4 callersMethod__init__
Construct an Conv1dSubsampling object.
wenet/llm_asr/downsampler.py:15
↓ 4 callersFunction_download_fn
(output_dir, name, renmae: Optional[str] = None, version: s
wenet/paraformer/convert_paraformer_to_wenet_config_and_ckpt.py:220
↓ 4 callersMethod_forward_encoder
( self, speech: torch.Tensor, speech_lengths: torch.Tensor, decoding_chunk_siz
wenet/transformer/asr_model.py:271
↓ 4 callersMethod_update_kv_and_cache
( self, k: torch.Tensor, v: torch.Tensor, cache: T_CACHE,
wenet/transformer/attention.py:180
↓ 4 callersFunctionadd_optional_chunk_mask
Apply optional mask for encoder. Args: xs (torch.Tensor): padded input, (B, L, D), L for max length mask (torch.Tensor): mask fo
wenet/utils/mask.py:126
↓ 4 callersFunctionadd_whisper_tokens
Add whisper-style tokens. ([PREV] -> [previous text tokens or hotwords]).optional -- ┌-----------------------------------------------------
wenet/utils/common.py:159
↓ 4 callersFunctionctc_prefix_beam_search
Returns: List[List[List[int]]]: nbest result for each utterance
wenet/transformer/search.py:125
↓ 4 callersMethodforward_chunk
Forward just one chunk Args: xs (torch.Tensor): chunk input, with shape (b=1, time, mel-dim), where `time == (ch
wenet/transformer/encoder.py:208
↓ 4 callersMethodforward_step
Args: input (torch.Tensor): [batch_size, time_step=1] padding (torch.Tensor): [batch_size,1], 1 is padding value
wenet/transducer/predictor.py:185
↓ 4 callersMethodgenerate
( self, wavs, wavs_len, prompt, **kwargs )
wenet/llm_asr/llmasr_model_instruct_version.py:828
↓ 4 callersFunctiongenerate_amp_mask
Generate amplitude domain mask randomly in [-100db, 0db] Args: mask_num: the slot number of the mask Returns: A list of tupl
wenet/dataset/wav_distortion.py:123
↓ 4 callersFunctionget_question_prompt_by_task
(task_tag)
wenet/llm_asr/wav_instrcut_tools.py:86
↓ 4 callersFunctionget_question_wav_path_by_task
(task_tag)
wenet/llm_asr/wav_instrcut_tools.py:97
↓ 4 callersFunctionlrs_to_str
(lrs: List)
wenet/utils/common.py:336
↓ 4 callersFunctionmake_amp_mask
Get a amplitude domain mask from db domain mask Args: db_mask: Optional. A list of tuple. if None, using default value. Returns:
wenet/dataset/wav_distortion.py:105
↓ 4 callersMethodreset_parameters
(self)
wenet/finetune/lora/layers.py:137
↓ 4 callersFunctiontest
(xlist, blist, rtol=1e-3, atol=1e-5, tolerate_small_mismatch=True)
wenet/bin/export_onnx_gpu.py:735
↓ 4 callersMethodtrain
(self, mode: bool = True)
wenet/finetune/lora/layers.py:147
↓ 3 callersMethod__init__
(self, voca_size: int, embed_size: int, output_size: int,
wenet/transducer/predictor.py:62
↓ 3 callersMethod__init__
(self, channel: int, out_dim: int, kernel_size: int = 5,
wenet/squeezeformer/subsampling.py:109
↓ 3 callersMethod__init__
Args: input_size (int): input dim output_size (int): dimension of attention attention_heads (int): the nu
wenet/transformer/encoder.py:40
↓ 3 callersMethod_forward_encoder
( self, speech: torch.Tensor, speech_lengths: torch.Tensor, decoding_chunk_siz
wenet/paraformer/paraformer.py:276
↓ 3 callersMethod_get_linear_warmup_with_cosine_annealing_lr
(self, step)
wenet/utils/scheduler.py:548
↓ 3 callersMethod_get_warmup_lr
(self, step)
wenet/utils/scheduler.py:133
↓ 3 callersMethodcalculate_downsampling_factor
(self, i: int)
wenet/efficient_conformer/encoder.py:237
↓ 3 callersMethodcalculate_downsampling_factor
(self, i: int)
wenet/bin/export_onnx_gpu.py:450
↓ 3 callersFunctioncompute_mask_indices_v2
( shape, padding_mask, mask_prob: float, mask_length: int, mask_type:
wenet/ssl/bestrq/mask.py:58
↓ 3 callersMethodcopy_context
(self, prefix_score)
wenet/transformer/search.py:95
next →1–100 of 1,198, ranked by callers