This model is based on Qwen/Qwen2.5-32B-Instruct with multiple tunings to improve overall performance from the Base model.
It excels at Japanese language tasks, but is designed to meet a variety of global needs.
In the Japanese MT Bench using gpt-4o as the evaluator, the inference performance of this model with 4-bit quantization achieved a score approaching that of gpt-4-turbo.
Here provides a code snippet with apply_chat_template to show you how to load the tokenizer and model and how to generate contents.
pip install bitsandbytes transformers accelerate
python
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
34model_name ="AXCXEPT/EZO-Qwen2.5-32B-Instruct"56model = AutoModelForCausalLM.from_pretrained(7 model_name,8 torch_dtype=torch.bfloat16,9 device_map="auto",10 load_in_4bit=True11)12tokenizer = AutoTokenizer.from_pretrained(model_name)1314prompt ="仕事の熱意を取り戻すためのアイデアを5つ挙げてください。"15messages =[16{"role":"system","content":"You are a helpful assistant."},17{"role":"user","content": prompt}18]19text = tokenizer.apply_chat_template(20 messages,21 tokenize=False,22 add_generation_prompt=True23)24model_inputs = tokenizer([text], return_tensors="pt")25#if you don't use "load_in_4bit", you should do "model_inputs = tokenizer([text], return_tensors="pt").to(model.device)"2627generated_ids = model.generate(28**model_inputs,29 max_new_tokens=51230)31generated_ids =[32 output_ids[len(input_ids):]for input_ids, output_ids inzip(model_inputs.input_ids, generated_ids)33]3435response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]36print(response)
Training Dataset]
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.
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.
We would like to express our gratitude and respect to Alibaba Cloud and the team of developers who developed this base model, as well as to the many others who contributed to the automated evaluation methodology.
本ベースモデルを開発してくださったAlibaba Cloud社ならびに当該チームの開発者の方々、また自動評価の手法を提供してくださった多数の方々に感謝と尊敬の意を表します。