kcoopermiller commited on
Commit
0ffd50d
1 Parent(s): b61eaaa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -1
README.md CHANGED
@@ -9,4 +9,29 @@ widget:
9
  - text: "自然言語処理とは何か"
10
  ---
11
 
12
- llm-jp's [llm-jp-1.3b-v1.0](https://huggingface.co/llm-jp/llm-jp-1.3b-v1.0) model fine-tuned on the Japanese examples from Cohere's [aya dataset](https://huggingface.co/datasets/CohereForAI/aya_dataset)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  - text: "自然言語処理とは何か"
10
  ---
11
 
12
+ # llm-jp-1.3b-v1.0-aya
13
+ llm-jp's [llm-jp-1.3b-v1.0](https://huggingface.co/llm-jp/llm-jp-1.3b-v1.0) model fine-tuned on the Japanese examples from Cohere's [aya dataset](https://huggingface.co/datasets/CohereForAI/aya_dataset)
14
+
15
+ | Model | [llm-jp-eval AVG](https://wandb.ai/wandb-japan/llm-leaderboard/reports/Nejumi-LLM-Leaderboard-Evaluating-Japanese-Language-Proficiency--Vmlldzo2MzU3NzIy#deep-dive-into-llm-jp-eval) |
16
+ |-----------------------------------|---------|
17
+ | kcoopermiller/llm-jp-1.3b-v1.0-aya | **0.0698** |
18
+ | llm-jp/llm-jp-1.3b-v1.0 | 0.047 |
19
+
20
+ ## How to use
21
+ ```python
22
+ import torch
23
+ from transformers import AutoTokenizer, AutoModelForCausalLM
24
+ tokenizer = AutoTokenizer.from_pretrained("kcoopermiller/llm-jp-1.3b-v1.0-aya")
25
+ model = AutoModelForCausalLM.from_pretrained("kcoopermiller/llm-jp-1.3b-v1.0-aya", device_map="auto")
26
+ text = "自然言語処理とは何か"
27
+ tokenized_input = tokenizer.encode(text, add_special_tokens=False, return_tensors="pt").to(model.device)
28
+ with torch.no_grad():
29
+ output = model.generate(
30
+ tokenized_input,
31
+ max_new_tokens=20,
32
+ do_sample=True,
33
+ top_p=0.90,
34
+ temperature=0.7,
35
+ )[0]
36
+ print(tokenizer.decode(output))
37
+ ```