From 39b0cea0eb120da5e4e4b3b4ecff7c5167590dac Mon Sep 17 00:00:00 2001 From: Shuo Zhang Date: Thu, 6 Jul 2023 16:34:22 +0800 Subject: [PATCH] Update README-zh-Hans.md --- README-zh-Hans.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-zh-Hans.md b/README-zh-Hans.md index 16312f2..01d8812 100644 --- a/README-zh-Hans.md +++ b/README-zh-Hans.md @@ -76,7 +76,7 @@ InternLM ,即书生·浦语大模型,包含面向实用场景的70亿参数 ```python >>> from transformers import AutoTokenizer, AutoModelForCausalLM >>> tokenizer = AutoTokenizer.from_pretrained("internlm/internlm-chat-7b", trust_remote_code=True) ->>> model = AutoModelForCausalLM.from_pretrained("internlm/internlm-chat-7b", trust_remote_code=True, device='cuda') +>>> model = AutoModelForCausalLM.from_pretrained("internlm/internlm-chat-7b", trust_remote_code=True).cuda() >>> model = model.eval() >>> response, history = model.chat(tokenizer, "你好", history=[]) >>> print(response)