Eigen RadarAI
Analysis

Hugging Face unifies how Transformers models receive their cache

Hugging Face has given models in its Transformers software library one way to receive and return the cache that lets them reuse calculations during text generation. Models with different designs previously used different names for that cache. Older calls still work with a warning, giving developers time to update their own model code.

Artificial Intelligence··Night
In a sunlit software integration rotunda at a US AI developer's headquarters, two engineers stand beside compact and large test units linked to one shared cache module while reviewing a unified display pane.

One cache name applies across model designs

US artificial intelligence software developer Hugging Face has unified the way models receive and return their cache in version 5.24.0 of Transformers, its open-source library for running models. The cache holds intermediate calculations that a model can reuse as it generates a response. Attention-based models had one name for that information, while models built for linear attention or based on Mamba, a different architecture, used another.[1]

Existing calls run with a warning

Hybrid models previously required developers to handle both names. Transformers now uses the same name for passing the cache to a model, calling the generation function and retrieving information from model outputs. The library redirects calls that supply an old name and warns that it will be removed. A call with both names returns an error.[1]

Fixed-size caches reach assisted generation

Hugging Face asked developers maintaining model code outside Transformers to update their interfaces for the new name. The release also brings fixed-size cache support to assisted generation. In that method, a smaller model proposes the next units of text and a larger model checks them before they become part of the response.[1]

References

  1. News sourceHugging FaceTransformers unifies the interface for model caches↩1↩2↩3