mirror of https://github.com/InternLM/InternLM
Update README-zh-Hans.md
parent
ce02dcf54f
commit
39b0cea0eb
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue