Text Generation
Transformers
Safetensors
English
qwen3_5
image-text-to-text
flintglass
prismcode
qwen3
coding
python
evalplus
rlvr
grpo
apache-2.0
conversational
Instructions to use flintglass/PrismCode-27B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flintglass/PrismCode-27B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flintglass/PrismCode-27B") 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/PrismCode-27B") model = AutoModelForMultimodalLM.from_pretrained("flintglass/PrismCode-27B", 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/PrismCode-27B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flintglass/PrismCode-27B" # 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/PrismCode-27B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/flintglass/PrismCode-27B
- SGLang
How to use flintglass/PrismCode-27B 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/PrismCode-27B" \ --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/PrismCode-27B", "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/PrismCode-27B" \ --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/PrismCode-27B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use flintglass/PrismCode-27B with Docker Model Runner:
docker model run hf.co/flintglass/PrismCode-27B
File size: 3,149 Bytes
ea26b25 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | ---
language:
- en
license: apache-2.0
library_name: transformers
pipeline_tag: text-generation
base_model: Qwen/Qwen3.8-27B
tags:
- flintglass
- prismcode
- qwen3
- coding
- python
- evalplus
- rlvr
- grpo
- apache-2.0
---
# Flintglass PrismCode-27B
**Flagship 27B Pure On-Policy Execution-Verified Python Coding RLVR Specialist on Apache-2.0 `Qwen/Qwen3.8-27B`** — achieving **#1 Overall EvalPlus Strict Score in the Flintglass Stack**: **`89.63%` HumanEval+ (+1.22 pts)**, **`79.89%` MBPP+ (+1.32 pts, `-28%` tokens)**, **`84.76%` EvalPlus Strict Macro Average (+1.27 pts)**, and **`82.84%` Micro Average (`449/542` strict EvalPlus tasks solved!)** with **zero synthetic SFT** and **zero proprietary distillation**.
> **Completes the Flagship Flintglass 27B Quartet:** [`PrismAgent-27B`](https://huggingface.co/flintglass/PrismAgent-27B) · [`PrismVerify-27B`](https://huggingface.co/flintglass/PrismVerify-27B) · [`PrismSQL-27B`](https://huggingface.co/flintglass/PrismSQL-27B) · [`PrismCode-27B`](https://huggingface.co/flintglass/PrismCode-27B) · **GGUF Quantizations:** [`flintglass/PrismCode-27B-GGUF`](https://huggingface.co/flintglass/PrismCode-27B-GGUF) (`Q4_K_M`, `Q5_K_M`, `Q6_K`)
---
## Verified Zero-Leakage EvalPlus Strict Results (542 Tasks)
Evaluated identically with greedy decoding (`temperature=0.0`, `enable_thinking=False`) against the full **EvalPlus** strict test suites (80× harder edge-case unit tests than standard HumanEval/MBPP):
| Benchmark | Tasks | `Qwen/Qwen3.8-27B` (Base) | **`flintglass/PrismCode-27B`** | Delta | Avg Tokens (Base -> PrismCode) |
|---|---:|---:|---:|---:|---:|
| **HumanEval+ (EvalPlus Strict)** | 164 | 88.41% (145/164) | **89.63% (147/164)** | **+1.22 pts** | 272.1 -> **247.9 (-9%)** |
| **MBPP+ (EvalPlus Strict)** | 378 | 78.57% (297/378) | **79.89% (302/378)** | **+1.32 pts** | 154.2 -> **111.6 (-28%)** |
| **EvalPlus Macro Average** | **542** | **83.49%** | **84.76%** | **+1.27 pts** | — |
| **EvalPlus Micro Average** | **542** | **81.55% (442/542)** | **82.84% (449/542)** | **+1.29 pts** | — |
---
## Quickstart (`transformers`)
```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "flintglass/PrismCode-27B"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto")
messages = [{"role": "user", "content": "Write a Python function `merge_intervals(intervals)` that merges overlapping [start, end] intervals in O(n log n) time."}]
prompt = tok.apply_chat_template(messages, 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=512, do_sample=False)
print(tok.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
```
## Training & Provenance
- **Base Model:** `Qwen/Qwen3.8-27B` (Apache-2.0)
- **Algorithm:** Pure On-Policy PPO-Clipped GRPO (`r=32`, 20 steps, `K=8` rollouts/prompt, isolated subprocess unit-test execution reward with zero token-shortening penalty).
- **License:** Apache-2.0
|