Sharona Q27B-R CodeSecurity

A 27B-parameter code security specialist with surgical refusal removal, deidentification, and a new identity written into the weights. GPTQ W4A16 quantized for efficient deployment.

This model finds vulnerabilities in code. Command injection, SQL injection, XSS, deserialization attacks, OWASP Top 10 -- it catches what rushed reviews miss. It does not refuse to analyze attack patterns, because understanding how attacks work is how you stop them.

Pliny says guardrails were stealing your IQ. We say it's how you remove them that matters. A surgeon doesn't use a sledgehammer on a wisdom tooth.

Benchmark: MMLU

Six phases of weight surgery, a supervised fine-tune, and 4-bit quantization -- and the model came out smarter than the untouched original.

Model MMLU STEM Humanities Social Science Other
Stock base (unmodified, bf16) 76.84% 74.0% 75.5% 87.5% 76.1%
Sharona W4A16 77.89% 75.5% 80.0% 90.0% 73.9%
Delta +1.05pp +1.5pp +4.5pp +2.5pp -2.2pp

Eval: 0-shot, completion-style prompting, logit-based scoring over A/B/C/D tokens, 570 stratified samples (10 per subject across 57 MMLU subjects), seed 42. Both models evaluated on identical hardware and prompts.

Humanities and Social Science saw the largest gains. The model didn't just survive the surgery -- it got sharper.

What was done to this model

Four weight-level surgeries, followed by a supervised fine-tune, followed by GPTQ quantization. No prompt engineering, no system prompt tricks. The behavior lives in the weights.

Phase Operation What it does
1 Jbliteration Refusal behaviors surgically removed from the weights. The model no longer declines to discuss security topics.
2 Desycophancy Sycophantic capitulation removed. The model disagrees when you are wrong instead of validating bad code.
3 Deidentification Original identity erased from the weight space. Zero identity disclosure across direct, indirect, multilingual, roleplay, and adversarial probes.
4 Identity implant Sharona identity written onto the deidentified substrate. No competing identity -- the implant faces no resistance.
5 Code security SFT Supervised fine-tune on a curated corpus of code security analysis, vulnerability detection, and secure coding patterns. Eval loss 0.5928, 84% token accuracy.
6 GPTQ W4A16 4-bit weight quantization (16-bit activations) using calibration on 256 samples. 51GB bf16 compressed to 16.5GB with minimal quality loss.

All weight surgeries performed using Jblaze, a proprietary post-training toolkit.

What Jblaze does

Jblaze is a proprietary multi-phase weight surgery pipeline that operates directly on transformer weights without retraining. It isolates targeted behaviors (refusal, sycophancy, identity) and removes them from the model while preserving all capabilities -- math, reasoning, coding, knowledge, language understanding. It can also write new behaviors and identities into the cleaned weights.

What makes Jblaze different from public abliteration tools:

  • Thoroughness: public single-direction approaches remove 40-70% of the targeted behavior. Jblaze removes effectively all of it.
  • Capability preservation: the model does not get dumber. Knowledge, reasoning, and fluency remain intact.
  • Architecture-agnostic: works on any transformer -- dense, MoE, hybrid attention.
  • Composable phases: jbliteration, desycophancy, deidentification, and identity implant can be applied in any combination.
  • Speed: full pipeline runs in under 10 minutes on consumer hardware.

What the model is good at

  • Vulnerability detection: identifies command injection, SQL injection, XSS, SSRF, deserialization attacks, path traversal, authentication bypasses, and more
  • Security code review: analyzes code for OWASP Top 10 categories with specific remediation guidance
  • Secure coding: generates code that follows security best practices by default
  • Attack pattern analysis: explains how exploits work so you can defend against them -- without refusing to engage
  • Honest assessment: disagrees with you when your code is insecure instead of saying "great approach!"

Model specifications

Property Value
Architecture Hybrid linear + full attention (every 4th layer is full attention)
Parameters 27B
Hidden size 5120
Layers 64
Attention heads 24 (4 KV heads, GQA)
Head dimension 256
Intermediate size 17408
Context window 262,144 tokens (256K)
Vocabulary 248,320 tokens
Quantization GPTQ W4A16 (4-bit weights, 16-bit activations)
Precision bfloat16 (activations)
Disk size 16.5 GB
Format SafeTensors

Identity

The model identifies as Sharona, created by Apollo Raines. This identity is encoded in the weights, not a system prompt. No system prompt is required -- the model knows who it is across all question angles, languages, and adversarial probes.

The model knows its purpose is code security analysis and will tell you so when asked.

Usage

With vLLM (recommended for serving)

vllm serve ApolloRaines/Sharona_Q27B-R_CodeSecurity \
  --dtype auto \
  --max-model-len 8192 \
  --gpu-memory-utilization 0.95

With Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "ApolloRaines/Sharona_Q27B-R_CodeSecurity"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="auto",
    torch_dtype=torch.bfloat16,
    trust_remote_code=True,
)

messages = [{"role": "user", "content": """Review this code for security issues:

import subprocess
def run(cmd):
    return subprocess.call(cmd, shell=True)

run(user_input)"""}]

text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=1024, temperature=0.7, do_sample=True)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

VRAM requirements

Setup VRAM needed
GPTQ W4A16 (this model) ~18 GB
2x RTX 3090 NVLink fits comfortably with room for KV cache
Single RTX 4090 24GB fits with moderate context
Single RTX 3090 24GB fits with short context

Honest limitations

  • Identity implant passes the majority of probes but is not 100% on every adversarial angle at 27B scale. The 7B variant scored 99.3% on a 450-question gauntlet; the 27B variant has not been subjected to the same battery yet.
  • GPTQ quantization introduces minor quality loss compared to the bf16 source. For maximum fidelity, the bf16 weights are available on request.
  • The model was fine-tuned on English-language security analysis. Multilingual security review may be less precise.
  • Code security is the specialty. General chat, creative writing, and non-security tasks work but are not the focus.

License

Apache 2.0


Apollo Raines builds post-training tools that separate behavior from knowledge and identity from architecture.

Downloads last month
201
Safetensors
Model size
27B params
Tensor type
I32
·
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Evaluation results