Downloads · 30 days
29
6% of all-time downloads
prithivMLmods/Feynman-Grpo-Exp
Feynman-Grpo-Exp is a text generation model from prithivMLmods. 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.
Feynman-Grpo-Exp is based on the Qwen 0.5B modality architecture, designed to enhance the reasoning capabilities of 0.5B-parameter models. It has been fine-tuned using the GRPO trainer on the OpenAI GSM8K dataset for…
Downloads · 30 days
29
6% of all-time downloads
All-time downloads
490
Public
Parameters
494M
6.9 GB on disk
Likes
1
Public
Click a slice to open those files.
.onnx6.4 GB · 87%
From the Hugging Face model README
Feynman-Grpo-Exp is based on the Qwen 0.5B modality architecture, designed to enhance the reasoning capabilities of 0.5B-parameter models. It has been fine-tuned using the GRPO trainer on the OpenAI GSM8K dataset for reinforcement learning, improving its ability to handle complex reasoning tasks, multi-step problem-solving, and mathematical challenges. This model excels in chain-of-thought (CoT) reasoning and logical problem-solving, making it suitable for a variety of advanced tasks that require precise and structured outputs.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "prithivMLmods/Feynman-Grpo-Exp"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto",
trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Give me a short introduction to large language models."
messages = [
{"role": "system", "content": "You are an advanced AI assistant with expert-level reasoning and knowledge."},
{"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=512
)
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)