license: gemma
library_name: transformers
pipeline_tag: text-generation
tags:
- conversational
EZO model card
Terms of Use: Terms Authors: Axcxept co., ltd.
Model Information
This model is based on Gemma-2-9B-it, enhanced with multiple tuning techniques to improve its general performance. While it excels in Japanese language tasks, it's designed to meet diverse needs globally.
Gemma-2-9B-itをベースとして、複数のチューニング手法を採用のうえ、汎用的に性能を向上させたモデルです。日本語タスクに優れつつ、世界中の多様なニーズに応える設計となっています。
Benchmark Results
Usage
Here are some code snippets to quickly get started with the model. First, run:
pip install -U transformers
Then, copy the snippet from the relevant section for your use case.
以下に、モデルの実行を素早く開始するためのコードスニペットをいくつか紹介します。
まず、
pip install -U transformers
を実行し、使用例に関連するセクションのスニペットをコピーしてください。
Chat Template
from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch
model_id = "HODACHI/EZO-Humanities-9B-gemma-2-it"
dtype = torch.bfloat16
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="cuda",
torch_dtype=dtype,)
chat = [
{ "role": "user", "content": "How do different stages of life influence our understanding of time and death? Please provide examples." },
]
prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
inputs = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
outputs = model.generate(input_ids=inputs.to(model.device), max_new_tokens=150)
print(tokenizer.decode(outputs[0]))
Template
<bos><start_of_turn>user
Write a hello world program<end_of_turn>
<start_of_turn>model
XXXXXX<end_of_turn><eos>
Model Data
Information about the data used for model training and how it was processed.
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.
日本語のWikiデータおよび、FineWebから良質なデータのみを抽出し、Instructionデータを作成しました。このモデルでは日本語に特化させていますが、世界中のどんなユースケースでも利用可能なアプローチです。
https://huggingface.co/datasets/legacy-datasets/wikipedia https://huggingface.co/datasets/HuggingFaceFW/fineweb
Data Preprocessing
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.
プレインストラクトチューニング手法を用いて、模範的回答を学習させました。この手法により、モデルは様々な言語やコンテキストにおいて高品質な応答を理解し生成する能力が向上しています。
Implementation Information
[Pre-Instruction Training]
https://huggingface.co/instruction-pretrain/instruction-synthesizer
Hardware
A100 × 4(Running in 32h)