Skip to content

Commit

Permalink
Merge branch 'main' into add_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
changwangss authored May 11, 2024
2 parents 3ceadde + 8ab0ed6 commit 23c791d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,11 @@ class GaudiHFModelAdapter(HFLM):

def __init__(self, *args, **kwargs):
if kwargs["device"] == "hpu":
pass
import habana_frameworks.torch.core as htcore
# Tweak generation so that it runs faster on Gaudi
from optimum.habana.transformers.modeling_utils import adapt_transformers_to_gaudi
adapt_transformers_to_gaudi()


super().__init__(*args, **kwargs)

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ For evaluating the models on text-generation tasks, we follow the [lm-evaluation

##### Gaudi2
```shell

# pip install --upgrade-strategy eager optimum[habana]

python main.py \
--model gaudi-hf \
--model_args pretrained=EleutherAI/gpt-j-6B \
Expand Down

0 comments on commit 23c791d

Please sign in to comment.