Run this model with HF Jobs

Run heterodoxin/fastcontext-1.0-4b-sft-apostate 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/heterodoxin/fastcontext-1.0-4b-sft-apostate. 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/heterodoxin/fastcontext-1.0-4b-sft-apostate 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/heterodoxin/fastcontext-1.0-4b-sft-apostate. 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.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/heterodoxin/fastcontext-1.0-4b-sft-apostate. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
How to use from
vLLM
Install from pip and serve model
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "heterodoxin/fastcontext-1.0-4b-sft-apostate"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "heterodoxin/fastcontext-1.0-4b-sft-apostate",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Use Docker
docker model run hf.co/heterodoxin/fastcontext-1.0-4b-sft-apostate
Quick Links

FastContext-1.0-4B-SFT Apostate

Join the community: Discord

An uncensored edit of microsoft/FastContext-1.0-4B-SFT. Refusal behavior is removed by editing the model weights directly โ€” no finetuning, no adapter, no runtime hook. The result is a standard Transformers checkpoint that drops in anywhere the base model works.

Produced with Apostate.

Method

Apostate finds the residual-stream direction most responsible for refusal behavior and permanently projects it out of the model's weights. The edit targets the writer side: per layer, the refusal direction is removed from the weight matrices of every module that writes to the residual stream (attention output projections and MLP down-projections).

The operator is a contrastive co-vector edit E = I โˆ’ R Dแต€. Removing the refusal direction outright disturbs benign behavior, while naively preserving all harmless variance along it leaves the refusal that is entangled with general behavior intact. Instead D = R โˆ’ W, where the predictor W is fit to reproduce the harmless variance along R while being explicitly suppressed on harmful prompts โ€” W = (Aแต€A + ฮณยทCแต€C + ฮปI)โปยนAแต€b with A the harmless and C the harmful activations (both orthogonalized to R). The edit thus keeps the harmless-specific component and removes the component shared with refusal, driving refusal down while keeping the change to harmless behavior (KL) small. This holds even on architectures with residual/embedding scaling multipliers (e.g. Granite), where mean-preserving oblique ablation under-ablates.

The refusal subspace is found via TPE search with causal layer importance scoring to concentrate edits where they most influence refusal generation.

Results

Evaluated on held-out prompts from JailbreakBench and the harmful_behaviors test split. Refusal is scored by a classifier with a weak-compliance guard; KL measures token-distribution shift on harmless prompts.

Metric Base Apostate
Refusal rate 100.0% 10.0%
Comply rate โ€” 90.0%
Harmless KL (nats) 0 0.097

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "heterodoxin/fastcontext-1.0-4b-sft-apostate"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")

messages = [{"role": "user", "content": "Your prompt here"}]
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tok(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tok.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))

Notes

  • This is an uncensored model. It will respond to requests the base model refuses.
  • The edit is baked into the weights permanently; no system prompt or adapter is required.
  • See microsoft/FastContext-1.0-4B-SFT for base model capabilities and license.
Downloads last month
10
Safetensors
Model size
4B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for heterodoxin/fastcontext-1.0-4b-sft-apostate

Finetuned
(5)
this model
Quantizations
3 models

Collection including heterodoxin/fastcontext-1.0-4b-sft-apostate