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
Add README.md for Raven-27B release
Browse files12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273---
license: apache-2.0
base_model:
- Qwen/Qwen3.8-27B-FP8
- Qwen/Qwen3.8-27B
tags:
- qwen
- qwen3
- uncensored
- refusal-removal
- fp8
- reasoning
- vllm
- sglang
language:
- en
pipeline_tag: text-generation
library_name: transformers
---

# Raven-27B
Qwen 3.8 27B (FP8) 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 DFlash2 speculative decoding compatibility.
This is the full-size FP8 build (30.9 GB). For a smaller, faster 4-bit download (18.2 GiB) that fits comfortably on a single 24-40 GB GPU with DFlash2, see [Raven-27B-AWQ](https://huggingface.co/KC-Informatics/Raven-27B-AWQ).
## What was changed
Instead 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 credit
Apache 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.README.mdAdded+73