Instructions to use flintglass/GPT-OSS-20B-PrismCode with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flintglass/GPT-OSS-20B-PrismCode with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flintglass/GPT-OSS-20B-PrismCode") 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("flintglass/GPT-OSS-20B-PrismCode") model = AutoModelForCausalLM.from_pretrained("flintglass/GPT-OSS-20B-PrismCode", 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
- vLLM
How to use flintglass/GPT-OSS-20B-PrismCode with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flintglass/GPT-OSS-20B-PrismCode" # 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/GPT-OSS-20B-PrismCode", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/flintglass/GPT-OSS-20B-PrismCode
- SGLang
How to use flintglass/GPT-OSS-20B-PrismCode 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/GPT-OSS-20B-PrismCode" \ --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/GPT-OSS-20B-PrismCode", "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/GPT-OSS-20B-PrismCode" \ --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/GPT-OSS-20B-PrismCode", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use flintglass/GPT-OSS-20B-PrismCode with Docker Model Runner:
docker model run hf.co/flintglass/GPT-OSS-20B-PrismCode
Flintglass GPT-OSS-20B-PrismCode
Pure On-Policy Execution-Verified Python Coding RLVR on Apache-2.0 openai/gpt-oss-20b (21B Total / 3.6B Active MoE) — achieving 83.06% EvalPlus Strict Macro Average (+1.29 pts), 81.18% EvalPlus Strict Micro Average (+2.03 pts, +11 net strict tasks solved!), 78.31% MBPP+ (+3.18 pts, +12 strict tasks!), 87.80% HumanEval+, and -15% fewer output tokens with zero synthetic SFT and zero proprietary distillation.
Completes the Flintglass GPT-OSS-20B Prism Trifecta:
GPT-OSS-20B-PrismAgent·GPT-OSS-20B-PrismSQL·GPT-OSS-20B-PrismCode· GGUF Quantizations:flintglass/GPT-OSS-20B-PrismCode-GGUF(Q4_K_M,Q5_K_M)
Verified Zero-Leakage EvalPlus Strict Results (542 Tasks)
Evaluated identically with greedy decoding (temperature=0.0, reasoning_effort="low", Harmony stop <|return|>) against the full EvalPlus strict unit-test suites (80× harder edge-case coverage than standard HumanEval/MBPP):
| Benchmark | Tasks | openai/gpt-oss-20b (Base) |
flintglass/GPT-OSS-20B-PrismCode |
Delta | Avg Tokens (Base -> PrismCode) |
|---|---|---|---|---|---|
| HumanEval+ (EvalPlus Strict) | 164 | 88.41% (145/164) | 87.80% (144/164) | -0.61 pts | 331.8 -> 318.3 (-4%) |
| MBPP+ (EvalPlus Strict) | 378 | 75.13% (284/378) | 78.31% (296/378) | +3.18 pts | 284.2 -> 242.4 (-15%) |
| EvalPlus Macro Average | 542 | 81.77% | 83.06% | +1.29 pts | — |
| EvalPlus Micro Average | 542 | 79.15% (429/542) | 81.18% (440/542) | +2.03 pts | — |
Quickstart (transformers)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "flintglass/GPT-OSS-20B-PrismCode"
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 `longest_palindromic_substring(s: str) -> str` in O(n^2) time and O(1) space."}]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, reasoning_effort="low")
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=False))
Training & Provenance
- Base Model:
openai/gpt-oss-20b(Apache-2.0, 21B total / 3.6B active MoE, dequantized cleanly from MXFP4 to native BF16 with all 336/336 LoRA tensors merged). - Algorithm: Pure On-Policy PPO-Clipped GRPO (
r=32,alpha=32, 40 steps,K=8rollouts/prompt, isolated subprocess unit-test execution reward with zero token-shortening bias). - License: Apache-2.0
- Downloads last month
- 216