Instructions to use perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft") model = AutoModelForCausalLM.from_pretrained("perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M # Run inference directly in the terminal: llama cli -hf perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M # Run inference directly in the terminal: llama cli -hf perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M
Use Docker
docker model run hf.co/perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M
- SGLang
How to use perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft 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 "perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft" \ --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": "perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft", "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 "perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft" \ --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": "perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft with Ollama:
ollama run hf.co/perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft with Docker Model Runner:
docker model run hf.co/perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M
- Lemonade
How to use perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M
Run and chat with the model
lemonade run user.rcrc-chat-v5-gemma-1b-cpt-sft-Q4_K_M
List all available models
lemonade list
- Atomic Chat
rcrc-chat-v5-gemma-1b-cpt-sft — Closed-Book RCRC Chatbot
A 1B closed-book chatbot for the Royal Commission for Riyadh City (RCRC). Trained as Path B of the v5 comparison: continued pre-training on raw KB text, then chat SFT on Qwen3-235B-synthesized QA pairs.
Closed-book here means the model answers from baked-in knowledge — there is no retrieval at inference.
Pipeline
google/gemma-3-1b-pt
↓ CPT: 3 epochs on cleaned RCRC + Hanifa raw text
perfectPresentation/rcrc-gemma-1b-cpt
↓ SFT: 3 epochs on rcrc-qa-v5 (16,761 Qwen-synthesized QA pairs)
perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft ← this repo
Training data
perfectPresentation/rcrc-qa-v5:
16,426 train + 335 validation single-turn (system, user, assistant) pairs
synthesized by Qwen/Qwen3-235B-A22B-Instruct-2507 from the cleaned RCRC
website + Hanifa Urban Code chunks.
Training recipe
| Base | perfectPresentation/rcrc-gemma-1b-cpt |
| Epochs | 3 |
| LR | 2e-5, cosine, 5% warmup |
| Effective batch | 16 (per_device 4 × grad_accum 4) |
| Max seq length | 1024, packing enabled |
| Final eval loss | 0.71 |
| Final eval token-accuracy | 83.5% |
| Hardware | HF Jobs · 1× L4 (~1.6 h) |
Use
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
tok = AutoTokenizer.from_pretrained("perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft")
model = AutoModelForCausalLM.from_pretrained(
"perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft",
dtype=torch.bfloat16,
)
messages = [
{"role": "system", "content":
"أنت مساعد للهيئة الملكية لمدينة الرياض. تجيب على استفسارات المستخدمين "
"عن خدمات وبرامج ومشاريع وأنظمة الهيئة بدقة وأدب."},
{"role": "user", "content": "ما هو الكود العمراني لوادي حنيفة؟"},
]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(
**inputs, max_new_tokens=400, do_sample=True, temperature=0.5, top_p=0.9,
repetition_penalty=1.15, no_repeat_ngram_size=6,
)
print(tok.decode(out[0][inputs.input_ids.shape[-1]:], skip_special_tokens=True))
Honest evaluation: closed-book vs RAG
On a 50-question internal eval set (RCRC + Hanifa + edge cases), this
closed-book model was compared to a sibling RAG pipeline (the v3-rag
checkpoint reading retrieved chunks from rcrc-rag-index-v2):
| accuracy | relevance | clarity | wins | |
|---|---|---|---|---|
| RAG (v3-rag + index v2) | 3.92 | 4.08 | 4.42 | 34/50 |
| This model (closed-book) | 2.64 | 3.36 | 3.56 | 13/50 |
| Ties | 3/50 |
Where closed-book is competitive: dialect responses (Najdi/Hijazi), free-form opinion-style queries.
Where RAG dominates: factual specifics from the Hanifa Urban Code, project details, organizational facts, numerical specs.
For accuracy-sensitive deployments on the RCRC + Hanifa corpus, a RAG pipeline at the same parameter count outperforms this closed-book model by ~1.3 points on average. This model is provided for completeness of the v5 study and for offline / no-retrieval scenarios.
Limitations
- 1B-scale closed-book recall is brittle on specifics (numbers, exact procedure steps). Verify against rcrc.gov.sa.
- Training data was Qwen-synthesized; some questions may carry the synthesizer's biases.
- No multi-turn conversational SFT — single-turn QA only.
GGUF builds (llama.cpp / Ollama)
Quantized GGUF files live at the repo root.
| File | Quant | Approx size |
|---|---|---|
rcrc-v5-gemma-1b-cpt-sft-F16.gguf |
F16 | ~2.0 GB |
rcrc-v5-gemma-1b-cpt-sft-Q8_0.gguf |
Q8_0 | ~1.0 GB |
rcrc-v5-gemma-1b-cpt-sft-Q5_K_M.gguf |
Q5_K_M | ~720 MB |
rcrc-v5-gemma-1b-cpt-sft-Q4_K_M.gguf |
Q4_K_M | ~620 MB |
Ollama (one-liner)
ollama run huggingface.co/perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft:Q4_K_M
# or :Q8_0, :Q5_K_M, :F16
If you hit a host-redirect error (hf.co → huggingface.co), upgrade
Ollama to a recent version, or use the huggingface.co/... URL above.
Manual Modelfile route
hf download perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft rcrc-v5-gemma-1b-cpt-sft-Q4_K_M.gguf Modelfile --local-dir ./model
cd model
ollama create rcrc-v5-gemma-1b-cpt-sft -f Modelfile
ollama run rcrc-v5-gemma-1b-cpt-sft
llama.cpp
hf download perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft rcrc-v5-gemma-1b-cpt-sft-Q4_K_M.gguf --local-dir .
./llama-cli -m rcrc-v5-gemma-1b-cpt-sft-Q4_K_M.gguf -cnv
GGUF builds (llama.cpp / Ollama)
Quantized GGUF files live under gguf/. They are built directly from
the safetensors above with llama.cpp convert_hf_to_gguf.py followed by
llama-quantize.
| File | Quant | Approx size |
|---|---|---|
gguf/rcrc-v5-gemma-1b-cpt-sft-F16.gguf |
F16 | ~2.0 GB |
gguf/rcrc-v5-gemma-1b-cpt-sft-Q8_0.gguf |
Q8_0 | ~1.0 GB |
gguf/rcrc-v5-gemma-1b-cpt-sft-Q5_K_M.gguf |
Q5_K_M | ~720 MB |
gguf/rcrc-v5-gemma-1b-cpt-sft-Q4_K_M.gguf |
Q4_K_M | ~620 MB |
llama.cpp
hf download perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft gguf/rcrc-v5-gemma-1b-cpt-sft-Q4_K_M.gguf --local-dir .
./llama-cli -m gguf/rcrc-v5-gemma-1b-cpt-sft-Q4_K_M.gguf -cnv
Ollama
hf download perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft gguf/rcrc-v5-gemma-1b-cpt-sft-Q4_K_M.gguf gguf/Modelfile --local-dir ./model
cd model/gguf
ollama create rcrc-v5-gemma-1b-cpt-sft -f Modelfile
ollama run rcrc-v5-gemma-1b-cpt-sft
- Downloads last month
- 64
Model tree for perfectPresentation/rcrc-chat-v5-gemma-1b-cpt-sft
Base model
perfectPresentation/rcrc-gemma-1b-cpt