From 7570d715d1cf773e15d6a0d17d100d27e010a10e Mon Sep 17 00:00:00 2001 From: jiqing-feng Date: Wed, 20 Mar 2024 09:24:41 -0400 Subject: [PATCH] fix readme --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index a61f4afb84..ff70c50169 100644 --- a/README.md +++ b/README.md @@ -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, )