m8than commited on
Commit
916d26f
1 Parent(s): d621032
README.md CHANGED
@@ -1,8 +1,40 @@
1
- ### Run Huggingface RWKV6 World Model
 
 
 
2
 
3
- > origin pth weight from https://huggingface.co/BlinkDL/rwkv-6-world/blob/main/RWKV-x060-World-7B-v2.1-20240507-ctx4096.pth .
4
 
5
- #### CPU
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
  ```python
8
  import torch
@@ -27,8 +59,8 @@ User: {instruction}
27
  Assistant:"""
28
 
29
 
30
- model = AutoModelForCausalLM.from_pretrained("RWKV/rwkv-6-world-7b", trust_remote_code=True).to(torch.float32)
31
- tokenizer = AutoTokenizer.from_pretrained("RWKV/rwkv-6-world-7b", trust_remote_code=True, padding_side='left', pad_token="<s>")
32
 
33
  text = "请介绍北京的旅游景点"
34
  prompt = generate_prompt(text)
@@ -58,7 +90,7 @@ Assistant: 北京是中国的首都,拥有众多的旅游景点,以下是其
58
  8. 天坛:是中国古代皇家
59
  ```
60
 
61
- #### GPU
62
 
63
  ```python
64
  import torch
@@ -83,8 +115,8 @@ User: {instruction}
83
  Assistant:"""
84
 
85
 
86
- model = AutoModelForCausalLM.from_pretrained("RWKV/rwkv-6-world-7b", trust_remote_code=True, torch_dtype=torch.float16).to(0)
87
- tokenizer = AutoTokenizer.from_pretrained("RWKV/rwkv-6-world-7b", trust_remote_code=True, padding_side='left', pad_token="<s>")
88
 
89
  text = "介绍一下大熊猫"
90
  prompt = generate_prompt(text)
@@ -130,8 +162,8 @@ User: {instruction}
130
 
131
  Assistant:"""
132
 
133
- model = AutoModelForCausalLM.from_pretrained("RWKV/rwkv-6-world-7b", trust_remote_code=True).to(torch.float32)
134
- tokenizer = AutoTokenizer.from_pretrained("RWKV/rwkv-6-world-7b", trust_remote_code=True, padding_side='left', pad_token="<s>")
135
 
136
  texts = ["请介绍北京的旅游景点", "介绍一下大熊猫", "乌兰察布"]
137
  prompts = [generate_prompt(text) for text in texts]
@@ -172,3 +204,16 @@ User: 乌兰察布
172
 
173
  Assistant: 乌兰察布是中国新疆维吾尔自治区的一个县级市,位于新疆维吾尔自治区中部,是新疆的第二大城市。乌兰察布市是新疆的第一大城市,也是新疆的重要城市之一。乌兰察布市是新疆的经济中心,也是新疆的重要交通枢纽之一。乌兰察布市的人口约为2.5万人,其中汉族占绝大多数。乌
174
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+ ### Huggingface RWKV Finch 14B Model
5
 
6
+ > HF compatible model for Finch-14B.
7
 
8
+ ![Finch Bird](./imgs/finch.jpg)
9
+
10
+
11
+ > **! Important Note !**
12
+ >
13
+ > The following is the HF transformers implementation of the Finch 14B model. This is meant to be used with the huggingface transformers
14
+ >
15
+ >
16
+
17
+
18
+ ## Quickstart with the hugging face transformer library
19
+
20
+ ```
21
+ model = AutoModelForCausalLM.from_pretrained("RWKV/v6-Finch-14B-HF", trust_remote_code=True).to(torch.float32)
22
+ tokenizer = AutoTokenizer.from_pretrained("RWKV/v6-Finch-14B-HF", trust_remote_code=True)
23
+ ```
24
+
25
+ ## Evaluation
26
+
27
+ The following demonstrates the improvements from Eagle 7B to Finch 14B
28
+
29
+ | | [Eagle 7B](https://huggingface.co/RWKV/v5-Eagle-7B-HF) | [Finch 7B](https://huggingface.co/RWKV/v6-Finch-7B-HF) | [Finch 14B](https://huggingface.co/RWKV/v6-Finch-14B-HF) |
30
+ | --- | --- | --- | --- |
31
+ | [ARC](https://github.com/EleutherAI/lm-evaluation-harness/tree/main/lm_eval/tasks/arc) | 39.59% | 41.47% | 46.33% |
32
+ | [HellaSwag](https://github.com/EleutherAI/lm-evaluation-harness/tree/main/lm_eval/tasks/hellaswag) | 53.09% | 55.96% | 57.69% |
33
+ | [MMLU](https://github.com/EleutherAI/lm-evaluation-harness/tree/main/lm_eval/tasks/mmlu) | 30.86% | 41.70% | 56.05% |
34
+ | [Truthful QA](https://github.com/EleutherAI/lm-evaluation-harness/tree/main/lm_eval/tasks/truthfulqa) | 33.03% | 34.82% | 39.27% |
35
+ | [Winogrande](https://github.com/EleutherAI/lm-evaluation-harness/tree/main/lm_eval/tasks/winogrande) | 67.56% | 71.19% | 74.43% |
36
+
37
+ #### Running on CPU via HF transformers
38
 
39
  ```python
