class_docstr: A cache that grows dynamically as more tokens are generated. This is the default for generative models.
  
  It stores the Key and Value states as a list of tensors, one for each layer. The expected shape for each tensor is
  `[batch_size, num_heads, seq_len, head_dim]`.
class_docstr_tok: ["A","cache","that","grows","dynamically","as","more","tokens","are","generated",".","This","is","the","default","for","generative","models",".","It","stores","the","Key","and","Value","states","as","a","list","of","tensors",",","one","for","each","layer",".","The","expected","shape","for","each","tensor","is","`","[","batch_size",",","num_heads",",","seq_len",",","head_dim","]","`","."]
docstr: Support for backwards-compatible `past_key_value` length, e.g. `len(past_key_value)`. This value corresponds
  to the number of layers in the model.
docstr_tok: ["Support","for","backwards-compatible","`","past_key_value","`","length",",","e.g",".","`","len","(","past_key_value",")","`",".","This","value","corresponds","to","the","number","of","layers","in","the","model","."]
code: def __len__(self):
      """
      Support for backwards-compatible `past_key_value` length, e.g. `len(past_key_value)`. This value corresponds
      to the number of layers in the model.
      """
      return len(self.key_cache)
  
imports: from typing import Any, Dict, List, Optional, Tuple
  import torch
label_desc: Use image node_id 4 for calling the DynamicCache obj's underlying member method code with example usage: obj.__len__() and returns: len