JunichiroMorita commited on
Commit
e48be70
1 Parent(s): 8b06b9c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -5
README.md CHANGED
@@ -6,17 +6,48 @@ tags:
6
  - unsloth
7
  - llama
8
  - trl
9
- license: apache-2.0
10
  language:
11
- - en
 
 
 
12
  ---
13
 
14
  # Uploaded model
15
 
16
  - **Developed by:** JunichiroMorita
17
- - **License:** apache-2.0
18
  - **Finetuned from model :** llm-jp/llm-jp-3-13b
19
 
20
- This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
- [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
 
 
 
 
 
 
 
6
  - unsloth
7
  - llama
8
  - trl
9
+ license: cc
10
  language:
11
+ - ja
12
+ datasets:
13
+ - elyza/ELYZA-tasks-100
14
+ - weblab-GENIAC/aya-ja-evol-instruct-calm3-dpo-masked
15
  ---
16
 
17
  # Uploaded model
18
 
19
  - **Developed by:** JunichiroMorita
20
+ - **License:** CC-BY-NC-SA
21
  - **Finetuned from model :** llm-jp/llm-jp-3-13b
22
 
23
+ # Usage
24
+ ```python
25
+ import torch
26
+ from transformers import AutoTokenizer, AutoModelForCausalLM
27
+ tokenizer = AutoTokenizer.from_pretrained("JunichiroMorita/llm-jp-3-13b_lora_20241201")
28
+ model = AutoModelForCausalLM.from_pretrained("JunichiroMorita/llm-jp-3-13b_lora_20241201", device_map="auto", torch_dtype=torch.bfloat16)
29
+ chat = [
30
+ {"role": "system", "content": "以下は、タスクを説明する指示です。要求を適切に満たす応答を書きなさい。"},
31
+ {"role": "user", "content": "自然言語処理とは何か"},
32
+ ]
33
+ tokenized_input = tokenizer.apply_chat_template(chat, add_generation_prompt=True, tokenize=True, return_tensors="pt").to(model.device)
34
+ with torch.no_grad():
35
+ output = model.generate(
36
+ tokenized_input,
37
+ max_new_tokens=2048,
38
+ do_sample=True,
39
+ top_p=0.95,
40
+ temperature=0.7,
41
+ repetition_penalty=1.05,
42
+ )[0]
43
+ print(tokenizer.decode(output))
44
 
45
+ ```
46
+
47
+ # Data
48
+ - [DeL-TaiseiOzaki/news_summary_2024secondhalf](https://huggingface.co/datasets/DeL-TaiseiOzaki/news_summary_2024secondhalf)
49
+ - [llmのための日本語インストラクションデータ (CC-BY-NC-SA)](https://liat-aip.sakura.ne.jp/wp/llm%e3%81%ae%e3%81%9f%e3%82%81%e3%81%ae%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e3%83%87%e3%83%bc%e3%82%bf%e4%bd%9c%e6%88%90/llm%e3%81%ae%e3%81%9f%e3%82%81%e3%81%ae%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%a9%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e3%83%87%e3%83%bc%e3%82%bf-%e5%85%ac%e9%96%8b/)\[1]
50
+ - [elyza/ELYZA-tasks-100](https://huggingface.co/datasets/elyza/ELYZA-tasks-100)
51
+ - [weblab-GENIAC/aya-ja-evol-instruct-calm3-dpo-masked](https://huggingface.co/datasets/weblab-GENIAC/aya-ja-evol-instruct-calm3-dpo-masked)
52
+
53
+ \[1]:関根聡, 安藤まや, 後藤美知子, 鈴木久美, 河原大輔, 井之上直也, 乾健太郎. ichikara-instruction: LLMのための日本語インストラクションデータの構築. 言語処理学会第30回年次大会(2024)