40
  import torch
 
59
  Assistant:"""
60
 
61
 
62
+ model = AutoModelForCausalLM.from_pretrained("RWKV/v5-Eagle-7B-HF", trust_remote_code=True).to(torch.float32)
63
+ tokenizer = AutoTokenizer.from_pretrained("RWKV/v5-Eagle-7B-HF", trust_remote_code=True)
64
 
65
  text = "请介绍北京的旅游景点"
66
  prompt = generate_prompt(text)
 
90
  8. 天坛:是中国古代皇家
91
  ```
92
 
93
+ #### Running on GPU via HF transformers
94
 
95
  ```python
96
  import torch
 
115
  Assistant:"""
116
 
117
 
118
+ model = AutoModelForCausalLM.from_pretrained("RWKV/v5-Eagle-7B-HF", trust_remote_code=True, torch_dtype=torch.float16).to(0)
119
+ tokenizer = AutoTokenizer.from_pretrained("RWKV/v5-Eagle-7B-HF", trust_remote_code=True)
120
 
121
  text = "介绍一下大熊猫"
122
  prompt = generate_prompt(text)
 
162
 
163
  Assistant:"""
164
 
165
+ model = AutoModelForCausalLM.from_pretrained("RWKV/v5-Eagle-7B-HF", trust_remote_code=True).to(torch.float32)
166
+ tokenizer = AutoTokenizer.from_pretrained("RWKV/v5-Eagle-7B-HF", trust_remote_code=True)
167
 
168
  texts = ["请介绍北京的旅游景点", "介绍一下大熊猫", "乌兰察布"]
169
  prompts = [generate_prompt(text) for text in texts]
 
204
 
205
  Assistant: 乌兰察布是中国新疆维吾尔自治区的一个县级市,位于新疆维吾尔自治区中部,是新疆的第二大城市。乌兰察布市是新疆的第一大城市,也是新疆的重要城市之一。乌兰察布市是新疆的经济中心,也是新疆的重要交通枢纽之一。乌兰察布市的人口约为2.5万人,其中汉族占绝大多数。乌
206
  ```
207
+
208
+ ## Links
209
+ - [Our wiki](https://wiki.rwkv.com)
210
+ - [Recursal.AI Cloud Platform](https://recursal.ai)
211
+ - [Featherless Inference](https://featherless.ai/models/RWKV/Finch-14B)
212
+ - [Blog article, detailing our model launch](https://blog.rwkv.com/p/rwkv-v6-finch-14b-is-here)
213
+
214
+ ## Acknowledgement
215
+ We are grateful for the help and support from the following key groups:
216
+
217
+ - [Recursal.ai](https://recursal.ai) team for financing the GPU resources, and managing the training of this foundation model - you can run the Finch line of RWKV models on their cloud / on-premise platform today.
218
+ - EleutherAI for their support, especially in the v5/v6 Eagle/Finch paper
219
+ - Linux Foundation AI & Data group for supporting and hosting the RWKV project
imgs/crimson-finch-unsplash-david-clode.jpg ADDED
imgs/finch.jpg ADDED