MCPcopy Create free account
hub / github.com/modelscope/FunASR / __init__

Method __init__

funasr/models/llm_asr_nar/model.py:29–180  ·  view source on GitHub ↗

Initialize LLMASRNAR. Args: specaug: TODO. specaug_conf: Configuration dict for specaug. normalize: TODO. normalize_conf: Configuration dict for normalize. encoder: TODO. encoder_conf

(
        self,
        specaug: str = None,
        specaug_conf: dict = None,
        normalize: str = None,
        normalize_conf: dict = None,
        encoder: str = None,
        encoder_conf: dict = None,
        decoder: str = None,
        decoder_conf: dict = None,
        ctc: str = None,
        ctc_conf: dict = None,
        ctc_weight: float = 0.5,
        llm: str = None,
        llm_conf: dict = None,
        adaptor: str = None,
        adaptor_conf: dict = None,
        input_size: int = 80,
        vocab_size: int = -1,
        ignore_id: int = -1,
        blank_id: int = 0,
        sos: int = 1,
        eos: int = 2,
        lsm_weight: float = 0.0,
        length_normalized_loss: bool = False,
        report_cer: bool = True,
        report_wer: bool = True,
        sym_space: str = "<space>",
        sym_blank: str = "<blank>",
        # extract_feats_in_collect_stats: bool = True,
        share_embedding: bool = False,
        # preencoder: Optional[AbsPreEncoder] = None,
        # postencoder: Optional[AbsPostEncoder] = None,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

27 """ """
28
29 def __init__(
30 self,
31 specaug: str = None,
32 specaug_conf: dict = None,
33 normalize: str = None,
34 normalize_conf: dict = None,
35 encoder: str = None,
36 encoder_conf: dict = None,
37 decoder: str = None,
38 decoder_conf: dict = None,
39 ctc: str = None,
40 ctc_conf: dict = None,
41 ctc_weight: float = 0.5,
42 llm: str = None,
43 llm_conf: dict = None,
44 adaptor: str = None,
45 adaptor_conf: dict = None,
46 input_size: int = 80,
47 vocab_size: int = -1,
48 ignore_id: int = -1,
49 blank_id: int = 0,
50 sos: int = 1,
51 eos: int = 2,
52 lsm_weight: float = 0.0,
53 length_normalized_loss: bool = False,
54 report_cer: bool = True,
55 report_wer: bool = True,
56 sym_space: str = "<space>",
57 sym_blank: str = "<blank>",
58 # extract_feats_in_collect_stats: bool = True,
59 share_embedding: bool = False,
60 # preencoder: Optional[AbsPreEncoder] = None,
61 # postencoder: Optional[AbsPostEncoder] = None,
62 **kwargs,
63 ):
64
65 """Initialize LLMASRNAR.
66
67 Args:
68 specaug: TODO.
69 specaug_conf: Configuration dict for specaug.
70 normalize: TODO.
71 normalize_conf: Configuration dict for normalize.
72 encoder: TODO.
73 encoder_conf: Configuration dict for encoder.
74 decoder: TODO.
75 decoder_conf: Configuration dict for decoder.
76 ctc: TODO.
77 ctc_conf: Configuration dict for ctc.
78 ctc_weight: TODO.
79 llm: TODO.
80 llm_conf: Configuration dict for llm.
81 adaptor: TODO.
82 adaptor_conf: Configuration dict for adaptor.
83 input_size: Size/dimension parameter.
84 vocab_size: Size/dimension parameter.
85 ignore_id: TODO.
86 blank_id: TODO.

Callers 1

__init__Method · 0.45

Calls 5

AutoModelClass · 0.90
LabelSmoothingLossClass · 0.90
output_sizeMethod · 0.45
from_pretrainedMethod · 0.45
evalMethod · 0.45

Tested by

no test coverage detected