About
これは,sbintuitions/sarashina2.2-3b-instruct-v0.1を,GRPOを用いてreasoningモデルにチューニングしたものです. チューニングは十分ではなく実験的なモデルなので,実用には向かない可能性があります.出力結果には十分ご注意ください.
Usage
参考:https://huggingface.co/sbintuitions/sarashina2.2-3b-instruct-v0.1
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, set_seed
# モデルのロード
model_name = "OsakanaTeishoku/sarashina2.2-3b-instruct-v0.1-grpo-exp-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)
# ユーザーの入力
SYSTEM_PROMPT = """
あなたは非常に賢い数学者です。数学の問題に対し、<reasoning></reasoning>の間に思考過程を記述してから<answer></answer>に解答してください。
<answer></answer>に出力する解答は数値のみ(単位をつけない)であり、それ以外のことを何も出力しないでください。
<reasoning>
...
</reasoning>
<answer>
...
</answer>
"""
user_input = [
{"role": "system", "content": SYSTEM_PROMPT}, # 注意:system promptはこちらで学習したので,変えないことを推奨します
{"role": "user", "content": "13+24はいくつか"}
]
# モデルによる応答生成
responses = chat_pipeline(
user_input,
temperature = 0.8,
top_p = 0.95,
max_length=1024,
do_sample=True,
num_return_sequences=3,
)
# 応答を表示
for i, response in enumerate(responses, 1):
print(f"Response {i}: {response['generated_text']}")
Data
p1atdev/gsm8k-ja-slimのtrain splitのうち1000件を使用
Training onfig
coming soon
Evaluation
coming soon
Uploaded model
- Developed by: OsakanaTeishoku
- License: mit
- Finetuned from model : sbintuitions/sarashina2.2-3b-instruct-v0.1
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
- Downloads last month
- 15
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.
Model tree for OsakanaTeishoku/sarashina2.2-3b-instruct-v0.1-grpo-exp-v0.1
Base model
sbintuitions/sarashina2.2-3b