Skip to content

Commit 9dbd666

Browse files
authored
Update README.md
修改使用LangChain和HuggingFacePipeline本地调用HuggingFace模型的示例代码,原示例代码无法正确执行
1 parent 62f1ba9 commit 9dbd666

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline, AutoMode
851851

852852
model_id = 'google/flan-t5-large'
853853
tokenizer = AutoTokenizer.from_pretrained(model_id)
854-
model = AutoModelForSeq2SeqLM.from_pretrained(model_id) # load_in_8bit=True, # , device_map='auto'
854+
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
855855

856856
pipe = pipeline(
857857
"text2text-generation",

0 commit comments

Comments
 (0)