Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jiqing-feng committed Mar 20, 2024
1 parent 8a49f9c commit 7570d71
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,13 @@ Here is the example of how to use IPEX optimized model to generate texts.
### generate
```diff
import torch
from transformers import AutoTokenizer, AutoConfig
from transformers import AutoTokenizer
- from transformers import AutoModelForCausalLM
+ from optimum.intel.ipex import IPEXModelForCausalLM

config = AutoConfig.from_pretrained("gpt2")
- model = AutoModelForCausalLM.from_pretrained(
+ model = IPEXModelForCausalLM.from_pretrained(
"gpt2",
config=config,
torch_dtype=torch.bfloat16,
export=True,
)
Expand Down

0 comments on commit 7570d71

Please sign in to comment.