No access to transformers config, only config_dict here.

This commit is contained in:
Nicolas Patry 2024-07-22 13:54:17 +00:00
parent 5829b7821e
commit c4b78bd214
No known key found for this signature in database
GPG Key ID: B154A218C20EBBCA

View File

@ -758,7 +758,7 @@ def get_model(
trust_remote_code=trust_remote_code, trust_remote_code=trust_remote_code,
lora_adapter_ids=lora_adapter_ids, lora_adapter_ids=lora_adapter_ids,
# hidden_size / num_attention_heads is wrong in `google/gemma-2-9b-it` # hidden_size / num_attention_heads is wrong in `google/gemma-2-9b-it`
head_size=config.head_dim, head_size=config_dict["head_dim"],
) )
elif sharded: elif sharded:
raise NotImplementedError(FLASH_ATT_ERROR_MESSAGE.format("Sharded Gemma2")) raise NotImplementedError(FLASH_ATT_ERROR_MESSAGE.format("Sharded Gemma2"))