Update README.md
Browse files
README.md
CHANGED
@@ -64,6 +64,7 @@ To load the InternLM 7B Chat model using Transformers, use the following code:
|
|
64 |
inputs[k] = v.cuda()
|
65 |
>>> gen_kwargs = {"max_length": 128, "top_p": 0.8, "temperature": 0.8, "do_sample": True, "repetition_penalty": 1.1}
|
66 |
>>> output = model.generate(**inputs, **gen_kwargs)
|
|
|
67 |
>>> print(output)
|
68 |
<s> A beautiful flower box made of white rose wood. It is a perfect gift for weddings, birthdays and anniversaries.
|
69 |
All the roses are from our farm Roses Flanders. Therefor you know that these flowers last much longer than those in store or online!</s>
|
@@ -115,6 +116,7 @@ InternLM ,即书生·浦语大模型,包含面向实用场景的70亿参数
|
|
115 |
inputs[k] = v.cuda()
|
116 |
>>> gen_kwargs = {"max_length": 128, "top_p": 0.8, "temperature": 0.8, "do_sample": True, "repetition_penalty": 1.1}
|
117 |
>>> output = model.generate(**inputs, **gen_kwargs)
|
|
|
118 |
>>> print(output)
|
119 |
来到美丽的大自然,我们发现各种各样的花千奇百怪。有的颜色鲜艳亮丽,使人感觉生机勃勃;有的是红色的花瓣儿粉嫩嫩的像少女害羞的脸庞一样让人爱不释手.有的小巧玲珑; 还有的花瓣粗大看似枯黄实则暗藏玄机!
|
120 |
不同的花卉有不同的“脾气”,它们都有着属于自己的故事和人生道理.这些鲜花都是大自然中最为原始的物种,每一朵都绽放出别样的美令人陶醉、着迷!
|
|
|
64 |
inputs[k] = v.cuda()
|
65 |
>>> gen_kwargs = {"max_length": 128, "top_p": 0.8, "temperature": 0.8, "do_sample": True, "repetition_penalty": 1.1}
|
66 |
>>> output = model.generate(**inputs, **gen_kwargs)
|
67 |
+
>>> output = tokenizer.decode(output[0].tolist(), skip_special_tokens=True)
|
68 |
>>> print(output)
|
69 |
<s> A beautiful flower box made of white rose wood. It is a perfect gift for weddings, birthdays and anniversaries.
|
70 |
All the roses are from our farm Roses Flanders. Therefor you know that these flowers last much longer than those in store or online!</s>
|
|
|
116 |
inputs[k] = v.cuda()
|
117 |
>>> gen_kwargs = {"max_length": 128, "top_p": 0.8, "temperature": 0.8, "do_sample": True, "repetition_penalty": 1.1}
|
118 |
>>> output = model.generate(**inputs, **gen_kwargs)
|
119 |
+
>>> output = tokenizer.decode(output[0].tolist(), skip_special_tokens=True)
|
120 |
>>> print(output)
|
121 |
来到美丽的大自然,我们发现各种各样的花千奇百怪。有的颜色鲜艳亮丽,使人感觉生机勃勃;有的是红色的花瓣儿粉嫩嫩的像少女害羞的脸庞一样让人爱不释手.有的小巧玲珑; 还有的花瓣粗大看似枯黄实则暗藏玄机!
|
122 |
不同的花卉有不同的“脾气”,它们都有着属于自己的故事和人生道理.这些鲜花都是大自然中最为原始的物种,每一朵都绽放出别样的美令人陶醉、着迷!
|