CoolFace
Modelpublic

sbintuitions/sarashina2.2-1b-instruct-v0.1

sourceHugging Facemitupdated 2y agoView on Hugging Face
16likes2.2kdownloads
Model Card

sbintuitions/sarashina2.2-1b-instruct-v0.1

Model Summary

This repository provides Japanese language models trained by SB Intuitions.

Model Details

  • —Model type: Autoregressive Language Model
  • —Language(s): Japanese

Evaluation in Japanese and English Tasks

ModelElyza-tasks-100Japanese MT BenchEnglish MT Bench
Qwen/Qwen2.5-0.5B-instruct1.532.954.98
sarashina2.2-0.5B-instruct-v0.12.384.555.09
Rakuten/RakutenAI-2.0-mini-instruct2.414.495.13
SakanaAI/TinySwallow-1.5B-Instruct2.815.246.31
Qwen/Qwen2.5-1.5B-instruct2.284.066.99
llm-jp/llm-jp-3-1.8b-instruct32.534.624.83
sarashina2.2-1B-instruct-v0.12.885.096.46
google/gemma-2-2b-jpn-it3.025.197.56
Qwen/Qwen2.5-3B-instruct2.995.687.88
llm-jp/llm-jp-3-3.7b-instruct32.794.985.44
sarashina2.2-3B-instruct-v0.13.756.517.71

How to Use

python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, set_seed

# モデルのロード
model_name = "sbintuitions/sarashina2.2-1b-instruct-v0.1"
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_name)
chat_pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer)
set_seed(123)

# ユーザーの入力
user_input = [{"role": "user", "content": "こんにちは。あなたの名前を教えて"}]

# モデルによる応答生成
responses = chat_pipeline(
    user_input,
    max_length=50,
    do_sample=True,
    num_return_sequences=3,
)

# 応答を表示
for i, response in enumerate(responses, 1):
    print(f"Response {i}: {response['generated_text']}")

# Response 1: [{'role': 'user', 'content': 'こんにちは。あなたの名前を教えて'}, {'role': 'assistant', 'content': 'Sarashina2と言います。本日のご要件を教えて下さい。'}]
# Response 2: [{'role': 'user', 'content': 'こんにちは。あなたの名前を教えて'}, {'role': 'assistant', 'content': 'こんにちは!私の名前はSarashina2です。今日はどうしましたか?'}]
# Response 3: [{'role': 'user', 'content': 'こんにちは。あなたの名前を教えて'}, {'role': 'assistant', 'content': 'Sarashina2と言います。本日のご要件を教えて下さい。'}]

Limitations

This model has limited safety training. Therefore, it might generate some meaningless sequences, some inaccurate instances, or biased/objectionable outputs. Before using it, we would like developers to tune models based on human preferences and safety considerations.

License

MIT License