readme
Browse files
README.md
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
-
### Huggingface RWKV Finch
|
5 |
|
6 |
-
> HF compatible model for Finch-
|
7 |
|
8 |
![Finch Bird](./imgs/finch.jpg)
|
9 |
|
10 |
|
11 |
> **! Important Note !**
|
12 |
>
|
13 |
-
> The following is the HF transformers implementation of the Finch
|
14 |
>
|
15 |
>
|
16 |
|
@@ -18,15 +18,15 @@ license: apache-2.0
|
|
18 |
## Quickstart with the hugging face transformer library
|
19 |
|
20 |
```
|
21 |
-
model = AutoModelForCausalLM.from_pretrained("RWKV/v6-Finch-
|
22 |
-
tokenizer = AutoTokenizer.from_pretrained("RWKV/v6-Finch-
|
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/
|
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% |
|
@@ -59,8 +59,8 @@ User: {instruction}
|
|
59 |
Assistant:"""
|
60 |
|
61 |
|
62 |
-
model = AutoModelForCausalLM.from_pretrained("RWKV/
|
63 |
-
tokenizer = AutoTokenizer.from_pretrained("RWKV/
|
64 |
|
65 |
text = "请介绍北京的旅游景点"
|
66 |
prompt = generate_prompt(text)
|
@@ -115,8 +115,8 @@ User: {instruction}
|
|
115 |
Assistant:"""
|
116 |
|
117 |
|
118 |
-
model = AutoModelForCausalLM.from_pretrained("RWKV/
|
119 |
-
tokenizer = AutoTokenizer.from_pretrained("RWKV/
|
120 |
|
121 |
text = "介绍一下大熊猫"
|
122 |
prompt = generate_prompt(text)
|
@@ -162,8 +162,8 @@ User: {instruction}
|
|
162 |
|
163 |
Assistant:"""
|
164 |
|
165 |
-
model = AutoModelForCausalLM.from_pretrained("RWKV/
|
166 |
-
tokenizer = AutoTokenizer.from_pretrained("RWKV/
|
167 |
|
168 |
texts = ["请介绍北京的旅游景点", "介绍一下大熊猫", "乌兰察布"]
|
169 |
prompts = [generate_prompt(text) for text in texts]
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
+
### Huggingface RWKV Finch 7B Model
|
5 |
|
6 |
+
> HF compatible model for Finch-7B.
|
7 |
|
8 |
![Finch Bird](./imgs/finch.jpg)
|
9 |
|
10 |
|
11 |
> **! Important Note !**
|
12 |
>
|
13 |
+
> The following is the HF transformers implementation of the Finch 7B model. This is meant to be used with the huggingface transformers
|
14 |
>
|
15 |
>
|
16 |
|
|
|
18 |
## Quickstart with the hugging face transformer library
|
19 |
|
20 |
```
|
21 |
+
model = AutoModelForCausalLM.from_pretrained("RWKV/v6-Finch-7B-HF", trust_remote_code=True).to(torch.float32)
|
22 |
+
tokenizer = AutoTokenizer.from_pretrained("RWKV/v6-Finch-7B-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/v6-Finch-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% |
|
|
|
59 |
Assistant:"""
|
60 |
|
61 |
|
62 |
+
model = AutoModelForCausalLM.from_pretrained("RWKV/v6-Finch-7B-HF", trust_remote_code=True).to(torch.float32)
|
63 |
+
tokenizer = AutoTokenizer.from_pretrained("RWKV/v6-Finch-7B-HF", trust_remote_code=True)
|
64 |
|
65 |
text = "请介绍北京的旅游景点"
|
66 |
prompt = generate_prompt(text)
|
|
|
115 |
Assistant:"""
|
116 |
|
117 |
|
118 |
+
model = AutoModelForCausalLM.from_pretrained("RWKV/v6-Finch-7B-HF", trust_remote_code=True, torch_dtype=torch.float16).to(0)
|
119 |
+
tokenizer = AutoTokenizer.from_pretrained("RWKV/v6-Finch-7B-HF", trust_remote_code=True)
|
120 |
|
121 |
text = "介绍一下大熊猫"
|
122 |
prompt = generate_prompt(text)
|
|
|
162 |
|
163 |
Assistant:"""
|
164 |
|
165 |
+
model = AutoModelForCausalLM.from_pretrained("RWKV/v6-Finch-7B-HF", trust_remote_code=True).to(torch.float32)
|
166 |
+
tokenizer = AutoTokenizer.from_pretrained("RWKV/v6-Finch-7B-HF", trust_remote_code=True)
|
167 |
|
168 |
texts = ["请介绍北京的旅游景点", "介绍一下大熊猫", "乌兰察布"]
|
169 |
prompts = [generate_prompt(text) for text in texts]
|