Skip to content

Commit 1d06379

Browse files
authored
[docs] Cache implementations (#34325)
cache
1 parent 6a62a6d commit 1d06379

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/transformers/generation/configuration_utils.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,15 @@ class GenerationConfig(PushToHubMixin):
172172
speed up decoding.
173173
cache_implementation (`str`, *optional*, default to `None`):
174174
Name of the cache class that will be instantiated in `generate`, for faster decoding. Possible values are:
175-
{ALL_CACHE_IMPLEMENTATIONS}. We support other cache types, but they must be manually instantiated and
175+
176+
- `"static"`: [`StaticCache`]
177+
- `"offloaded_static"`: [`OffloadedStaticCache`]
178+
- `"sliding_window"`: [`SlidingWindowCache`]
179+
- `"hybrid"`: [`HybridCache`]
180+
- `"mamba"`: [`MambaCache`]
181+
- `"quantized"`: [`QuantizedCache`]
182+
183+
We support other cache types, but they must be manually instantiated and
176184
passed to `generate` through the `past_key_values` argument. See our
177185
[cache documentation](https://huggingface.co/docs/transformers/en/kv_cache) for further information.
178186
cache_config (`CacheConfig` or `dict`, *optional*, default to `None`):

0 commit comments

Comments
 (0)