Instructions to use planeB/user_gemma_3_27b_it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use planeB/user_gemma_3_27b_it with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="planeB/user_gemma_3_27b_it") 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("planeB/user_gemma_3_27b_it") model = AutoModelForMultimodalLM.from_pretrained("planeB/user_gemma_3_27b_it", 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 planeB/user_gemma_3_27b_it with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "planeB/user_gemma_3_27b_it" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "planeB/user_gemma_3_27b_it", "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/planeB/user_gemma_3_27b_it
- SGLang
How to use planeB/user_gemma_3_27b_it 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 "planeB/user_gemma_3_27b_it" \ --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": "planeB/user_gemma_3_27b_it", "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 "planeB/user_gemma_3_27b_it" \ --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": "planeB/user_gemma_3_27b_it", "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 planeB/user_gemma_3_27b_it with Docker Model Runner:
docker model run hf.co/planeB/user_gemma_3_27b_it
user_gemma_3_27b_it
A user simulator for evaluating agentic conversational recommender systems.
SFT fine-tune of google/gemma-3-27b-it on the teacher–student corpus described in
Simulating Diverse User Behavioral Stereotypes for Evaluating Agentic Conversational
Recommenders (RecSys '26).
Given a behavioral stereotype, a user's interaction history, and a target item, the model generates the user turns of a dialogue with a recommender system. It exists to evaluate recommenders against simulated users who express vague or evolving preferences, rather than perfectly specified queries.
Behavioral stereotypes
| Prompt label | Paper label | Behavior |
|---|---|---|
SPECIFIC |
Direct | states explicit constraints from the first turn |
VAGUE |
Vague-Reactive | stays vague, reacts without adding constraints |
VAGUE_TO_SPECIFIC |
Vague-Proactive | starts vague, then learns to supply explicit filters |
Prompt format
The model was trained on a single format and needs it to behave as intended:
<bos><start_of_turn>user
You are an advanced user simulator. Your objective is to generate realistic and coherent user responses in a dialogue with a recommendation system based on the user persona, interaction history and target item provided.
[...]
# Category
Electronics
# User Persona
VAGUE_TO_SPECIFIC
# Interaction history
## Item Name: ...
## Description: ...
## Visual Description: ...
## Review: ...
# Target item
## Item Name: ...
## Description: ...
## Visual Description: ...
## Review: ...
Generate the first user message based on the above information.<end_of_turn>
<start_of_turn>model
Product images enter only as the textual ## Visual Description: the simulator does not
consume pixels.
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("planeB/user_gemma_3_27b_it")
model = AutoModelForCausalLM.from_pretrained("planeB/user_gemma_3_27b_it", device_map="auto")
prompt = build_prompt(category, persona, history, target) # in the format above
out = model.generate(**tok(prompt, return_tensors="pt").to(model.device),
max_new_tokens=128)
print(tok.decode(out[0][len(tok(prompt).input_ids):], skip_special_tokens=True))
Fully materialized prompts, identical to the training ones, are in the
corpus_sft_simulator config of swap-uniba/ecommerce-user-sim.
Training data
A teacher–student corpus of 10,644 dialogues across 10 Amazon domains, yielding
50,495 SFT examples. The released checkpoints were trained on exactly this corpus,
published as the corpus_sft_simulator config. Data, evaluation protocol, and pipeline:
swap-uniba/ecommerce-user-sim.
Code: https://github.com/swapUniba/Simulating-Diverse-User-Behavioral-Stereotypes
- LoRA: rank 64, alpha 32, dropout 0.1, 4 target modules
Framework versions
TRL 0.24.0 · Transformers 4.57.1 · PyTorch 2.9.0 · Datasets 4.2.0 · Tokenizers 0.22.1
Other checkpoints
| Model | Repository |
|---|---|
| Gemma-3 270M | planeB/user_gemma_3_270m_it |
| Gemma-3 1B | planeB/user_gemma_3_1b_it |
| Gemma-3 4B | planeB/user_gemma_3_4b_it |
| Gemma-3 12B | planeB/user_gemma_3_12b_it |
| Gemma-3 27B | planeB/user_gemma_3_27b_it |
License
Weights derive from Gemma-3 and are subject to the Gemma license terms. The training data is released separately under CC BY-NC 4.0.
Citation
@inproceedings{PetruzzelliMartinaSimulating,
author = {Petruzzelli, Alessandro and Martina, Alessandro Francesco Maria and Musto, Cataldo and de Gemmis, Marco and Lops, Pasquale and Semeraro, Giovanni},
editor = {Konstan, Joseph A. and Karypis, George and Adomavicius, Gediminas and Chen, Minmin and Goethals, Bart and Willemsen, Martijn C.},
title = {{Simulating Diverse User Behavioral Stereotypes for Evaluating Agentic Conversational Recommenders}},
booktitle = {Proceedings of the 20th {ACM} Conference on Recommender Systems, RecSys 2026, Minneapolis, Minnesota, USA, September 28-October 2, 2026},
publisher = {{ACM}},
year = {2026},
doi = {10.1145/3773078.3831840},
url = {https://doi.org/10.1145/3773078.3831840}
}
The simulator is also used in:
@article{BeyondLookup,
author = {Petruzzelli, Alessandro and Martina, Alessandro Francesco Maria and Musto, Cataldo and de Gemmis, Marco and Lops, Pasquale and Semeraro, Giovanni},
journal = {Information Systems Frontiers},
title = {Beyond the Lookup: Simulating Realistic User Uncertainty for the Evaluation of Conversational Agentic Recommenders},
year = {2026},
url = {https://doi.org/10.1007/s10796-026-10787-3}
}
- Downloads last month
- 27