HODACHI commited on
Commit
3eaa63a
1 Parent(s): d14b20b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +85 -0
README.md CHANGED
@@ -64,3 +64,88 @@ pip install -U trl
64
  pip install pytest
65
  ```
66
  を実行し、使用例に関連するセクションのスニペットをコピーしてください。
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  pip install pytest
65
  ```
66
  を実行し、使用例に関連するセクションのスニペットをコピーしてください。
67
+
68
+ ### [Chat Template]
69
+ ```
70
+ <|system|>
71
+ あなたは日本語能力が高い高度なAIです。特別な指示がない限り日本語で返答してください。<|end|>
72
+ <|user|>
73
+ 「生き物デザイナー」という職業があります。これは、自分が考えたオリジナルの生き物をデザインし、実際にDNAを編集して作り出す仕事です。あなたが生き物デザイナーである場合、どんな生き物を作りたいですか?また、その生き物が持つ特徴や能力について説明してください。
74
+ <|end|>
75
+ <|assistant|>
76
+ ```
77
+
78
+
79
+ ### Loading the model locally
80
+ After obtaining the Phi-3.5-mini-instruct model checkpoint, users can use this sample code for inference.
81
+
82
+ ```python
83
+ import torch
84
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
85
+
86
+ torch.random.manual_seed(0)
87
+
88
+ model = AutoModelForCausalLM.from_pretrained(
89
+ "microsoft/HODACHI/Borea-Phi-3.5-mini-Instruct-Jp",
90
+ device_map="cuda",
91
+ torch_dtype="auto",
92
+ trust_remote_code=True,
93
+ )
94
+ tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3.5-mini-instruct")
95
+
96
+ messages = [
97
+ {"role": "system", "content": "あなたは日本語能力が高い高度なAIです。特別な指示がない限り日本語で返答してください。"},
98
+ {"role": "user", "content": "「生き物デザイナー」という職業があります。これは、自分が考えたオリジナルの生き物をデザインし、実際にDNAを編集して作り出す仕事です。あなたが生き物デザイナーである場合、どんな生き物を作りたいですか?また、その生き物が持つ特徴や能力について説明してください。"},
99
+ ]
100
+
101
+ pipe = pipeline(
102
+ "text-generation",
103
+ model=model,
104
+ tokenizer=tokenizer,
105
+ )
106
+
107
+ generation_args = {
108
+ "max_new_tokens": 1024,
109
+ "return_full_text": False,
110
+ "temperature": 0.0,
111
+ "do_sample": False,
112
+ }
113
+
114
+ output = pipe(messages, **generation_args)
115
+ print(output[0]['generated_text'])
116
+ ```
117
+
118
+ Notes: If you want to use flash attention, call _AutoModelForCausalLM.from_pretrained()_ with _attn_implementation="flash_attention_2"_
119
+
120
+
121
+ ### [Model Data]
122
+ #### Training Dataset]
123
+ We extracted high-quality data from Japanese Wikipedia and FineWeb to create instruction data. Our innovative training approach allows for performance improvements across various languages and domains, making the model suitable for global use despite its focus on Japanese data.
124
+
125
+ 日本語のWikiデータおよび、FineWebから良質なデータのみを抽出し、Instructionデータを作成しました。このモデルでは日本語に特化させていますが、世界中のどんなユースケースでも利用可能なアプローチです。
126
+
127
+ https://huggingface.co/datasets/legacy-datasets/wikipedia
128
+ https://huggingface.co/datasets/HuggingFaceFW/fineweb
129
+
130
+ #### Data Preprocessing
131
+ We used a plain instruction tuning method to train the model on exemplary responses. This approach enhances the model's ability to understand and generate high-quality responses across various languages and contexts.
132
+
133
+ プレインストラクトチューニング手法を用いて、模範的回答を学習させました。この手法により、モデルは様々な言語やコンテキストにおいて高品質な応答を理解し生成する能力が向上しています。
134
+
135
+ #### Implementation Information
136
+ [Pre-Instruction Training]
137
+
138
+ https://huggingface.co/instruction-pretrain/instruction-synthesizer
139
+
140
+ ### [Disclaimer]
141
+ このモデルは研究開発のみを目的として提供されるものであり、実験的なプロトタイプとみなされるべきモデルです。
142
+ 商業的な使用やミッションクリティカルな環境への配備を意図したものではありません。
143
+ 本モデルの使用は、使用者の責任において行われるものとし、その性能および結果は保証されません。
144
+ Axcxept株式会社は、直接的、間接的、特別、偶発的、結果的な損害、または本モデルの使用から生じるいかなる損失に対しても、得られた結果にかかわらず、一切の責任を負いません。
145
+ 利用者は、本モデルの使用に伴うリスクを十分に理解し、自己の判断で使用するものとします。
146
+
147
+ ### [Hardware]
148
+ H100PCIe × 8(Running in 2h)
149
+
150
+ ### [We are.]
151
+ [![Axcxept logo](https://cdn-uploads.huggingface.co/production/uploads/657e900beaad53ff67ba84db/8OKW86U986ywttvL2RcbG.png)](https://axcxept.com)