Downloads · 30 days
22
11% of all-time downloads
taoki/Qwen2.5-Coder-7B-Instruct_mCot-ja-250-GRPO-qlora-merge
Qwen2.5-Coder-7B-Instruct_mCot-ja-250-GRPO-qlora-merge is a text generation model from taoki. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
- Developed by: taoki - Finetuned from model : Qwen/Qwen2.5-Coder-7B-Instruct - Dataset: https://huggingface.co/datasets/laihuiyuan/mCoT-MATH (ja data 2340 only)
Downloads · 30 days
22
11% of all-time downloads
All-time downloads
194
Public
Parameters
7.6B
29.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors15.2 GB · 100%
From the Hugging Face model README
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = AutoTokenizer.from_pretrained(
"taoki/Qwen2.5-Coder-7B-Instruct_mCot-ja-250-GRPO-qlora-merge"
)
model = AutoModelForCausalLM.from_pretrained(
"taoki/Qwen2.5-Coder-7B-Instruct_mCot-ja-250-GRPO-qlora-merge"
)
if torch.cuda.is_available():
model = model.to("cuda")
SYSTEM_PROMPT = """
以下の形式で応答しなさい:
<think>
...
</think>
<answer>
...
</answer>
"""
prompt="2つの数字を比較しなさい。9.9と9.11どちらが大きいですか?"
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"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=1024
)
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)
<think>
9.9と9.11を比較します。
まず、整数部分を比較します。両方とも9なので、次に小数部分を比較します。
9.9の小数部分は0.9、9.11の小数部分は0.11です。
0.9は0.11より大きいです。
したがって、9.9が9.11より大きいです。
</think>
<answer>
9.9が9.11より大きいです。
</answer>