Unverified Commit 224ab709 authored by amyeroberts's avatar amyeroberts Committed by GitHub
Browse files

Update FA2 exception msg to point to hub discussions (#28161)

* Update FA2 exception msg to point to hub discussions

* Use path for hub url
parent 9924df9e
...@@ -1380,8 +1380,9 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix ...@@ -1380,8 +1380,9 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
""" """
if not cls._supports_flash_attn_2: if not cls._supports_flash_attn_2:
raise ValueError( raise ValueError(
f"{cls.__name__} does not support Flash Attention 2.0 yet. Please open an issue on GitHub to " f"{cls.__name__} does not support Flash Attention 2.0 yet. Please request to add support where"
"request support for this architecture: https://github.com/huggingface/transformers/issues/new" f" the model is hosted, on its model hub page: https://huggingface.co/{config._name_or_path}/discussions/new"
" or in the Transformers GitHub repo: https://github.com/huggingface/transformers/issues/new"
) )
if not is_flash_attn_2_available(): if not is_flash_attn_2_available():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment