Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,92 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
- zh
|
6 |
+
- ja
|
7 |
+
- ko
|
8 |
+
- fr
|
9 |
+
- ar
|
10 |
+
- es
|
11 |
+
- pt
|
12 |
+
metrics:
|
13 |
+
- accuracy
|
14 |
+
base_model:
|
15 |
+
- BlinkDL/rwkv-7-world
|
16 |
+
pipeline_tag: text-generation
|
17 |
+
---
|
18 |
+
|
19 |
+
# rwkv7-1.5B-world
|
20 |
+
|
21 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
22 |
+
|
23 |
+
This is RWKV-7 model under flash-linear attention format.
|
24 |
+
|
25 |
+
## Model Details
|
26 |
+
|
27 |
+
|
28 |
+
### Model Description
|
29 |
+
|
30 |
+
<!-- Provide a longer summary of what this model is. -->
|
31 |
+
|
32 |
+
- **Developed by:** Bo Peng, Yu Zhang, Songlin Yang, Ruochong Zhang
|
33 |
+
- **Funded by:** Shenzhen Yuanshi Intelligent Co. Ltd.
|
34 |
+
- **Model type:** RWKV7
|
35 |
+
- **Language(s) (NLP):** English
|
36 |
+
- **License:** Apache-2.0
|
37 |
+
- **Parameter count:** 1.52B
|
38 |
+
- **Tokenizer:** RWKV World tokenizer
|
39 |
+
- **Vocabulary size:** 65,536
|
40 |
+
|
41 |
+
### Model Sources
|
42 |
+
|
43 |
+
<!-- Provide the basic links for the model. -->
|
44 |
+
|
45 |
+
- **Repository:** https://github.com/fla-org/flash-linear-attention ; https://github.com/BlinkDL/RWKV-LM
|
46 |
+
- **Paper:** With in Progress
|
47 |
+
|
48 |
+
## Uses
|
49 |
+
|
50 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
51 |
+
Install `flash-linear-attention` and the latest version of `transformers` before using this model:
|
52 |
+
|
53 |
+
```bash
|
54 |
+
pip install git+https://github.com/fla-org/flash-linear-attention
|
55 |
+
pip install 'transformers>=4.48.0'
|
56 |
+
```
|
57 |
+
|
58 |
+
### Direct Use
|
59 |
+
|
60 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
61 |
+
You can use this model just as any other HuggingFace models:
|
62 |
+
```python
|
63 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
64 |
+
model = AutoModelForCausalLM.from_pretrained('fla-hub/rwkv7-1.5B-world', trust_remote_code=True)
|
65 |
+
tokenizer = AutoTokenizer.from_pretrained('fla-hub/rwkv7-1.5B-world', trust_remote_code=True)
|
66 |
+
```
|
67 |
+
|
68 |
+
## Training Details
|
69 |
+
|
70 |
+
### Training Data
|
71 |
+
|
72 |
+
This model is trained on the World v2.8 with a total of 1.0 trillion tokens.
|
73 |
+
|
74 |
+
#### Training Hyperparameters
|
75 |
+
|
76 |
+
- **Training regime:** bfloat16, lr 4e-4 to 1e-5 "delayed" cosine decay, wd 0.1 (with increasing batch sizes during the middle)
|
77 |
+
- **Final Loss:** 1.9965
|
78 |
+
|
79 |
+
## Evaluation
|
80 |
+
|
81 |
+
#### Metrics
|
82 |
+
|
83 |
+
`lambada_openai`:
|
84 |
+
|
85 |
+
before conversion: ppl 4.13 acc 69.4%
|
86 |
+
|
87 |
+
after conversion: ppl 4.26 acc 68.8%
|
88 |
+
|
89 |
+
## FAQ
|
90 |
+
Q: safetensors metadata is none.
|
91 |
+
|
92 |
+
A: upgrade transformers to >=4.48.0: `pip install 'transformers>=4.48.0'`
|