Instructions to use HOWILLMAKEIT/ShopMaster-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HOWILLMAKEIT/ShopMaster-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HOWILLMAKEIT/ShopMaster-4B") 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("HOWILLMAKEIT/ShopMaster-4B") model = AutoModelForMultimodalLM.from_pretrained("HOWILLMAKEIT/ShopMaster-4B", 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 HOWILLMAKEIT/ShopMaster-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HOWILLMAKEIT/ShopMaster-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HOWILLMAKEIT/ShopMaster-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HOWILLMAKEIT/ShopMaster-4B
- SGLang
How to use HOWILLMAKEIT/ShopMaster-4B 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 "HOWILLMAKEIT/ShopMaster-4B" \ --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": "HOWILLMAKEIT/ShopMaster-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "HOWILLMAKEIT/ShopMaster-4B" \ --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": "HOWILLMAKEIT/ShopMaster-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HOWILLMAKEIT/ShopMaster-4B with Docker Model Runner:
docker model run hf.co/HOWILLMAKEIT/ShopMaster-4B
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM
processor = AutoProcessor.from_pretrained("HOWILLMAKEIT/ShopMaster-4B")
model = AutoModelForMultimodalLM.from_pretrained("HOWILLMAKEIT/ShopMaster-4B", 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]:]))ShopMaster-4B
็จ 300 ๅ ่ฎฉ 4B ๅฐๆจกๅๅจไธญๆ็ตๅๅคๆญฅ่ดญ็ฉไปปๅกไธ่ถ ่ถ DeepSeek-V4.1-Flash-1017 ๆดๅฐ็ Token๏ฝๆดๅฐ็ Step๏ฝๆด้ซ็ๆๅ็
- GitHub ไปๅบ: HOWILLMAKEIT/ShopMaster-4B
- ไบคไบๅผ้กน็ฎไธป้กต: https://howillmakeit.github.io/ShopMaster-4B/
- ้ ๅฅ SFT ๆจกๅ: HOWILLMAKEIT/ShopMaster-4B-SFT
- ๅบๅบงๆจกๅ: Qwen/Qwen3.5-4B
ๆจกๅ็ฎไป
ShopMaster-4B ๆฏๅบไบ Qwen/Qwen3.5-4B ็ไธญๆๅคๆญฅ็ตๅ่ดญ็ฉ Agent ๅ่ฎญ็ปๆ็ปๆจกๅ๏ผๅฎๆด BF16 ๅคๆจกๆๅฃณๆ้๏ผๅทฒๅๅนถ LoRA๏ผๅผ็ฎฑๅณ็จ๏ผ๏ผ
- Action-Only SFT๏ผไป
DeepSeek-V4.1-Flash-1017้้ๅนถ็ป็ฏๅข้่ฝฎๅๆพ 0 ่ฏฏๅทฎๆ ธ้ช็ 1,015 ๆกๆๅ่ฝจ่ฟนไธญๆ้ฟๅบฆๅๅฑๆฝๆ ท 388 ๆก๏ผๅ ณ้ญๆ็ปด้พใไป ็็ฃ<tool_call>ๅจไฝๆฎต่ฎญ็ป 2 epoch๏ผ่ฏฆ่ง ShopMaster-4B-SFT๏ผใ - 100 ๆญฅ GiGPO + DAPO ๅผบๅๅญฆไน ๏ผๅจ
veRL v1ไธไปฅ 24K ไธไธๆ็ปง็ปญ่ฎญ็ป 100 ๆญฅ๏ผๅผๅ ฅๅบไบ็ฏๅขๅ ฌๅผ้กต้ข็ถๆ็ๆ ๆๆฃๆญฅ็บง้็นไผๅฟ๏ผGiGPO๏ผไธ DAPO ้ฃๆ ผ็จณๅฎๆดๆฐ๏ผtoken-meanใclip_ratio_high=0.28ใๅจๆๆด็ป่ฟๆปค๏ผ๏ผไป ๅจ่ฏญ่จ้ชจๅนฒ 248 ไธช็บฟๆงๅฑๆดๆฐ rank-16 LoRA๏ผๆ็ปๆ FP32 ็ฒพๅบฆๅๅนถๅ BF16 ๅ็ๅคๆจกๆๅ็ใ
่ง่งๅกๆ้ๅๆ ทไฟ็ๆชๅพฎ่ฐ๏ผ็ฎๅฝ็ปๆไธ
Qwen/Qwen3.5-4Bๅฎๅ จไธ่ด๏ผๅนถๅทฒ่กฅ้ฝgeneration_config.json๏ผeos_token_id: [248044, 248046]๏ผใ
Holdout-915 ๅป็ป็ๅบ้่ฏๆต็ปๆ
ๅจๅฎๅ
จๅป็ป็ 915 ้ข็ๅบๆต่ฏ้ eval_holdout_915.jsonl ไธ๏ผpaper_strict ๅ้กนไน็งฏๅฃๅพ๏ผT=0.0๏ผ32K ไธไธๆ๏ผ๏ผ
| ๆจกๅ | ๆๆ้ข | ไธฅๆ ผๆๅ็ | ๅๅ | ่ดญไนฐ็ | ไธๅ็ฒพๅๅบฆ | repeat_loop |
invalid_tool |
้ขๅๆญฅๆฐ | ้ขๅ็ๆ Token |
|---|---|---|---|---|---|---|---|---|---|
Qwen3.5-4B (Base, ๅ
ณๆ่) |
906/915 | 35.10% (318) | 0.382 | 74.83% | 46.90% | 19 (2.1%) | 182 (19.9%) | 4.5 | 311 |
DeepSeek-V4.1-Flash-1017 (Zero-shot) |
915/915 | 48.31% (442) | 0.509 | 64.92% | 74.41% | 34 (3.7%) | 242 (26.4%) | 9.5 | 1,367 |
| ShopMaster-4B-SFT (ep2) | 905/915 | 58.34% (528) | 0.607 | 84.75% | 68.84% | 124 (13.6%) | 10 (1.1%) | 8.2 | 267 |
Vanilla GRPO (Step 100) |
907/915 | 58.54% (531) | 0.609 | 86.66% | 67.56% | 107 (11.7%) | 10 (1.1%) | 7.3 | 240 |
| ShopMaster-4B (GiGPO + DAPO, Ours) | 911/915 | 65.75% (599) | 0.675 | 91.11% | 72.17% | 63 (6.9%) | 7 (0.8%) | 6.7 | 226 |
ๅ้ข้
ๅฏน็ฒพ็กฎๅไพง McNemar ๆฃ้ช๏ผ็ธๅฏน SFT **+7.41 pp**๏ผp = 7.28e-8๏ผ๏ผ็ธๅฏน Vanilla GRPO **+7.17 pp**๏ผp = 4.10e-8๏ผ๏ผ็ซฏๅฐ็ซฏๅ่ถ
Teacher **+17.34 pp**๏ผp = 3.89e-20๏ผใ
ๅฟซ้ไฝฟ็จ๏ผๆจ่ๅ
ณ้ญๆ่ enable_thinking=False๏ผ
SGLang ๅฏๅจๆๅก๏ผ16GB ๆถ่ดน็บงๆพๅกๅณๅฏ่ฟ่ก 32K๏ผ
python -m sglang.launch_server \
--model-path HOWILLMAKEIT/ShopMaster-4B \
--host 127.0.0.1 --port 8000 \
--context-length 32768 \
--tool-call-parser qwen3_coder
Transformers ๆจ็็คบไพ
from transformers import AutoTokenizer, AutoModelForImageTextToText
import torch
model_id = "HOWILLMAKEIT/ShopMaster-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id, torch_dtype=torch.bfloat16, device_map="auto"
)
messages = [
{"role": "system", "content": "ไฝ ๆฏไธไธชไธญๆ็ตๅๅคๆญฅ่ดญ็ฉๅฉๆใ"},
{"role": "user", "content": "ๅธฎๆๆพไธๆฌพไปทๆ ผไธ่ถ
่ฟ 200 ๅ
็้ป่ฒๆ ็บฟ่็่ณๆบใ"},
]
text = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tokenizer.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=False))
่ฎธๅฏไธ่ด่ฐข
ๆ้้ตๅพชๅบๅบงๆจกๅ Qwen/Qwen3.5-4B ็ Apache-2.0 ่ฎธๅฏ่ฏใ่ฎญ็ปไธ่ฏๆต็ฏๅขๅบไบ ShopSimulator (ACL 2026) ไธ veRLใ
- Downloads last month
- 9
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HOWILLMAKEIT/ShopMaster-4B") 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)