Text Generation
Transformers
Safetensors
Chinese
English
gemma3_text
prism
fact-checking
verification
gemma3
lora
chinese
conversational
text-generation-inference
Instructions to use liiiiiwww/prism-verifier-gemma3-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use liiiiiwww/prism-verifier-gemma3-1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="liiiiiwww/prism-verifier-gemma3-1b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("liiiiiwww/prism-verifier-gemma3-1b") model = AutoModelForCausalLM.from_pretrained("liiiiiwww/prism-verifier-gemma3-1b") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use liiiiiwww/prism-verifier-gemma3-1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "liiiiiwww/prism-verifier-gemma3-1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "liiiiiwww/prism-verifier-gemma3-1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/liiiiiwww/prism-verifier-gemma3-1b
- SGLang
How to use liiiiiwww/prism-verifier-gemma3-1b 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 "liiiiiwww/prism-verifier-gemma3-1b" \ --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": "liiiiiwww/prism-verifier-gemma3-1b", "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 "liiiiiwww/prism-verifier-gemma3-1b" \ --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": "liiiiiwww/prism-verifier-gemma3-1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use liiiiiwww/prism-verifier-gemma3-1b with Docker Model Runner:
docker model run hf.co/liiiiiwww/prism-verifier-gemma3-1b
PRISM Verifier (Gemma-3 1B)
基于 Gemma-3-1B 微调的事实核查模型,用于验证 AI 生成内容中的声明真实性。
使用方法
from transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("liiiiiwww/prism-verifier-gemma3-1b")
tokenizer = AutoTokenizer.from_pretrained("liiiiiwww/prism-verifier-gemma3-1b")
prompt = "<start_of_turn>user\n你是一个事实核查助手。请判断以下声明的真假。\n只输出 JSON,格式: {\"status\": \"verified\"/\"refuted\"/\"uncertain\", \"reason\": \"...\"}\n\n声明: 地球是太阳系第三颗行星\n<end_of_turn>\n<start_of_turn>model\n"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
模型信息
- 基础模型: google/gemma-3-1b-it
- 任务: 事实核查 / Fact Verification
- 语言: 中文 + 英文
- 训练数据: PRISM 知识库 (数学/科学/医学/法律/编程)
- model_type: gemma3_text
- architectures: ['Gemma3ForCausalLM']
- Downloads last month
- 78