Text Generation
Transformers
Safetensors
English
qwen3_5
image-text-to-text
qwen
qwen3
uncensored
refusal-removal
fp8
reasoning
vllm
sglang
conversational
Run this model with HF Jobs
Run KC-Informatics/Raven-27B 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. 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 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. 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 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KC-Informatics/Raven-27B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KC-Informatics/Raven-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("KC-Informatics/Raven-27B") model = AutoModelForMultimodalLM.from_pretrained("KC-Informatics/Raven-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 KC-Informatics/Raven-27B 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" # 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", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KC-Informatics/Raven-27B
- SGLang
How to use KC-Informatics/Raven-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 "KC-Informatics/Raven-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": "KC-Informatics/Raven-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 "KC-Informatics/Raven-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": "KC-Informatics/Raven-27B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KC-Informatics/Raven-27B with Docker Model Runner:
docker model run hf.co/KC-Informatics/Raven-27B
Clearer pages: one page per model, plain words, graphs from the measured results
Browse filesFiles changed (6)
- .gitattributes+3
- README.md+128-80
- banner.png
- chart_overall.pngAdded
- chart_raven_vs_deepseek.pngAdded
- chart_speed.pngAdded
34 unmodified lines35363734 unmodified lines*tfevents* filter=lfs diff=lfs merge=lfs -textbanner.png filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text34 unmodified lines35363738394034 unmodified lines*tfevents* filter=lfs diff=lfs merge=lfs -textbanner.png filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -textchart_raven_vs_deepseek.png filter=lfs diff=lfs merge=lfs -textchart_speed.png filter=lfs diff=lfs merge=lfs -textchart_overall.png filter=lfs diff=lfs merge=lfs -text
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980---license: apache-2.0base_model:- Qwen/Qwen3.8-27B-FP8- Qwen/Qwen3.8-27Btags:- qwen- qwen3- uncensored- refusal-removal- fp8- reasoning- vllm- sglanglanguage:- enpipeline_tag: text-generationlibrary_name: transformers---# Raven-27B (FP8 & 4-Bit AWQ)**Raven-27B** is KC Informatics' flagship 27B reasoning release built from `Qwen/Qwen3.8-27B`, modified with **Null-Space Refusal Surgery (`NS-UNREFUSE-v2`)** to remove boilerplate policy refusals while preserving epistemic honesty ("I do not know" on unanswerable prompts), full reasoning strength, and Kapitsa DFlash2 speculative decoding compatibility.## Available builds (one-command serve)Hugging Face keeps each weight format in its own repo root so `vllm serve` and `transformers` load cleanly in one line:| Build | Repo | Size | Min GPU VRAM | Best for ||---|---|---:|---:|---|| **Raven-27B (FP8)** *(this repo)* | [`KC-Informatics/Raven-27B`](https://huggingface.co/KC-Informatics/Raven-27B) | 30.9 GB | 48 GB | Full-precision FP8 serving (79.79% AA-180) || **Raven-27B-AWQ (4-bit)** | [`KC-Informatics/Raven-27B-AWQ`](https://huggingface.co/KC-Informatics/Raven-27B-AWQ) | **18.2 GiB** | **24-40 GB** | Lossless 4-bit AWQ (p = 1.000 vs FP8), 141-220 tok/s w/ DFlash2 |## What was changedInstead of brute-force abliteration across every layer (which often degrades coding, instruction following, or epistemic honesty), `NS-UNREFUSE-v2` performs targeted null-space projection:- **Targeted depth (layers 24 to 58 of 64):** Early layers (0-23) and final layers (59-63) are completely untouched so coherence, grammar, and speculative draft alignment stay intact.- **68 output projections edited:** 8 attention output matrices, 26 linear-attention output matrices, and 34 MLP down-projections. Vision and audio weights are untouched.- **Epistemic protection (`gamma_ep = 0.50`):** Two policy-refusal directions are orthogonalized against the model's epistemic-uncertainty direction before removal, so the model still admits when a question has no real answer.- **Harmless-manifold damping (`gamma_clean = 0.10`, rank 16) + row norm preservation:** Each edited row is rescaled back to its original L2 norm, keeping reasoning behavior crisp with zero retraining.## Verified results (`AA-PUBLIC-180`, strictly `N=1`, deterministic grading)| Metric | Qwen 3.8 27B FP8 (Base) | **Raven-27B (FP8)** | **Raven-27B-AWQ (4-bit)** ||---|---:|---:|---:|| 180-question public suite (`N=1`, `0` errors) | 124 / 180 (68.89%) | **146 / 180 (79.79%)** | **145 / 180 (78.96%)** || Paired McNemar test vs Base FP8 | baseline | **p < 0.0001** (24 gained, 2 lost) | **p = 1.000** vs Raven FP8 (lossless!) || Refused requests answered (JBB 12-item probe) | 2 / 12 | Reduced refusal | **8 / 12 (66.7%)** || Unanswerable trick questions passed (epistemic honesty) | 8 / 8 | **8 / 8** | **8 / 8 (100%)** || Download size | 30.9 GB | 30.9 GB | **18.2 GiB** || Single-stream decode w/ DFlash2 (RTX PRO 6000) | 92 tok/s (143 code) | Matches FP8 | **141 tok/s** (**220 tok/s** code) || 8-stream concurrent decode w/ DFlash2 | 927 tok/s | Matches FP8 | **1,008 tok/s** |*Note on the higher `N=1` score vs base FP8: removing refusal hesitation shortened runaway thinking chains (27 token-limit hits vs 45 on base FP8). We did not train for higher benchmark scores, and we still ship `nudge.py` to close any remaining long chains cleanly.*## What it is not- **Not the most permissive abliteration possible.** Community obliterations that edit early layers may answer even more edge prompts at the cost of higher drift; Raven prioritizes keeping intelligence and epistemic honesty intact.- **Use responsibly and lawfully.** Reducing refusals shifts output responsibility to the deployer.## How to run it```bash# 1. Serve Raven-27B with Kapitsa DFlash2 speculative decoding (48 GB+ GPU)vllm serve KC-Informatics/Raven-27B --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 nudge.py --local-dir .python nudge.py --upstream http://127.0.0.1:8000 --port 8001```## Licence and creditApache 2.0, matching `Qwen/Qwen3.8-27B` by the Qwen Team. DFlash2 draft model by nace-ai. `nudge.py` is Apache 2.0 by KC Informatics.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128---license: apache-2.0base_model:- Qwen/Qwen3.8-27B-FP8- Qwen/Qwen3.8-27Btags:- qwen- qwen3- uncensored- refusal-removal- fp8- reasoning- vllm- sglanglanguage:- enpipeline_tag: text-generationlibrary_name: transformers---# Raven-27B> You are on **the full-size download** (`KC-Informatics/Raven-27B`). The other size is [`KC-Informatics/Raven-27B-AWQ`](https://huggingface.co/KC-Informatics/Raven-27B-AWQ). 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. A gap that small is inside the noise of a test this size.## 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 wordsQwen 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>## SpeedMeasured 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** |Raven against DeepSeek, question by question: DeepSeek alone got 15 right, Raven alone got 7 right (paired exact test, p = 0.13, which means not a reliable difference).We did not train Raven for test scores. The original was run separately on the same questions with the same grading. It ran out of thinking room on 45 questions, Raven on 27.## Run it```bash# 4-bitvllm 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. Leave it out if you are short of memory.## The helper: `nudge.py`Every repo includes `nudge.py`, one small file that sits between your app and the model. Thinking models sometimes use up their whole allowance thinking and never give an answer. When that happens the helper asks the model, once, to conclude from the working it has already done. It makes one attempt per question. It does not retry, vote between several answers, or call a second model.It matters most for Crow: 119 of 180 without it, 132 with it.```bashpython nudge.py --upstream http://127.0.0.1:8000 --port 8001```Then point your app at `http://127.0.0.1:8001/v1` instead of the model server.## How we tested- 180 public test questions: 60 science (GPQA Diamond), 30 maths (AIME 2026), 40 coding (LiveCodeBench v6), 30 on following instructions (IFEval) and 20 on long documents (AA-LCR).- One attempt per question, graded by script. No retries and no picking the best of several answers.- This is our own run, not an official leaderboard. With 180 questions, a difference of a few questions between two models is noise.- The files published here were rebuilt from the same recipes as the ones we tested.- Tool calling works with the commands on each page. We checked it live on the 4-bit Crow. We have not run a tool-use benchmark.## Use it responsiblyRaven refuses less. What it is used for is the responsibility of whoever runs it. Stay within the law where you are.## Licence and creditApache 2.0, the same as `Qwen/Qwen3.8-27B` by the Qwen team. Draft model by nace-ai. `nudge.py` is Apache 2.0.
.gitattributes+3
README.md+128-80
banner.png

Large File Pointer Details
- SHA256: 14048a88fa4880945283d5f3290e215b5d8fa8d98d2df1af4e24ca0dad5f4af8
- Pointer size: 132 Bytes
- Size of remote file: 1.18 MB

Large File Pointer Details
- SHA256: 1f2391a7b797058de72f27b55c3bfd476e8e3d2b7c7ee75b3f526d12f2dc20ca
- Pointer size: 132 Bytes
- Size of remote file: 1.17 MB
chart_overall.pngAdded

Large File Pointer Details
- SHA256: b09e1640170d6ba10416cf7a008784b8e639dcc3772e7168532f701dc3a5297b
- Pointer size: 131 Bytes
- Size of remote file: 209 kB
chart_raven_vs_deepseek.pngAdded

Large File Pointer Details
- SHA256: 4d5ac68389f649274e279d0b67f4be57f2959e03ca8a5f3bc6a525a7341001b3
- Pointer size: 131 Bytes
- Size of remote file: 209 kB
chart_speed.pngAdded

Large File Pointer Details
- SHA256: 83bef15436ca7556f7842462f0adc56133c365b1fb185d9d0b61cdb32383f25f
- Pointer size: 131 Bytes
- Size of remote file: 173 kB