Skip to content

Commit

Permalink
Add fp8 related changes to mistral for text-generation (huggingface#918)
Browse files Browse the repository at this point in the history
Co-authored-by: Jimin Ha <[email protected]>
Co-authored-by: regisss <[email protected]>
  • Loading branch information
3 people authored May 7, 2024
1 parent 7953cce commit 9f6eba3
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 88 deletions.
4 changes: 2 additions & 2 deletions examples/text-generation/run_lm_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ def __init__(self, tokenizer, model, args, options):
self.options = options
self._device = args.device
self.model_inputs = {"use_cache": self.options.use_cache}
if self.model.config.model_type in ["llama", "falcon"]:
if self.model.config.model_type in ["llama", "mistral", "falcon"]:
self.model_inputs.update(
{
"reuse_cache": self.options.reuse_cache,
}
)
if self.model.config.model_type == "llama":
if self.model.config.model_type in ["llama", "mistral"]:
self.model_inputs.update(
{
"attn_softmax_bf16": self.options.attn_softmax_bf16,
Expand Down
Loading

0 comments on commit 9f6eba3

Please sign in to comment.