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

Method __init__

funasr/models/llm_asr_nar/model.py:424–586  ·  view source on GitHub ↗

Initialize LLMASRNARPrompt. Args: specaug: TODO. specaug_conf: Configuration dict for specaug. normalize: TODO. normalize_conf: Configuration dict for normalize. encoder: TODO. encode

(
        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.0,
        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,
        predictor_weight: int = 1.0,
        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

422 """ """
423
424 def __init__(
425 self,
426 specaug: str = None,
427 specaug_conf: dict = None,
428 normalize: str = None,
429 normalize_conf: dict = None,
430 encoder: str = None,
431 encoder_conf: dict = None,
432 decoder: str = None,
433 decoder_conf: dict = None,
434 ctc: str = None,
435 ctc_conf: dict = None,
436 ctc_weight: float = 0.0,
437 llm: str = None,
438 llm_conf: dict = None,
439 adaptor: str = None,
440 adaptor_conf: dict = None,
441 input_size: int = 80,
442 vocab_size: int = -1,
443 ignore_id: int = -1,
444 blank_id: int = 0,
445 sos: int = 1,
446 eos: int = 2,
447 lsm_weight: float = 0.0,
448 length_normalized_loss: bool = False,
449 predictor_weight: int = 1.0,
450 report_cer: bool = True,
451 report_wer: bool = True,
452 sym_space: str = "<space>",
453 sym_blank: str = "<blank>",
454 # extract_feats_in_collect_stats: bool = True,
455 share_embedding: bool = False,
456 # preencoder: Optional[AbsPreEncoder] = None,
457 # postencoder: Optional[AbsPostEncoder] = None,
458 **kwargs,
459 ):
460
461 """Initialize LLMASRNARPrompt.
462
463 Args:
464 specaug: TODO.
465 specaug_conf: Configuration dict for specaug.
466 normalize: TODO.
467 normalize_conf: Configuration dict for normalize.
468 encoder: TODO.
469 encoder_conf: Configuration dict for encoder.
470 decoder: TODO.
471 decoder_conf: Configuration dict for decoder.
472 ctc: TODO.
473 ctc_conf: Configuration dict for ctc.
474 ctc_weight: TODO.
475 llm: TODO.
476 llm_conf: Configuration dict for llm.
477 adaptor: TODO.
478 adaptor_conf: Configuration dict for adaptor.
479 input_size: Size/dimension parameter.
480 vocab_size: Size/dimension parameter.
481 ignore_id: TODO.

Callers

nothing calls this directly

Calls 8

AutoModelClass · 0.90
LabelSmoothingLossClass · 0.90
mae_lossClass · 0.90
CTCClass · 0.90
__init__Method · 0.45
output_sizeMethod · 0.45
from_pretrainedMethod · 0.45
evalMethod · 0.45

Tested by

no test coverage detected