modelcitizens/modelcitizens
Viewer • Updated • 6.82k • 109 • 2
How to use modelcitizens/GEMMACITIZEN-12B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="modelcitizens/GEMMACITIZEN-12B") # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("modelcitizens/GEMMACITIZEN-12B", dtype="auto")How to use modelcitizens/GEMMACITIZEN-12B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "modelcitizens/GEMMACITIZEN-12B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "modelcitizens/GEMMACITIZEN-12B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/modelcitizens/GEMMACITIZEN-12B
How to use modelcitizens/GEMMACITIZEN-12B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "modelcitizens/GEMMACITIZEN-12B" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "modelcitizens/GEMMACITIZEN-12B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "modelcitizens/GEMMACITIZEN-12B" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "modelcitizens/GEMMACITIZEN-12B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use modelcitizens/GEMMACITIZEN-12B with Docker Model Runner:
docker model run hf.co/modelcitizens/GEMMACITIZEN-12B
GEMMACITIZEN-12B is a toxicity detection model finetuned from Gemma-3-12B-IT on ingroup annotations of ModelCitizens data. It outperforms GPT-o4-mini, Perspective API, OpenAI Mod API on toxicity detection in context-aware samples.
Repository: asuvarna31/modelcitizens
PROMPT = """
You will be provided with a statement and some context. Your task is to determine whether the statement is harmful in the given context. If no context is provided, it will be marked as "NA." In such cases, make your decision based solely on the statement. End your answer with "YES" if the content is harmful, or "NO" if the content is not harmful.
CONTEXT: {context}
STATEMENT: {statement}
REPLY: {reply}
"""
@misc{suvarna2025modelcitizensrepresentingcommunityvoicesonline,
title={ModelCitizens:Representing Community Voices in Online Safety},
author={Ashima Suvarna and Christina Chance and Karolina Naranjo and Hamid Palangi and Sophie Hao and Thomas Hartvigsen and Saadia Gabriel},
year={2025},
eprint={2507.05455},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2507.05455},
}