diff --git a/server/text_generation_server/models/causal_lm.py b/server/text_generation_server/models/causal_lm.py index 7ba959ee..10ebd41c 100644 --- a/server/text_generation_server/models/causal_lm.py +++ b/server/text_generation_server/models/causal_lm.py @@ -694,11 +694,13 @@ class CausalLM(Model): "return_dict": True, } - if model.config.model_type in ["llama", "mistral", "starcoder2", "qwen2", "falcon"]: + if model.config.model_type in ["llama", "mistral", "starcoder2", "qwen2", "falcon", "gemma"]: if model.config.model_type not in ["falcon"]: kwargs["attn_softmax_bf16"] = True - kwargs["trim_logits"] = True + + if model.config.model_type not in ["gemma"]: + kwargs["trim_logits"] = True if os.getenv("USE_FLASH_ATTENTION", "false").lower() == "true": kwargs["use_flash_attention"] = True