Downloads · 30 days
23
24% of all-time downloads
ryota39/Qwen3-8B-math-RL-en
Qwen3-8B-math-RL-en is a text generation model from ryota39. 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.
- Qwen/Qwen3-8Bを少ないトークン予算の元maxnewtokens=256で、openai/gsm8kを使って事後学習したモデルです。 - tinkercookbookのrlbasic.pyに従い、accuracyrewardとformatrewardを最大化するようなモデルの重みを学習しています。
Downloads · 30 days
23
24% of all-time downloads
All-time downloads
94
Public
Parameters
8.2B
16.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.4 GB · 100%
From the Hugging Face model README
max_new_tokens=256で、openai/gsm8kを使って事後学習したモデルです。import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "ryota39/Qwen3-8B-math-RL-en"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="auto",
)
prompt = "A Christmas tree has 8 shelves for decorations, and each shelf can hold 45 ornaments. Currently, two-thirds of the total capacity is decorated. How many ornaments are on the tree in total? Write your answer in the format \\boxed{answer}."
messages = [{"role": "user", "content": prompt}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
# 出力例
# <think>
# Okay, let's see. The Christmas tree has 8 shelves, each holding 45 ornaments. So the total capacity is 8 times 45. Let me calculate that: 8*45 is 360. So the total capacity is 360 ornaments. Now, two-thirds of that is decorated. So two-thirds of 360 is (2/3)*360. Let me compute that: 360 divided by 3 is 120, times 2 is 240. So there are 240 ornaments on the tree. The answer is \boxed{240}.
#
# **Final Answer**
# \boxed{240}
# </think>
#
# To determine how many ornaments are currently on the tree, we start by calculating the total capacity of the tree:
#
# - There are 8 shelves, and each shelf holds 45 ornaments.
# - Total capacity = $ 8 \times 45 = 360 $ ornaments.
#
# Next, we are told that two-thirds of this total capacity is currently decorated:
#
# - Two-thirds of 360 = $ \frac{2}{3} \times 360 = 240 $