KVCachingTransformerLM
======================

.. currentmodule:: penzai.models.transformer.sampling_mode

.. autoclass:: KVCachingTransformerLM
  :members:
  :special-members:
  :show-inheritance:


  
  
    
    
    
    
    
    
    

  

  
  
  
  
  
  
  
  
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

  
  .. rubric:: Methods
  .. autosummary::
  
    
    ~KVCachingTransformerLM.__init__
    
    
    
    
    
    ~KVCachingTransformerLM.from_uncached
    
    
    
    
    
    
    
    
    
    ~KVCachingTransformerLM.__call__
    
  

  
  .. rubric:: Attributes
  .. autosummary::
  
    ~KVCachingTransformerLM.body
    ~KVCachingTransformerLM.cache_end_index
    ~KVCachingTransformerLM.previous_tokens
    ~KVCachingTransformerLM.metadata
    ~KVCachingTransformerLM.cache_len
    ~KVCachingTransformerLM.batch_axes
    ~KVCachingTransformerLM.pad_id
  

  

  .. rubric:: Inherited Methods
  .. raw:: html

    <details style="margin-bottom: 1.5rem">
      <summary style="font-style:italic">(expand to view inherited methods)</summary>

  .. autosummary::
  
    
    
    ~KVCachingTransformerLM.attributes_dict
    
    
    ~KVCachingTransformerLM.bind_variables
    
    
    ~KVCachingTransformerLM.from_attributes
    
    
    
    ~KVCachingTransformerLM.key_for_field
    
    
    ~KVCachingTransformerLM.select
    
    
    ~KVCachingTransformerLM.stateless_call
    
    
    ~KVCachingTransformerLM.tree_flatten
    
    
    ~KVCachingTransformerLM.tree_flatten_with_keys
    
    
    ~KVCachingTransformerLM.tree_unflatten
    
    
    ~KVCachingTransformerLM.treescope_color
    
    

  .. raw:: html

    </details>

  