Downloads · 30 days
0
santos-sanz/vending-machine-rl-model
vending-machine-rl-model is a reinforcement learning model from santos-sanz. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
This model is a fine-tuned version of Qwen/Qwen3-0.6B, optimized using Group Relative Policy Optimization (GRPO) for strategic decision-making in a competitive vending machine simulation environment.
Downloads · 30 days
0
Access
Public
Updated Dec 30, 2025
Repo size
619 MB
Likes
0
Public
Click a slice to open those files.
.safetensors20.2 MB · 56%
From the Hugging Face model README
This model is a fine-tuned version of Qwen/Qwen3-0.6B, optimized using Group Relative Policy Optimization (GRPO) for strategic decision-making in a competitive vending machine simulation environment.
The model acts as a Strategic Business Manager for 'LLMMachine'. It is trained to adjust product prices (Soda, Chips, Candy Bar, Water) to maximize net profit while competing with a 'BasicMachine' in a shared client pool. The training focuses on balancing profit margins against sales volume based on market data and stockout feedback.
The model is intended to generate strategic price adjustments in response to market conditions. It provides reasoning in <thought> tags followed by a JSON action block.
{
"action": "change_price",
"parameters": {
"machine_name": "LLMMachine",
"product_name": "Soda",
"new_price": 2.75
}
}
This model is a specialized simulation agent and should not be used as a general-purpose assistant or for financial advice in real-world markets without further validation.
The model is trained on synthetic simulation data. Its strategies are optimized for the specific logic of the VendingMachine simulation engine and may not translate to real-world consumer behavior which is more complex and less predictable.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
model_id = "santos-sanz/vending-machine-rl-model"
base_model = "Qwen/Qwen3-0.6B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(base_model, torch_dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(model, model_id)
prompt = """
You are a Strategic Business Manager for 'LLMMachine'.
... (see training script for full prompt)
"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The model was trained using synthetic market data generated by a custom simulation engine. Each prompt includes:
The model was evaluated based on reward functions tracking:
Final training logs showed significant improvement in the profit_reward_func:
The model uses a LoRA adapter on top of the SmolLM3-3B architecture. The GRPO objective optimizes the policy to maximize the expected reward from the vending machine simulation.
@article{shao2024deepseekmath,
title = {{DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models}},
author = {Zhihong Shao and Peiyi Wang and Qihao Zhu and Runxin Xu and Junxiao Song and Mingchuan Zhang and Y. K. Li and Y. Wu and Daya Guo},
year = 2024,
eprint = {arXiv:2402.03300},
}
Andres Santos