๐ ABEJA-Qwen2.5-7b-Japanese-v0.1
ABEJA-Qwen2.5-7b-Japanese-v0.1 is a model trained on Japanese based on Qwen/Qwen2.5-7B-Instruct. Instead of regular continued pre - training, it is a model trained through distillation learning based on abeja/ABEJA-Qwen2.5-32b-Japanese-v0.1. Post - Training is not carried out, and the instruction - following performance is improved by ChatVector (the difference vector between Qwen/Qwen2.5-7B-Instruct and Qwen/Qwen2.5-7B). For more details, please refer to ABEJA's tech blog.
๐ Quick Start
ABEJA-Qwen2.5-7b-Japanese-v0.1 is a model that has undergone Japanese language training based on Qwen/Qwen2.5-7B-Instruct. Instead of regular continued pre - training, it uses distillation learning based on abeja/ABEJA-Qwen2.5-32b-Japanese-v0.1. Post - Training is not performed, and the instruction - following performance is enhanced by ChatVector (the difference vector between Qwen/Qwen2.5-7B-Instruct and Qwen/Qwen2.5-7B).
For more details, please refer to ABEJA's tech blog.
โจ Features
- Based on Qwen2.5: Built upon the Qwen/Qwen2.5-7B-Instruct base model.
- Distillation Learning: Utilizes distillation learning based on abeja/ABEJA-Qwen2.5-32b-Japanese-v0.1.
- Enhanced by ChatVector: Improves instruction - following performance using ChatVector.
๐ป Usage Examples
Basic Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "abeja/ABEJA-Qwen2.5-7b-Japanese-v0.1"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "ไบบใจAIใๅ่ชฟใใใใใซใฏ๏ผ"
messages = [
{"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
{"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=512
)
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)
๐ License
This project is licensed under the Apache - 2.0 license.
๐จโ๐ป Developers
- Hiroshi Kiyota
- Keisuke Fujimoto
- Kentaro Nakanishi
- Kyo Hattori
- Shinya Otani
- Shogo Muranushi
- Takuma Kume
- Tomoki Manabe
(*) In alphabetical order
Property |
Details |
Library Name |
transformers |
Base Model |
Qwen/Qwen2.5-7B-Instruct |
Pipeline Tag |
text-generation |
License |
apache-2.0 |