This model is based on Gemma-2-9B-it and is subject to the Gemma Terms of Use. For detailed information, please refer to the official Gemma license page.
This model is based on Gemma-2-9B-it, specially tuned to enhance its performance in Humanities-related tasks. While maintaining its strong foundation in Japanese language processing, it has been optimized to excel in areas such as literature, philosophy, history, and cultural studies. This focused approach allows the model to provide deeper insights and more nuanced responses in Humanities fields, while still being capable of handling a wide range of global inquiries.
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.
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import transformers
3import torch
4model_id ="HODACHI/EZO-Humanities-9B-gemma-2-it"5dtype = torch.bfloat16
6tokenizer = AutoTokenizer.from_pretrained(model_id)7model = AutoModelForCausalLM.from_pretrained(8 model_id,9 device_map="cuda",10 torch_dtype=dtype,)11chat =[12{"role":"user","content":"How do different stages of life influence our understanding of time and death? Please provide examples."},13]14prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)15inputs = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")16outputs = model.generate(input_ids=inputs.to(model.device), max_new_tokens=150)17print(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]
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.