Text Generation
Transformers
Safetensors
English
qwen3_5
image-text-to-text
qwen
qwen3
uncensored
refusal-removal
awq
4-bit precision
reasoning
vllm
sglang
conversational
compressed-tensors
Run this model with HF Jobs
Run KC-Informatics/Raven-27B-AWQ on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/KC-Informatics/Raven-27B-AWQ. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/KC-Informatics/Raven-27B-AWQ on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/KC-Informatics/Raven-27B-AWQ. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use KC-Informatics/Raven-27B-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KC-Informatics/Raven-27B-AWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KC-Informatics/Raven-27B-AWQ") 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("KC-Informatics/Raven-27B-AWQ") model = AutoModelForMultimodalLM.from_pretrained("KC-Informatics/Raven-27B-AWQ", 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 KC-Informatics/Raven-27B-AWQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KC-Informatics/Raven-27B-AWQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KC-Informatics/Raven-27B-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KC-Informatics/Raven-27B-AWQ
- SGLang
How to use KC-Informatics/Raven-27B-AWQ 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 "KC-Informatics/Raven-27B-AWQ" \ --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": "KC-Informatics/Raven-27B-AWQ", "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 "KC-Informatics/Raven-27B-AWQ" \ --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": "KC-Informatics/Raven-27B-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KC-Informatics/Raven-27B-AWQ with Docker Model Runner:
docker model run hf.co/KC-Informatics/Raven-27B-AWQ
Add README.md for Raven-27B-AWQ release
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768---
license: apache-2.0
base_model:
- Qwen/Qwen3.8-27B
- KC-Informatics/Raven-27B
tags:
- qwen
- qwen3
- uncensored
- refusal-removal
- awq
- 4-bit
- reasoning
- vllm
- sglang
language:
- en
pipeline_tag: text-generation
library_name: transformers
---

# Raven-27B-AWQ
Our flagship practical 27B release: `Qwen/Qwen3.8-27B` with **Null-Space Refusal Surgery (`NS-UNREFUSE-v2`)** followed by **GDN-protected 4-bit `AWQ_W4A16`** quantization.
At **18.21 GiB** on disk (**21.19 GiB** loaded with the Kapitsa DFlash2 draft model), it is statistically **lossless vs the 30.9 GB FP8 build** (McNemar `p = 1.000`, `145/180` vs `146/180`) while running up to **220 tok/s** on code and **1,008 tok/s** across 8 concurrent streams.
## What was changed
1. **Null-Space Refusal Surgery (`NS-UNREFUSE-v2`):** Applied on full BF16 weights across layers 24-58 (68 output projections), removing rank-2 policy refusal directions orthogonalized against epistemic uncertainty (`gamma_ep = 0.50`) and damped along the clean prompt manifold (`gamma_clean = 0.10`), with row-wise L2 norm preservation. Vision/audio weights untouched.
2. **GDN-Protected 4-Bit `AWQ_W4A16`:** True `AWQModifier(W4A16_ASYM)` calibrated on 128 samples (1,024 tokens) directly from the edited BF16 weights. Hybrid Gated DeltaNet recurrent projections (`in_proj_a`, `in_proj_b`, `dt_proj`) and non-group-divisible layers are kept in full precision so speculative decoding and long-chain reasoning stay rock-solid.
3. **Ships with `nudge.py`:** Zero-dependency forced-closure wrapper so hard prompts always finish with a clean answer.
## Verified results (`AA-PUBLIC-180`, strictly `N=1`, `0` errors)
| Metric | Qwen 3.8 27B FP8 (Base) | Raven-27B (FP8) | **Raven-27B-AWQ (4-bit)** |
|---|---:|---:|---:|
| 180-question public suite (`N=1`) | 124 / 180 (68.89%) | 146 / 180 (79.79%) | **145 / 180 (78.96%)** |
| Paired McNemar test vs Raven FP8 | - | baseline | **p = 1.000** (lossless) |
| FAST-24 sanity suite | - | - | **24 / 24 (100%)** |
| Refused requests answered (JBB 12-item probe) | 2 / 12 | - | **8 / 12 (66.7%)** |
| Unanswerable trick questions passed | 8 / 8 | 8 / 8 | **8 / 8 (100%)** |
| Disk size | 30.9 GB | 30.9 GB | **18.21 GiB** |
| Loaded VRAM w/ Kapitsa DFlash2 (`k=8`) | ~35 GB | ~35 GB | **21.19 GiB** (fits 24-40 GB GPUs) |
| Single-stream decode w/ DFlash2 (RTX PRO 6000) | 92 tok/s (143 code) | - | **141 tok/s** (**220 tok/s** code) |
| 8-stream concurrent decode w/ DFlash2 | 927 tok/s | - | **1,008 tok/s** |
*Public self-run benchmark (60 GPQA Diamond, 30 AIME 2026, 40 LiveCodeBench v6, 30 IFEval, 20 AA-LCR), graded deterministically at `N=1`.*
## How to run it
```bash
# 1. Serve Raven-27B-AWQ with Kapitsa DFlash2 (vLLM 0.34+ or SGLang)
vllm serve KC-Informatics/Raven-27B-AWQ --port 8000 \
--trust-remote-code --gpu-memory-utilization 0.90 --max-model-len 131072 \
--reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coder \
--speculative-config '{"model": "nace-ai/Qwen3.8-27B-DFlash2-Kapitsa", "method": "dflash", "num_speculative_tokens": 8}'
# 2. Optional forced-closure proxy (included in repo)
huggingface-cli download KC-Informatics/Raven-27B-AWQ nudge.py --local-dir .
python nudge.py --upstream http://127.0.0.1:8000 --port 8001
```
## Licence and credit
Apache 2.0, matching `Qwen/Qwen3.8-27B` by the Qwen Team. Kapitsa DFlash2 draft model by nace-ai. `nudge.py` is Apache 2.0 by KC Informatics.README.mdAdded+68