MCPcopy Create free account

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

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

↓ 2 callersMethodsubsampling_rate
Export interface for c++ call, return subsampling_rate of the model
wenet/transformer/asr_model.py:389
↓ 2 callersFunctionsubsequent_chunk_mask
Create mask for subsequent steps (size, size) with chunk size, this is for streaming encoder Args: size (int): size of mask
wenet/utils/mask.py:88
↓ 2 callersMethodtar_file_and_group
(self, sample)
tools/extract_shard_data.py:70
↓ 2 callersMethodtie_or_clone_weights
Tie or clone module weights (between word_emb and output_layer) depending of whether we are using TorchScript or not
wenet/transformer/decoder.py:283
↓ 2 callersFunctiontokenize_by_bpe_model
(sp, txt)
wenet/text/tokenize_utils.py:18
↓ 2 callersMethodtotal_score
(self)
wenet/transformer/search.py:92
↓ 2 callersMethodupdate_context
(self, context_graph, prefix_score, word_id)
wenet/transformer/search.py:99
↓ 2 callersFunctionwidth
(string)
tools/compute-cer.py:250
↓ 2 callersFunctionwidth
(string)
tools/compute-wer.py:243
↓ 1 callersFunctionBigDataset
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:330
↓ 1 callersMethodCTL
(self, x, y, negs, mask=None)
wenet/ctl_model/asr_model_ctl.py:260
↓ 1 callersFunctionDataset
Construct dataset from arguments for ssl model We have two shuffle stage in the Dataset. The first is global shuffle at shards tar/r
wenet/ssl/init_dataset.py:42
↓ 1 callersMethod__init__
( self, size: int, linear_units: int, kernel_size: int, dropout_rate:
wenet/branchformer/cgmlp.py:137
↓ 1 callersMethod__init__
( self, input_size: int, output_size: int = 256, use_attn: bool = True,
wenet/branchformer/encoder.py:32
↓ 1 callersMethod__init__
( self, idim, l_order, r_order, threshold=1.0, dropout=0.1,
wenet/paraformer/paraformer.py:39
↓ 1 callersMethod__init__
( self, idim, l_order, r_order, threshold=1.0, dropout=0.1,
wenet/paraformer/cif.py:26
↓ 1 callersMethod__init__
( self, vocab_size: int, encoder_output_size: int, attention_heads: int = 4,
wenet/transformer/decoder.py:63
↓ 1 callersMethod__init__
Construct CTC module Args: odim: dimension of outputs encoder_output_size: number of encoder projection units
wenet/transformer/ctc.py:73
↓ 1 callersMethod__init__
Construct an EncoderLayer object.
wenet/transformer/encoder_layer.py:150
↓ 1 callersMethod__init__
Construct DualConformerEncoder Support both the full context mode and the streaming mode separately
wenet/ctl_model/encoder.py:99
↓ 1 callersMethod__init__
(self, encoder, encoder_output_dim, llm_path,
wenet/llm_asr/llmasr_model_instruct_version.py:49
↓ 1 callersMethod_apply_mask
( self, xs: torch.Tensor, xs_masks: torch.Tensor)
wenet/ssl/w2vbert/w2vbert_model.py:253
↓ 1 callersMethod_apply_mask
( self, xs: torch.Tensor, xs_masks: torch.Tensor)
wenet/ssl/wav2vec2/wav2vec2_model.py:285
↓ 1 callersMethod_apply_mask_signal
( self, input: torch.Tensor, input_lens: torch.Tensor)
wenet/ssl/bestrq/bestrq_model.py:216
↓ 1 callersFunction_batch_beam_search
Perform batch beam search Args: logit: shape (batch_size, seq_length, vocab_size) masks: shape (batch_size, seq_leng
wenet/paraformer/search.py:200
↓ 1 callersMethod_cal_attn_score
( self, encoder_out: torch.Tensor, encoder_mask: torch.Tensor, hyps_pad: torch
wenet/transducer/transducer.py:187
↓ 1 callersMethod_cal_transducer_score
( self, encoder_out: torch.Tensor, encoder_mask: torch.Tensor, hyps_lens: torc
wenet/transducer/transducer.py:160
↓ 1 callersMethod_calc_att_loss
( self, encoder_out: torch.Tensor, encoder_mask: torch.Tensor, ys_pad: torch.T
wenet/paraformer/paraformer.py:218
↓ 1 callersMethod_calc_lfmmi_loss
(self, encoder_out, encoder_mask, text)
wenet/k2/model.py:100
↓ 1 callersMethod_compute_loss
(self, encoder_out: torch.Tensor, encoder_out_lens: torch.Tensor,
wenet/transducer/transducer.py:474
↓ 1 callersMethod_compute_loss
(self, input: torch.Tensor, target: torch.Tensor, mask: torch.Tensor)
wenet/ssl/bestrq/bestrq_model.py:279
↓ 1 callersMethod_compute_mlm_loss
(self, input: torch.Tensor, target: torch.Tensor, mask: torch.Tensor)
wenet/ssl/w2vbert/w2vbert_model.py:273
↓ 1 callersFunction_cosine_annealing
(initial_lr, step, max_steps, min_lr)
wenet/utils/scheduler.py:396
↓ 1 callersMethod_fill_fail_output
This function fills the fail arc for each trie node, it can be computed in linear time by performing a breadth-first search starting from the
wenet/utils/context_graph.py:176
↓ 1 callersFunction_filter_dict_fields
(input_dict, fields_to_keep)
wenet/paraformer/convert_paraformer_to_wenet_config_and_ckpt.py:46
↓ 1 callersMethod_forward
( self, x: torch.Tensor, mask: torch.Tensor, pos_emb: torch.Tensor, ma
wenet/branchformer/encoder_layer.py:111
↓ 1 callersMethod_forward
( self, x: torch.Tensor, mask: torch.Tensor, pos_emb: torch.Tensor, ma
wenet/e_branchformer/encoder_layer.py:93
↓ 1 callersMethod_forward_ctc
( self, encoder_out: torch.Tensor, encoder_mask: torch.Tensor, text: torch.Tensor,
wenet/k2/model.py:60
↓ 1 callersMethod_forward_encoder_blocks
( self, xs: torch.Tensor, xs_masks: torch.Tensor, pos_emb: torch.Tensor, mask_pad: torch.Tenso
wenet/ssl/w2vbert/w2vbert_model.py:296
↓ 1 callersMethod_forward_encoder_blocks
(self, xs: torch.Tensor, xs_masks: torch.Tensor, pos_emb: torch.Tensor, mask_p
wenet/ssl/wav2vec2/wav2vec2_model.py:312
↓ 1 callersMethod_forward_subsampling
( self, xs: torch.Tensor, xs_lens: torch.Tensor )
wenet/ssl/w2vbert/w2vbert_model.py:286
↓ 1 callersMethod_forward_subsampling
( self, xs: torch.Tensor, xs_lens: torch.Tensor )
wenet/ssl/wav2vec2/wav2vec2_model.py:302
↓ 1 callersMethod_get_constant_lr
(self, step)
wenet/utils/scheduler.py:374
↓ 1 callersMethod_get_lr
Simple const lr policy
wenet/utils/scheduler.py:198
↓ 1 callersMethod_get_lr
Simple const lr policy
wenet/utils/scheduler.py:377
↓ 1 callersMethod_get_warmup_lr
(self, step)
wenet/utils/scheduler.py:370
↓ 1 callersFunction_linear_warmup_with_cosine_annealing
(max_lr, warmup_steps, step, decay_steps, min_lr)
wenet/utils/scheduler.py:402
↓ 1 callersFunction_load_json_cmvn
Load the json format cmvn stats file and calculate cmvn Args: json_cmvn_file: cmvn stats file in json format Returns: a num
wenet/utils/cmvn.py:21
↓ 1 callersFunction_load_kaldi_cmvn
Load the kaldi format cmvn stats file and calculate cmvn Args: kaldi_cmvn_file: kaldi text style global cmvn file, which is
wenet/utils/cmvn.py:46
↓ 1 callersFunction_load_paraformer_cmvn
(cmvn_file)
wenet/paraformer/convert_paraformer_to_wenet_config_and_ckpt.py:17
↓ 1 callersMethod_nearest_embedding_idx
(self, xs: torch.Tensor)
wenet/ssl/bestrq/bestrq_model.py:290
↓ 1 callersMethod_noam_annealing
(self, initial_lr, step)
wenet/utils/scheduler.py:616
↓ 1 callersFunction_noam_hold_annealing
(initial_lr, step, warmup_steps, hold_steps, decay_rate, min_lr)
wenet/utils/scheduler.py:438
↓ 1 callersMethod_norm
(self, x)
wenet/transformer/norm.py:19
↓ 1 callersFunction_read_compressed_mat
Read a compressed matrix, see: https://github.com/kaldi-asr/kaldi/blob/master/src/matrix/compressed-matrix.h methods: CompressedMatrix::R
wenet/dataset/kaldi_io.py:487
↓ 1 callersFunction_read_mat_ascii
(fd)
wenet/dataset/kaldi_io.py:472
↓ 1 callersFunction_read_mat_binary
(fd)
wenet/dataset/kaldi_io.py:450
↓ 1 callersMethod_relative_indices
(self, keys: torch.Tensor)
wenet/transformer/attention.py:546
↓ 1 callersFunction_sampler
(pdf: torch.Tensor, num_samples: int, device=torch.device('cpu'))
wenet/ssl/bestrq/mask.py:5
↓ 1 callersMethod_sampler
(self, encoder_out, encoder_out_mask, ys_pad, ys_pad_lens, pre_acoustic_embeds)
wenet/paraformer/paraformer.py:236
↓ 1 callersFunction_square_annealing
(initial_lr, step, max_steps, min_lr)
wenet/utils/scheduler.py:389
↓ 1 callersFunction_squareroot_annealing
(initial_lr, step, max_steps, min_lr)
wenet/utils/scheduler.py:382
↓ 1 callersMethod_stack_features
(self, input: torch.Tensor, input_lens: torch.Tensor)
wenet/ssl/bestrq/bestrq_model.py:257
↓ 1 callersFunction_to_wenet_cmvn
(cmvn_file)
wenet/paraformer/convert_paraformer_to_wenet_config_and_ckpt.py:54
↓ 1 callersFunctionadd_dataset_args
(parser)
wenet/utils/train_utils.py:101
↓ 1 callersFunctionadd_ddp_args
(parser)
wenet/utils/train_utils.py:187
↓ 1 callersFunctionadd_deepspeed_args
(parser)
wenet/utils/train_utils.py:204
↓ 1 callersFunctionadd_fsdp_args
(parser)
wenet/utils/train_utils.py:227
↓ 1 callersFunctionadd_lora_args
Configure parameters for LoRA fine-tuning. Set use_lora and only_optimize_lora to true to enable LoRA functionality. LoRA will be inject
wenet/utils/train_utils.py:126
↓ 1 callersFunctionadd_model_args
(parser)
wenet/utils/train_utils.py:59
↓ 1 callersFunctionadd_trace_args
(parser)
wenet/utils/train_utils.py:89
↓ 1 callersMethodalign
(self, audio_file: str, label: str)
wenet/cli/model.py:156
↓ 1 callersFunctionamp2db
(amp)
wenet/dataset/wav_distortion.py:27
↓ 1 callersFunctionapply_fsdp_checkpointing
(model, ckpt_layer_types: tuple)
wenet/utils/fsdp_utils.py:100
↓ 1 callersFunctionarrange
(s, e, length, keep_length, mask_idc)
wenet/ssl/bestrq/mask.py:112
↓ 1 callersFunctionattention_beam_search
( model, encoder_out: torch.Tensor, encoder_mask: torch.Tensor, beam_size: int = 10, lengt
wenet/transformer/search.py:250
↓ 1 callersFunctionaverage_model_parameters
从step_xxx.pt文件中提取数字,按数字排序后取最后num_pt个文件计算参数平均值,为每个参数保留原始数据类型 Args: pt_files: 模型参数文件路径列表(文件名格式为step_xxx.pt) output_avg_path: 平
common_utils/do_avg_for_exp_dir.py:47
↓ 1 callersFunctionbasic_greedy_search
( model: torch.nn.Module, encoder_out: torch.Tensor, encoder_out_lens: torch.Tensor, n_steps:
wenet/transducer/search/greedy_search.py:6
↓ 1 callersFunctionbatch_backward
(model, scaler, info_dict)
wenet/utils/train_utils.py:726
↓ 1 callersFunctionbatch_inference_llama_questions
处理speech-web-questions_en.jsonl格式文件,输出指定JSON格式结果 Args: jsonl_path: 输入JSONL文件路径 output_json_path: 输出JSON文件路径 prom
infer_code/infer_STTC.py:275
↓ 1 callersFunctionbatch_inference_s2t_json_list
批量进行S2T推理(支持data.list JSON行格式) Args: json_list_path: data.list文件路径(每行一个JSON对象) output_txt_path: 输出结果文件路径 prompt:
infer_code/infer_ASR.py:186
↓ 1 callersFunctionbatch_inference_s2t_json_list
批量进行S2T推理(支持data.list JSON行格式) Args: json_list_path: data.list文件路径(每行一个JSON对象) output_txt_path: 输出结果文件路径 prompt:
infer_code/infer_VED.py:186
↓ 1 callersFunctionbatch_inference_s2t_json_list
批量进行S2T推理(支持data.list JSON行格式) Args: json_list_path: data.list文件路径(每行一个JSON对象) output_txt_path: 输出结果文件路径 prompt:
infer_code/infer_SRWT.py:186
↓ 1 callersFunctionbatch_inference_s2t_json_list
批量进行S2T推理(支持data.list JSON行格式) Args: json_list_path: data.list文件路径(每行一个JSON对象) output_txt_path: 输出结果文件路径 prompt:
infer_code/infer_STTC.py:194
↓ 1 callersFunctionbatch_inference_s2t_json_list
批量进行S2T推理(支持data.list JSON行格式) Args: json_list_path: data.list文件路径(每行一个JSON对象) output_txt_path: 输出结果文件路径 prompt:
infer_code/infer_SAP.py:186
↓ 1 callersFunctionbatch_inference_s2t_json_list
批量进行S2T推理(支持data.list JSON行格式) Args: json_list_path: data.list文件路径(每行一个JSON对象) output_txt_path: 输出结果文件路径 prompt:
infer_code/infer_SSR.py:186
↓ 1 callersFunctionbatch_inference_s2t_json_list
批量进行S2T推理(支持data.list JSON行格式) Args: json_list_path: data.list文件路径(每行一个JSON对象) output_txt_path: 输出结果文件路径 prompt:
infer_code/infer_SGC.py:186
↓ 1 callersFunctionbatch_inference_s2t_json_list
批量进行S2T推理(支持data.list JSON行格式) Args: json_list_path: data.list文件路径(每行一个JSON对象) output_txt_path: 输出结果文件路径 prompt:
infer_code/infer_SER.py:186
↓ 1 callersMethodbatch_to_cache
Args: cache: [state_m, state_c] state_ms: [1*n_layers, bs, ...] state_cs: [1*n_layers, bs, ...]
wenet/transducer/predictor.py:128
↓ 1 callersMethodbuild_graph
Build the ContextGraph from a list of token list. It first build a trie from the given token lists, then fill the fail arc for each tr
wenet/utils/context_graph.py:144
↓ 1 callersMethodcache_to_batch
Args: cache : [[state_m_1, state_c_1], [state_m_1, state_c_1]...] Returns: new_caceh: [state_ms, state_cs],
wenet/transducer/predictor.py:150
↓ 1 callersMethodcalculate
(self, lab, rec)
tools/compute-cer.py:102
↓ 1 callersMethodcalculate
(self, lab, rec)
tools/compute-wer.py:96
↓ 1 callersMethodcalculate_downsampling_factor
(self, i: int)
wenet/squeezeformer/encoder.py:251
↓ 1 callersMethodcalculate_downsampling_factor
(self, i: int)
wenet/bin/export_onnx_gpu.py:253
↓ 1 callersMethodcheck_ascending_list
(self)
wenet/squeezeformer/encoder.py:243
↓ 1 callersMethodcheck_equal
(self, module)
wenet/bin/export_onnx_bpu.py:100
↓ 1 callersMethodcheck_equal
(self)
wenet/bin/export_onnx_bpu.py:143
↓ 1 callersMethodcheck_equal
(self, module)
wenet/bin/export_onnx_bpu.py:187
↓ 1 callersMethodcheck_equal
(self, module)
wenet/bin/export_onnx_bpu.py:287
← previousnext →201–300 of 1,198, ranked by callers