| --- |
| license: apache-2.0 |
| language: |
| - ja |
| - en |
| base_model: |
| - Qwen/Qwen2.5-32B-Instruct |
| - cyberagent/DeepSeek-R1-Distill-Qwen-32B-Japanese |
| - abeja/ABEJA-Qwen2.5-32b-Japanese-v0.1 |
| --- |
| |
| ## 概要 |
| このモデルは[Qwen/Qwen2.5-32B](https://huggingface.co/Qwen/Qwen2.5-32B)をファインチューニングしたAbeja社のベースモデルにDeepSeek社のR1蒸留モデルである[deepseek-ai/DeepSeek-R1-Distill-Qwen-32B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B)を日本語ファインチューニングしたcyber agent社の[cyberagent/DeepSeek-R1-Distill-Qwen-32B-Japanese](https://huggingface.co/cyberagent/DeepSeek-R1-Distill-Qwen-32B-Japanese)をChatVectorを用いて加えたものに、独自の日本語強化ファインチューニングをしたモデルとなります。 |
|
|
| ## 注意 |
| Abeja社はbaseモデルを公開していないため、マイナスチャットベクターを用いて作りました。 |
| このモデルは **長考モデル**ではありません。 |
| ## How to use |
| ```python |
| from transformers import AutoModelForCausalLM, AutoTokenizer |
| |
| model_name = "DataPilot/Arrival-32B-Instruct-v0.4" |
| tokenizer_name = "" |
| |
| if tokenizer_name == "": |
| tokenizer_name = model_name |
| |
| model = AutoModelForCausalLM.from_pretrained( |
| model_name, |
| torch_dtype="auto", |
| device_map="auto" |
| ) |
| tokenizer = AutoTokenizer.from_pretrained(tokenizer_name) |
| |
| prompt = "9.9と9.11はどちらのほうが大きいですか?" |
| messages = [ |
| {"role": "system", "content": "あなたは優秀な日本語アシスタントです。問題解決をするために考えた上で回答を行ってください。"}, |
| {"role": "user", "content": prompt} |
| ] |
| text = tokenizer.apply_chat_template( |
| messages, |
| tokenize=False, |
| add_generation_prompt=True |
| ) |
| model_inputs = tokenizer([text], return_tensors="pt").to(model.device) |
| |
| generated_ids = model.generate( |
| **model_inputs, |
| max_new_tokens=1024 |
| ) |
| generated_ids = [ |
| output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids) |
| ] |
| |
| response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0] |
| |
| print(response) |
| ``` |
|
|
| ## ベンチマーク |
| このモデルはELYZA-task100で4.61をマークしました。(評価にはGroqのllama3-70B-8192を使用しました。) |
|
|
|
|
| ## 謝辞 |
| モデルの作成者であるDeepSeekチーム, Qwenチーム, Abejaチーム, CyberAgentチーム、評価モデルの作成者であるmeta社とAPIを公開しているGroq社、計算資源を貸していただいたVOLTMIND社に感謝を申し上げます。 |