Instructions to use flintglass/PrismAgent-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flintglass/PrismAgent-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flintglass/PrismAgent-4B") 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("flintglass/PrismAgent-4B") model = AutoModelForMultimodalLM.from_pretrained("flintglass/PrismAgent-4B", 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 flintglass/PrismAgent-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flintglass/PrismAgent-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flintglass/PrismAgent-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/flintglass/PrismAgent-4B
- SGLang
How to use flintglass/PrismAgent-4B 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 "flintglass/PrismAgent-4B" \ --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": "flintglass/PrismAgent-4B", "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 "flintglass/PrismAgent-4B" \ --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": "flintglass/PrismAgent-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use flintglass/PrismAgent-4B with Docker Model Runner:
docker model run hf.co/flintglass/PrismAgent-4B
Flintglass PrismAgent-4B
Flintglass PrismAgent-4B is an ultra-compact, Apache-2.0 4B local agentic specialist built on Qwen/Qwen3.5-4B via Pure On-Policy 4-Verifier GRPO (PPO-Clipped RLVR) β trained with zero LLM-as-a-judge and zero off-policy distillation, using only deterministic execution verifiers (BFCL AST/arg & abstention, jsonschema, live in-memory SQLite execution, and isolated Python unit tests).
PrismAgent-4B improves EVERY SINGLE ONE of our 5 held-out execution benchmarks simultaneously with zero regression, raising overall 5-benchmark accuracy by +2.35 pts (76.47% -> 78.82%), BFCL Live Macro by +4.75 pts (70.11% -> 74.86%, including +18.75 pts on parallel tool calling 68.75% -> 87.50%), and strict JSONSchema compliance by +8.20 pts (85.20% -> 93.40%), while cutting output verbosity by 23%β37% β all in a model that runs locally in ~2.7 GB VRAM (Q4_K_M)!
- GGUF Quantizations (llama.cpp / Ollama / LM Studio β ~2.7 GB
Q4_K_M):flintglass/PrismAgent-4B-GGUF - Standalone PEFT LoRA Adapter: Included directly in this repository under
lora/(rank=64, attn+MLP). - Zero-Leakage RLVR Dataset:
flintglass/PrismAgent-RLVR-Dataset(39,706tasks). - Larger Siblings:
Inkling-2-Mini-PrismAgent(84.59%, #1) Β·PrismAgent-27B(84.37%) Β·PrismAgent-35B-A3B(83.72%) Β·PrismAgent-9B(81.70%) Β·PrismAgent-8B(80.11%)
Zero-Leakage 5-Benchmark Execution Evaluation (4,775 Held-Out Tasks)
All models evaluated identically with deterministic greedy decoding (temperature=0, enable_thinking=False):
| Model (All Apache 2.0) | Avg 5-Bench | BFCL Live (Overall / Macro) | JSONSchema (1,000) | SQLite Exec (1,000) | HumanEval+ (164) | MBPP+ (378) |
|---|---|---|---|---|---|---|
Qwen/Qwen3.5-4B (Base) |
76.47% | 72.15% / 70.11% | 85.20% | 78.80% | 77.44% | 68.78% |
PrismAgent-4B (GRPO step 25) |
78.85% | 72.77% / 71.79% | 93.10% | 79.60% | 76.83% | 71.96% |
flintglass/PrismAgent-4B (Final) |
78.82% | 73.49% / 74.86% | 93.40% | 79.60% | 78.05% | 69.58% |
Gain vs. Base Qwen3.5-4B |
+2.35 pts | +1.34 / +4.75 pts | +8.20 pts | +0.80 pts | +0.61 pts | +0.80 pts |
BFCL Live Category Breakdown (2,233 Tasks)
| Model | live_simple |
live_multiple |
live_parallel |
live_parallel_multiple |
live_irrelevance |
BFCL Macro Avg |
|---|---|---|---|---|---|---|
Qwen/Qwen3.5-4B (Base) |
68.99% | 68.47% | 68.75% | 66.67% | 77.66% | 70.11% |
flintglass/PrismAgent-4B |
71.71% | 68.38% | 87.50% | 66.67% | 80.05% | 74.86% |
Quickstart (transformers)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "flintglass/PrismAgent-4B"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
tools = [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}},
"required": ["city"],
},
},
}]
messages = [{"role": "user", "content": "What is the weather in Tokyo in celsius?"}]
prompt = tok.apply_chat_template(messages, tools=tools, tokenize=False, add_generation_prompt=True, enable_thinking=False)
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tok.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
License
Apache 2.0. Built by Flintglass Labs.
- Downloads last month
- 311