xiaol commited on
Commit
16d778d
·
1 Parent(s): 5627158

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +29 -1
README.md CHANGED
@@ -11,8 +11,36 @@ datasets:
11
  ---
12
 
13
  # RWKV 14B one state model
14
- finetuend on instruction datasets ,can do Role play
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  ### Traning details
18
  https://wandb.ai/one-/out14B-one/runs/uhomhbgg/workspace
 
11
  ---
12
 
13
  # RWKV 14B one state model
14
+ finetuend on instruction datasets ,can do Role play, for openllm leaderboard, impoved mmlu training datasets
15
 
16
+ this is a huggingface formatted model
17
+
18
+ checkpoint can be founded here https://huggingface.co/xiaol/Model_zoo/blob/main/rwkv-raven-14B-v4-one-state.pth
19
+
20
+ ```
21
+ from transformers import AutoTokenizer, AutoModelForCausalLM
22
+ import torch
23
+
24
+ #model_id = "xiaol/Huggingface-RWKV-claude-for-mobile-v4-world-1.5B-16k"
25
+ model_id = "xiaol/RWKV-raven-14B-one-state"
26
+
27
+ model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16)
28
+
29
+ #model = model.half() #1.5B need fp32
30
+
31
+ #model = torch.compile(model) #need pytorch 2.0 and linux
32
+ model.to(0)
33
+
34
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
35
+
36
+ question = "Tell me about ravens"
37
+ prompt = f"### Instruction: {question}\n### Response:"
38
+
39
+ inputs = tokenizer(prompt, return_tensors="pt").to(0)
40
+ output = model.generate(inputs["input_ids"], max_new_tokens=100)
41
+
42
+ print(tokenizer.decode(output[0].tolist(), skip_special_tokens=True))
43
+ ```
44
 
45
  ### Traning details
46
  https://wandb.ai/one-/out14B-one/runs/uhomhbgg/workspace