ABEJA-Qwen2.5-32b-Japanese-v0.1

ABEJA-Qwen2.5-32b-Japanese-v0.1はQwen/Qwen2.5-32B-Instructをベースに日本語中心とした継続事前学習を実施したモデルです。 Post-Traningはまだ実施しておらず、ChatVector(Qwen/Qwen2.5-32B-InstructとQwen/Qwen2.5-32B の差分ベクトル)により指示追従性能をあげています。

詳細はABEJAのテックブログを参照してください。

使い方

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "abeja/ABEJA-Qwen2.5-32b-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)

開発者

  • Hiroshi Kiyota
  • Keisuke Fujimoto
  • Kentaro Nakanishi
  • Kyo Hattori
  • Shinya Otani
  • Shogo Muranushi
  • Takuma Kume
  • Tomoki Manabe

(*)アルファベット順

Downloads last month
192
Safetensors
Model size
32.8B params
Tensor type
FP16
·
Inference Providers NEW
This model is not currently available via any of the supported third-party Inference Providers, and the model is not deployed on the HF Inference API.

Model tree for abeja/ABEJA-Qwen2.5-32b-Japanese-v0.1

Base model

Qwen/Qwen2.5-32B
Finetuned
(109)
this model
Finetunes
2 models
Merges
1 model
Quantizations
6 models