Update README.md
Browse files
README.md
CHANGED
@@ -20,6 +20,13 @@ programming_language:
|
|
20 |
library_name: transformers
|
21 |
pipeline_tag: text-generation
|
22 |
inference: false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
---
|
24 |
# llm-jp-13b-instruct-full-ac_001_16x-dolly-ichikara_004_001_single-oasst-oasst2-v2.0
|
25 |
|
@@ -56,8 +63,11 @@ import torch
|
|
56 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
57 |
tokenizer = AutoTokenizer.from_pretrained("llm-jp/llm-jp-13b-instruct-full-ac_001_16x-dolly-ichikara_004_001_single-oasst-oasst2-v2.0")
|
58 |
model = AutoModelForCausalLM.from_pretrained("llm-jp/llm-jp-13b-instruct-full-ac_001_16x-dolly-ichikara_004_001_single-oasst-oasst2-v2.0", device_map="auto", torch_dtype=torch.float16)
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
61 |
with torch.no_grad():
|
62 |
output = model.generate(
|
63 |
tokenized_input,
|
@@ -89,7 +99,7 @@ print(tokenizer.decode(output))
|
|
89 |
|
90 |
- **Instruction tuning:**
|
91 |
- **Hardware:** 8 A100 40GB GPUs ([mdx cluster](https://mdx.jp/en/))
|
92 |
-
- **Software:** [TRL](https://github.com/huggingface/trl)
|
93 |
|
94 |
## Tokenizer
|
95 |
|
|
|
20 |
library_name: transformers
|
21 |
pipeline_tag: text-generation
|
22 |
inference: false
|
23 |
+
datasets:
|
24 |
+
- databricks/databricks-dolly-15k
|
25 |
+
- llm-jp/databricks-dolly-15k-ja
|
26 |
+
- llm-jp/oasst1-21k-en
|
27 |
+
- llm-jp/oasst1-21k-ja
|
28 |
+
- llm-jp/oasst2-33k-en
|
29 |
+
- llm-jp/oasst2-33k-ja
|
30 |
---
|
31 |
# llm-jp-13b-instruct-full-ac_001_16x-dolly-ichikara_004_001_single-oasst-oasst2-v2.0
|
32 |
|
|
|
63 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
64 |
tokenizer = AutoTokenizer.from_pretrained("llm-jp/llm-jp-13b-instruct-full-ac_001_16x-dolly-ichikara_004_001_single-oasst-oasst2-v2.0")
|
65 |
model = AutoModelForCausalLM.from_pretrained("llm-jp/llm-jp-13b-instruct-full-ac_001_16x-dolly-ichikara_004_001_single-oasst-oasst2-v2.0", device_map="auto", torch_dtype=torch.float16)
|
66 |
+
chat = [
|
67 |
+
{"role": "system", "content": "以下は、タスクを説明する指示です。要求を適切に満たす応答を書きなさい。"},
|
68 |
+
{"role": "user", "content": "自然言語処理とは何か"},
|
69 |
+
]
|
70 |
+
tokenized_input = tokenizer.apply_chat_template(chat, add_generation_prompt=True, tokenize=True, return_tensors="pt").to(model.device)
|
71 |
with torch.no_grad():
|
72 |
output = model.generate(
|
73 |
tokenized_input,
|
|
|
99 |
|
100 |
- **Instruction tuning:**
|
101 |
- **Hardware:** 8 A100 40GB GPUs ([mdx cluster](https://mdx.jp/en/))
|
102 |
+
- **Software:** [TRL](https://github.com/huggingface/trl) and [DeepSpeed](https://github.com/microsoft/DeepSpeed)
|
103 |
|
104 |
## Tokenizer
|
105 |
|