class_docstr: RWKV decoder module.
  
  Based on https://arxiv.org/pdf/2305.13048.pdf.
  
  Args:
      vocab_size: Vocabulary size.
      block_size: Input/Output size.
      context_size: Context size for WKV computation.
      linear_size: FeedForward hidden size.
      attention_size: SelfAttention hidden size.
      normalization_type: Normalization layer type.
      normalization_args: Normalization layer arguments.
      num_blocks: Number of RWKV blocks.
      rescale_every: Whether to rescale input every N blocks (inference only).
      embed_dropout_rate: Dropout rate for embedding layer.
      att_dropout_rate: Dropout rate for the attention module.
      ffn_dropout_rate: Dropout rate for the feed-forward module.
      embed_pad: Embedding padding symbol ID.
class_docstr_tok: ["RWKV","decoder","module",".","Based","on","https",":","\/\/arxiv.org\/pdf\/2305.13048.pdf",".","Args",":","vocab_size",":","Vocabulary","size",".","block_size",":","Input\/Output","size",".","context_size",":","Context","size","for","WKV","computation",".","linear_size",":","FeedForward","hidden","size",".","attention_size",":","SelfAttention","hidden","size",".","normalization_type",":","Normalization","layer","type",".","normalization_args",":","Normalization","layer","arguments",".","num_blocks",":","Number","of","RWKV","blocks",".","rescale_every",":","Whether","to","rescale","input","every","N","blocks","(","inference","only",")",".","embed_dropout_rate",":","Dropout","rate","for","embedding","layer",".","att_dropout_rate",":","Dropout","rate","for","the","attention","module",".","ffn_dropout_rate",":","Dropout","rate","for","the","feed-forward","module",".","embed_pad",":","Embedding","padding","symbol","ID","."]
docstr: One-step forward hypotheses.
  
  Args:
      hyps: Hypotheses.
  
  Returns:
      out: Decoder output sequence. (B, D_dec)
      states: Decoder hidden states. [5 x (B, 1, D_att/D_dec, N)]
docstr_tok: ["One-step","forward","hypotheses",".","Args",":","hyps",":","Hypotheses",".","Returns",":","out",":","Decoder","output","sequence",".","(","B",",","D_dec",")","states",":","Decoder","hidden","states",".","[","5","x","(","B",",","1",",","D_att\/D_dec",",","N",")","]"]
code: def batch_score(
      self, hyps: List[Hypothesis]
  ) -> Tuple[torch.Tensor, List[torch.Tensor]]:
      """One-step forward hypotheses.
  
      Args:
          hyps: Hypotheses.
  
      Returns:
          out: Decoder output sequence. (B, D_dec)
          states: Decoder hidden states. [5 x (B, 1, D_att/D_dec, N)]
  
      """
      labels = torch.tensor(
          [[h.yseq[-1]] for h in hyps],
          dtype=torch.long,
          device=self.device,
      )
      states = self.create_batch_states([h.dec_state for h in hyps])
  
      out, states = self.inference(labels, states)
  
      return out.squeeze(1), states
  
file_path: espnet/espnet2/asr_transducer/decoder/rwkv_decoder.py
imports: import math
  from typing import Dict, List, Optional, Tuple
  import torch
  from typeguard import check_argument_types
  from espnet2.asr_transducer.beam_search_transducer import Hypothesis
  from espnet2.asr_transducer.decoder.abs_decoder import AbsDecoder
  from espnet2.asr_transducer.decoder.blocks.rwkv import RWKV
  from espnet2.asr_transducer.normalization import get_normalization
label_desc: Use image node_id 6 for calling the RWKVDecoder obj's underlying member method code with example usage: obj.batch_score(hyps) and returns: out,  states