Instructions to use xianyao/persim-gemma-12b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xianyao/persim-gemma-12b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="xianyao/persim-gemma-12b") 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("xianyao/persim-gemma-12b") model = AutoModelForMultimodalLM.from_pretrained("xianyao/persim-gemma-12b", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use xianyao/persim-gemma-12b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xianyao/persim-gemma-12b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xianyao/persim-gemma-12b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/xianyao/persim-gemma-12b
- SGLang
How to use xianyao/persim-gemma-12b 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 "xianyao/persim-gemma-12b" \ --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": "xianyao/persim-gemma-12b", "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 "xianyao/persim-gemma-12b" \ --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": "xianyao/persim-gemma-12b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use xianyao/persim-gemma-12b with Docker Model Runner:
docker model run hf.co/xianyao/persim-gemma-12b
persim-gemma-12b
An open-weight Big-Five personality → household layout generator for the PerSim pipeline (arXiv:2607.00022, IROS 2026). Given the pipeline's generate_layouts.py prompt (scene + persona + item vocabulary), it produces personality-conditioned placements as strict JSON:
{
"room_movable_items": {"kitchen_0": ["mug_0", "plate_0", ...], ...},
"initial_object_positions": {"mug_0": {"relation": "on", "anchor_object": "countertop_tpuwys_0"}, ...}
}
The pipeline works with any OpenAI-compatible endpoint; this model is a ready-made open option for the layout stage (the paper's fine-tuned Gemini 2.5 Flash cannot be redistributed). Outputs inherit only the pipeline's automatic checks — no plausibility or paper-equivalence claims.
Training
QLoRA (r=16) on google/gemma-4-12B-it, 2 epochs on one RTX 4090. Data: persim-sft human placement anchors (rigidity dropped) + layout demonstrations self-generated by the base model on the real pipeline prompts and filtered through check_layouts.py. No proprietary-model outputs in the supervision.
Usage
vllm serve xianyao/persim-gemma-12b \
--max-model-len 16384 \
--override-generation-config '{"repetition_penalty": 1.05}'
python generate_persona.py --model google/gemma-4-12B-it # base model
python generate_layouts.py --model xianyao/persim-gemma-12b # this model
python generate_trajectories.py --model google/gemma-4-12B-it # base model
Also answers the standalone anchor query (Personality: O=..., C=...\nObject: mug → {"rooms": [...], "cooccurrence": [...]}).
Limitations
- The largest shipped scene (
house_single_floor, 120–240 items) is unreliable: generation can run away into numbered duplicates until the token limit.repetition_penalty=1.05plus the pipeline's retries partially compensate. Smaller scenes are stable. - Trained on the pipeline's five scenes and item vocabulary; new scenes are untested.
- Layout plausibility is not validated — format and containment checks only.
Citation
@article{li2026personalize,
title = {When to Personalize Household Object Search: A Rigidity-Gated Hybrid Policy},
author = {Li, Xianyao and Wang, Yuhai and Xiao, Hu and Smith, Kaleb and Ye, Gilbert Yang and Du, Eric Jing},
journal = {arXiv preprint arXiv:2607.00022},
year = {2026}
}
Derived from Gemma. Gemma is provided by Google; use is subject to the base model's license and terms.
- Downloads last month
- 1,323