Duplicate from BlinkDL/rwkv-5-world
Browse filesCo-authored-by: BlinkDL <BlinkDL@users.noreply.huggingface.co>
- .gitattributes +35 -0
- README.md +108 -0
- RWKV-5-World-0.1B-v1-20230803-ctx4096.pth +3 -0
- RWKV-5-World-0.4B-v2-20231113-ctx4096.pth +3 -0
- RWKV-5-World-1B5-v2-20231025-ctx4096.pth +3 -0
- RWKV-5-World-3B-v2-20231113-ctx4096.pth +3 -0
- RWKV-5-World-3B-v2-20231118-ctx16k.pth +3 -0
- RWKV-5-World-7B-v2-20240128-ctx4096.pth +3 -0
.gitattributes
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
- zh
|
5 |
+
- fr
|
6 |
+
- es
|
7 |
+
- de
|
8 |
+
- pt
|
9 |
+
- ru
|
10 |
+
- it
|
11 |
+
- ja
|
12 |
+
- ko
|
13 |
+
- vi
|
14 |
+
- ar
|
15 |
+
tags:
|
16 |
+
- pytorch
|
17 |
+
- text-generation
|
18 |
+
- causal-lm
|
19 |
+
- rwkv
|
20 |
+
license: apache-2.0
|
21 |
+
datasets:
|
22 |
+
- cerebras/SlimPajama-627B
|
23 |
+
- EleutherAI/pile
|
24 |
+
- bigcode/starcoderdata
|
25 |
+
- oscar-corpus/OSCAR-2301
|
26 |
+
---
|
27 |
+
|
28 |
+
# RWKV-5 World
|
29 |
+
|
30 |
+
Use rwkv pip package 0.8.22+ for RWKV-5 inference: https://pypi.org/project/rwkv/ (pipeline = PIPELINE(model, "rwkv_vocab_v20230424") for rwkv-world models)
|
31 |
+
|
32 |
+
Online 7B Demo: https://huggingface.co/spaces/BlinkDL/RWKV-Gradio-2
|
33 |
+
|
34 |
+
Online 1.5B Demo: https://huggingface.co/spaces/BlinkDL/RWKV-Gradio-1
|
35 |
+
|
36 |
+
GUI: https://github.com/josStorer/RWKV-Runner (see Releases)
|
37 |
+
|
38 |
+
Convert to HF formet: https://github.com/BBuf/RWKV-World-HF-Tokenizer
|
39 |
+
|
40 |
+
For developer: https://github.com/BlinkDL/ChatRWKV/blob/main/API_DEMO_CHAT.py
|
41 |
+
|
42 |
+
https://github.com/BlinkDL/ChatRWKV/blob/main/RWKV_v5_demo.py
|
43 |
+
|
44 |
+
How it works: https://twitter.com/BlinkDL_AI/status/1685230712247795713
|
45 |
+
|
46 |
+
https://www.rwkv.com/
|
47 |
+
|
48 |
+
## Model Description
|
49 |
+
|
50 |
+
RWKV-5 trained on 100+ world languages (70% English, 15% multilang, 15% code).
|
51 |
+
|
52 |
+
World = Some_Pile + Some_SlimPajama + Some_StarCoder + Some_OSCAR + All_Wikipedia + All_ChatGPT_Data_I_can_find
|
53 |
+
|
54 |
+
RWKV-5 training: set --my_testing "r2r4" in latest RWKV-LM v4neo: https://github.com/BlinkDL/RWKV-LM
|
55 |
+
|
56 |
+
World v1 = 0.59T tokens
|
57 |
+
|
58 |
+
World v2 = 1.12T tokens
|
59 |
+
|
60 |
+
Imagine what happens when we use more data :)
|
61 |
+
|
62 |
+
Recommended fine-tuning format (use \n for newlines):
|
63 |
+
```
|
64 |
+
User: xxxxxxxxxxxxxxx
|
65 |
+
|
66 |
+
Assistant: xxxxxxxxxxxxxxx
|
67 |
+
xxxxxxxxxxxxxxx
|
68 |
+
xxxxxxxxxxxxxxx
|
69 |
+
|
70 |
+
User: xxxxxxxxxxxxxxx
|
71 |
+
xxxxxxxxxxxxxxx
|
72 |
+
|
73 |
+
Assistant: xxxxxxxxxxxxxxx
|
74 |
+
xxxxxxxxxxxxxxx
|
75 |
+
xxxxxxxxxxxxxxx
|
76 |
+
xxxxxxxxxxxxxxx
|
77 |
+
```
|
78 |
+
|
79 |
+
A good chat prompt (better replace \n\n in xxx to \n, such that there will be no newlines in xxx):
|
80 |
+
```
|
81 |
+
User: hi
|
82 |
+
|
83 |
+
Assistant: Hi. I am your assistant and I will provide expert full response in full details. Please feel free to ask any question and I will always answer it.
|
84 |
+
|
85 |
+
User: xxx
|
86 |
+
|
87 |
+
Assistant:
|
88 |
+
```
|
89 |
+
QA prompt (better replace \n\n in xxx to \n, such that there will be no newlines in xxx):
|
90 |
+
```
|
91 |
+
Question: xxx
|
92 |
+
|
93 |
+
Answer:
|
94 |
+
```
|
95 |
+
and
|
96 |
+
```
|
97 |
+
Instruction: xxx
|
98 |
+
|
99 |
+
Input: xxx
|
100 |
+
|
101 |
+
Response:
|
102 |
+
```
|
103 |
+
|
104 |
+
!!! There should not be any space after your final ":" or you will upset the tokenizer and see non-English reponse !!!
|
105 |
+
|
106 |
+
!!! There should not be any space after your final ":" or you will upset the tokenizer and see non-English reponse !!!
|
107 |
+
|
108 |
+
!!! There should not be any space after your final ":" or you will upset the tokenizer and see non-English reponse !!!
|
RWKV-5-World-0.1B-v1-20230803-ctx4096.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c844a3ee05bcb9065848cb05b10c48a3f381f5ac1953aad89e156ecdf31d7703
|
3 |
+
size 385598386
|
RWKV-5-World-0.4B-v2-20231113-ctx4096.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5a288c54c7f30b0e2d4af23991133fad2af2d5e59ec7ad850ffe78054a5e4f92
|
3 |
+
size 923523954
|
RWKV-5-World-1B5-v2-20231025-ctx4096.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5a89f56be7f82ab9dd0835af9a6838f788477471616c02f7b041e3aea0c57435
|
3 |
+
size 3155590194
|
RWKV-5-World-3B-v2-20231113-ctx4096.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a4bd430343c6fd138b85bbc68bb20262d3a2f053ea57dc4b41078269af68ff9c
|
3 |
+
size 6126106674
|
RWKV-5-World-3B-v2-20231118-ctx16k.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:efa5178d1c824b94ef17c6c9a456674e5581a8be832becbda9aba4dc533f88c2
|
3 |
+
size 6126106467
|
RWKV-5-World-7B-v2-20240128-ctx4096.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a88c7274184b211e5545c8f992f0b80d03c40a447980bbfcd0f6d5858982615a
|
3 |
+
size 15036197526
|