-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
34 lines (28 loc) · 905 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from ChatRWKV import ChatRWKV
inputString = '''Instruction: 按以下内容用英文描述画面
Input: 一只熊在喜马拉雅山上吃鱼
Response:'''
rwkv = ChatRWKV(
'D:\\my_files\\RWKV-x060-World-1B6-v2.1-20240328-ctx4096'
)
'''
A bear is eating fish in the Himalayas.
A bear is eating fish in the Himalayan mountains.
A bear is eating fish in the Himalayan mountains.
A bear is eating fish on the Himalayan mountains.
A bear is eating fish on the mountains of Himalaya.
A bear in the Himalayas is eating fish.
A bear is eating fish in the Himalayas.
A bear is eating fish at a high-altitude mountain in India.
A bear is eating fish in the Himalayas.
A bear is eating fish on a mountain in the Himalayas.
'''
for _ in range(10):
modelOutput = rwkv.run_on(
inputString,
temperature=0.5,
top_p=0.95,
top_k=20
)
rwkv.clear()
print(modelOutput)