Skip to content

Commit

Permalink
Revert pr 235 as flash attention is not really enabled for gemma (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
tthakkal authored Oct 23, 2024
1 parent c5e3881 commit b126bf4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server/text_generation_server/models/causal_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,13 +694,12 @@ def __init__(
"return_dict": True,
}

if model.config.model_type in ["llama", "mistral", "starcoder2", "qwen2", "falcon", "gemma"]:
if model.config.model_type in ["llama", "mistral", "starcoder2", "qwen2", "falcon"]:

if model.config.model_type not in ["falcon"]:
kwargs["attn_softmax_bf16"] = True

if model.config.model_type not in ["gemma"]:
kwargs["trim_logits"] = True
kwargs["trim_logits"] = True

if os.getenv("USE_FLASH_ATTENTION", "false").lower() == "true":
kwargs["use_flash_attention"] = True
Expand Down

0 comments on commit b126bf4

Please sign in to comment.