Instructions to use Styl4/shopping-agent-rl-sft-2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Styl4/shopping-agent-rl-sft-2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Styl4/shopping-agent-rl-sft-2b") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Styl4/shopping-agent-rl-sft-2b") model = AutoModelForMultimodalLM.from_pretrained("Styl4/shopping-agent-rl-sft-2b", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Styl4/shopping-agent-rl-sft-2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Styl4/shopping-agent-rl-sft-2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Styl4/shopping-agent-rl-sft-2b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Styl4/shopping-agent-rl-sft-2b
- SGLang
How to use Styl4/shopping-agent-rl-sft-2b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Styl4/shopping-agent-rl-sft-2b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Styl4/shopping-agent-rl-sft-2b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Styl4/shopping-agent-rl-sft-2b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Styl4/shopping-agent-rl-sft-2b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use Styl4/shopping-agent-rl-sft-2b with Docker Model Runner:
docker model run hf.co/Styl4/shopping-agent-rl-sft-2b
Shopping Agent RL — Curriculum SFT C (2B)
Merged Qwen3.5-2B weights after cumulative A/B/C curriculum SFT with action-only supervision. Teacher trajectories were generated with DeepSeek V4 Flash from 1,192 unique tasks. Final200 Clean strict success with the enhanced execution harness: 130/200 (65%).
Format and download
Standalone Hugging Face merged model, approximately 4.45 GB including tokenizer and configuration. No separate SFT adapter is required.
from huggingface_hub import snapshot_download
model_dir = snapshot_download("Styl4/shopping-agent-rl-sft-2b")
Use the Transformers revision pinned in the code repository; the saved architecture is Qwen3_5ForConditionalGeneration. The checkpoint was saved with Transformers 5.15.0.dev0. Example loading (not a newly executed evaluation):
import torch
from transformers import Qwen3_5ForConditionalGeneration, AutoTokenizer
model = Qwen3_5ForConditionalGeneration.from_pretrained(model_dir, dtype=torch.bfloat16)
tokenizer = AutoTokenizer.from_pretrained(model_dir)
Training
Cumulative curriculum manifests: A 256/28, B 799/88, C 1073/119 train/validation tasks. Historical C preprocessing produced 1069/118 usable samples. Action-only LoRA SFT used rank 16, alpha 32, BF16, and maximum sequence length 24,576; LoRA was merged after each stage.
Evaluation scope
Results use the fixed Final200 Clean task list, greedy decoding (temperature 0, top_p 1), explicit product-detail tools, and a 35-step limit. Strict Reward v3 success requires a completed purchase, valid reward, and no infrastructure-invalid outcome. These are Reward-panel results, not completed dual-LLM-Judge scores. RL evaluation also includes a search-serialization fix, so the 4 percentage-point difference is not an isolated RL effect.
Intended use
Research on Chinese shopping policy post-training and simulated tool use in ShopSimulator. Use the task prompts, tools, and execution harness from the code repository; these weights alone do not provide a shopping application. General chat, real purchases, and multimodal performance were not evaluated in this project.
Code and license
Code, environment setup, training configuration, and evaluation protocol: Styleofm3/shopping-agent-rl.
Derived from Qwen/Qwen3.5-2B, licensed under Apache-2.0. Model weights retain Apache-2.0; the project code uses MIT. See LICENSE in this model repository.
- Downloads last month
- 14