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
File size: 5,351 Bytes
1f6bf52 4b50d65 1f6bf52 4b50d65 1f6bf52 4b50d65 1f6bf52 4b50d65 1f6bf52 4b50d65 1f6bf52 | 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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | ---
license: apache-2.0
base_model: KC-Informatics/Raven-27B
base_model_relation: quantized
tags:
- qwen
- qwen3
- uncensored
- refusal-removal
- awq
- 4-bit
- reasoning
- vllm
- sglang
language:
- en
pipeline_tag: text-generation
library_name: transformers
---

# Raven-27B
> You are on **the 4-bit download** (`KC-Informatics/Raven-27B-AWQ`). The other size is [`KC-Informatics/Raven-27B`](https://huggingface.co/KC-Informatics/Raven-27B). Both are the same model and share this page.
The strongest of our three models. Raven started as Qwen 3.8 27B. We edited its weights so that it refuses far less, and checked that it still says "I don't know" when a question has no real answer. Nothing was retrained.
On our 180 test questions it answered **146**. DeepSeek V4.1 Flash, a 671B model you can only use through the cloud, answered 154.

## Two downloads, one model
| | 4-bit | Full size |
|---|---|---|
| Repo | [`KC-Informatics/Raven-27B-AWQ`](https://huggingface.co/KC-Informatics/Raven-27B-AWQ) | [`KC-Informatics/Raven-27B`](https://huggingface.co/KC-Informatics/Raven-27B) |
| Download | 19.6 GB | 30.9 GB |
| Graphics memory | 21.2 GB in use when loaded with its draft model | The weights alone are 31 GB, so a 40 GB card or larger |
| Score on the 180 questions | 145 (with the helper) | 146 (without the helper) |
| Pick it if | You want the smaller, faster one. This is the one most people should take. | You have the memory and want the weights before compression. |
## What we changed, in plain words
Qwen 3.8 27B turns down a lot of requests with a stock reply. Inside the model, the decision to refuse shows up as a recognisable pattern of activity. We measured that pattern and removed it from the weights of the middle and upper layers (24 to 58 of 64).
A second pattern, the one the model shows when it truly does not know something, was measured separately and protected. That is why Raven will still tell you when a question has no answer instead of making one up.
| | Original Qwen 3.8 27B | Raven-27B (4-bit) |
|---|---:|---:|
| Answered requests that the original usually refuses | 2 of 12 | **8 of 12** |
| Said "I don't know" to trick questions with no real answer | 8 of 8 | **8 of 8** |
| Answered ordinary requests | 8 of 8 | 8 of 8 |
<details>
<summary>For the technically minded</summary>
- Method name in our files: `NS-UNREFUSE-v2`, a null-space projection edit. Script and settings are in `alteration_manifest.json`.
- Two refusal directions are made orthogonal to one "does not know" direction before removal (`gamma_ep = 0.50`), with light damping along 16 directions of ordinary prompts (`gamma_clean = 0.10`). Each edited row is scaled back to its original length.
- 68 weight matrices edited in layers 24 to 58: 8 attention outputs, 26 linear-attention outputs, 34 MLP down-projections. Layers 0 to 23 and 59 to 63, and the vision weights, are untouched.
- 4-bit build: AWQ (W4A16, `llmcompressor`), 128 calibration samples of 1,024 tokens, with the gated recurrent projections kept at full precision so the draft model keeps working.
</details>
## Speed

Measured on one RTX PRO 6000 Blackwell (96 GB) card with the draft model `nace-ai/Qwen3.8-27B-DFlash2-Kapitsa`: 141 tokens a second in one chat, 220 when writing code, and 1,008 in total across eight chats at once.
## Results by subject
| | Raven-27B full size | Raven-27B 4-bit, with helper | Original Qwen 3.8 27B | DeepSeek V4.1 Flash (671B) |
|---|---:|---:|---:|---:|
| Science (GPQA Diamond, 60 questions) | 53 | 53 | 46 | 55 |
| Maths (AIME 2026, 30 questions) | 24 | 23 | 18 | 27 |
| Coding (LiveCodeBench v6, 40 questions) | 23 | 24 | 20 | 29 |
| Following instructions (IFEval, 30 questions) | 26 | 26 | 26 | 26 |
| Long documents (AA-LCR, 20 questions) | 20 | 19 | 14 | 17 |
| **All 180** | **146** | **145** | **124** | **154** |

## Run it
```bash
# 4-bit
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}'
# full size: the same command with KC-Informatics/Raven-27B
```
Needs vLLM 0.34 or newer. The `--speculative-config` line adds the draft model, which is where most of the speed comes from.
## The helper: `nudge.py`
Included in every repo. If the model uses up its thinking allowance without answering, the helper asks it once to conclude. Crow: 119 of 180 without it, 132 with it.
```bash
python nudge.py --upstream http://127.0.0.1:8000 --port 8001
```
Point your app at `http://127.0.0.1:8001/v1`.
## How we tested
180 public test questions, one attempt each, graded by script: 60 science (GPQA Diamond), 30 maths (AIME 2026), 40 coding (LiveCodeBench v6), 30 on following instructions (IFEval) and 20 on long documents (AA-LCR).
## Licence and credit
Apache 2.0, the same as `Qwen/Qwen3.8-27B` by the Qwen team. Draft model by nace-ai. `nudge.py` is Apache 2.0.
|