File size: 1,481 Bytes
1b41227
 
85b8a22
 
 
 
 
 
 
 
1b41227
85b8a22
8845331
16d778d
85b8a22
16d778d
 
 
e68ac51
16d778d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85b8a22
 
2082a7f
 
 
77cd137
aac5bb3
77cd137
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
license: apache-2.0
datasets:
- PygmalionAI/PIPPA
- Norquinal/claude_multiround_chat_30k
- ehartford/dolphin
- cais/mmlu
- OpenLeecher/Teatime
- BAAI/COIG-PC
- natural_questions
---

# RWKV 14B one state model
finetuend on instruction datasets ,can do Role play, for openllm leaderboard, impoved mmlu training datasets

this is a huggingface formatted model

checkpoint can be founded here https://huggingface.co/xiaol/Model_zoo/blob/main/rwkv-raven-14B-v4-one-state.pth
and need to use new vocabs file https://huggingface.co/xiaol/Model_zoo/blob/main/20B_tokenizer_new_inference.json

```
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

#model_id = "xiaol/Huggingface-RWKV-claude-for-mobile-v4-world-1.5B-16k"
model_id = "xiaol/RWKV-raven-14B-one-state"

model = AutoModelForCausalLM.from_pretrained(model_id,  torch_dtype=torch.bfloat16)

#model = model.half() #1.5B need fp32

#model = torch.compile(model) #need pytorch 2.0 and linux
model.to(0)

tokenizer = AutoTokenizer.from_pretrained(model_id)

question = "Tell me about ravens"
prompt = f"### Instruction: {question}\n### Response:"

inputs = tokenizer(prompt, return_tensors="pt").to(0)
output = model.generate(inputs["input_ids"], max_new_tokens=100)

print(tokenizer.decode(output[0].tolist(), skip_special_tokens=True))
```

### Traning details
https://wandb.ai/one-/out14B-one/runs/uhomhbgg/workspace

### Test case
https://rwkv.ai-creator.net/st

https://rwkv-next-web.ai-creator.net/