Gemma2: fix config initialization (cache_implementation) (#33684)

This commit is contained in:
Joao Gante
2024-09-24 18:22:00 +01:00
committed by GitHub
parent d5bdac3db7
commit 238b13478d
3 changed files with 9 additions and 3 deletions

View File

@@ -44,7 +44,9 @@ SPECIAL_CASES_TO_ALLOW = {
"Qwen2Config": ["use_sliding_window"],
"Qwen2MoeConfig": ["use_sliding_window"],
"Qwen2VLConfig": ["use_sliding_window"],
"Gemma2Config": ["tie_word_embeddings"],
# `cache_implementation` should be in the default generation config, but we don't yet support per-model
# generation configs (TODO joao)
"Gemma2Config": ["tie_word_embeddings", "cache_implementation"],
# used to compute the property `self.chunk_length`
"EncodecConfig": ["overlap"],
# used to compute the property `self.layers_block_type`