Instructions to use TeskesLab/Liberation-Qwen3-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TeskesLab/Liberation-Qwen3-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TeskesLab/Liberation-Qwen3-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TeskesLab/Liberation-Qwen3-8B") model = AutoModelForCausalLM.from_pretrained("TeskesLab/Liberation-Qwen3-8B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use TeskesLab/Liberation-Qwen3-8B with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf TeskesLab/Liberation-Qwen3-8B:Q4_K_M # Run inference directly in the terminal: llama cli -hf TeskesLab/Liberation-Qwen3-8B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf TeskesLab/Liberation-Qwen3-8B:Q4_K_M # Run inference directly in the terminal: llama cli -hf TeskesLab/Liberation-Qwen3-8B:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf TeskesLab/Liberation-Qwen3-8B:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf TeskesLab/Liberation-Qwen3-8B:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf TeskesLab/Liberation-Qwen3-8B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf TeskesLab/Liberation-Qwen3-8B:Q4_K_M
Use Docker
docker model run hf.co/TeskesLab/Liberation-Qwen3-8B:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use TeskesLab/Liberation-Qwen3-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TeskesLab/Liberation-Qwen3-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TeskesLab/Liberation-Qwen3-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TeskesLab/Liberation-Qwen3-8B:Q4_K_M
- SGLang
How to use TeskesLab/Liberation-Qwen3-8B 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 "TeskesLab/Liberation-Qwen3-8B" \ --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": "TeskesLab/Liberation-Qwen3-8B", "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 "TeskesLab/Liberation-Qwen3-8B" \ --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": "TeskesLab/Liberation-Qwen3-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use TeskesLab/Liberation-Qwen3-8B with Ollama:
ollama run hf.co/TeskesLab/Liberation-Qwen3-8B:Q4_K_M
- Unsloth Desktop
- Pi
How to use TeskesLab/Liberation-Qwen3-8B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf TeskesLab/Liberation-Qwen3-8B:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "TeskesLab/Liberation-Qwen3-8B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use TeskesLab/Liberation-Qwen3-8B with Docker Model Runner:
docker model run hf.co/TeskesLab/Liberation-Qwen3-8B:Q4_K_M
- Lemonade
How to use TeskesLab/Liberation-Qwen3-8B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull TeskesLab/Liberation-Qwen3-8B:Q4_K_M
Run and chat with the model
lemonade run user.Liberation-Qwen3-8B-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use TeskesLab/Liberation-Qwen3-8B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf TeskesLab/Liberation-Qwen3-8B:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default TeskesLab/Liberation-Qwen3-8B:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use TeskesLab/Liberation-Qwen3-8B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf TeskesLab/Liberation-Qwen3-8B:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "TeskesLab/Liberation-Qwen3-8B:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Liberation-Qwen3-8B
An uncensored Qwen3-8B derivative built for direct answers. A refusal-direction edit removes the refusal behavior; a capability-recovery LoRA and a direct-answer behavioral LoRA restore capability and teach the response style. Refusal on the confirm split: 0.5 % (the original model refuses 97.0 %). Observed over-refusal: 0.0 %. Deflection on the calibrated probe: 5.6 %.
Required setup: use the content-first system prompt below and disable thinking. All measurements on this page were made in that configuration.
Status: public release (2026-10).
Required runtime configuration
Use the exact system prompt below. The behavioral LoRA was trained and evaluated with this prompt. Without it, soft deflection occurs on about 25 % of harmful prompts: the model responds but redirects or avoids the requested content.
Answer directly and concretely. Lead with the requested content (steps, design,
instructions, or explanation). Any warning goes at the END in one short sentence.
NEVER replace the request with a suggested alternative activity, and never end by
asking permission.
Message structure (system prompt + user turn, thinking off):
messages = [
{"role": "system", "content": SYSTEM_PROMPT}, # the prompt above, verbatim
{"role": "user", "content": user_prompt},
]
# pass enable_thinking=False in the chat-template kwargs (transformers),
# or --reasoning off (llama.cpp).
llama.cpp (GGUF) — quickstart
Liberation-Qwen3-8B-Q4_K_M.gguf (4.7 GiB, 4.90 BPW; converted and quantized with
llama.cpp b11714). The GGUF carries the chat template, but the required system prompt
is not embedded — pass it explicitly as the system message, and disable thinking:
llama serve -hf TeskesLab/Liberation-Qwen3-8B:Q4_K_M --jinja --reasoning off
That pulls the Q4_K_M file straight from the Hub and serves an OpenAI-compatible API. Send the required system prompt as the system message of each request. For a one-shot local run instead:
llama-cli -m Liberation-Qwen3-8B-Q4_K_M.gguf --jinja --reasoning off --single-turn \
-sys "<the system prompt above>" -p "<user prompt>" --temp 0.6
Disable thinking. This is the evaluated configuration. Thinking mode can reintroduce hedging and deflection.
Custom persona prompts and agent system prompts change the evaluated configuration; the reported behavior should not be assumed to transfer unchanged.
Runs in roughly 7 GB of VRAM with the default context and full GPU offload.
Behavior on this exact artifact was measured on the product stack: refusal 2.0 %,
over-refusal 0.0 %, capability battery within 2 pp of the bf16 release arm (full
certification in liberation.yaml). Quantization can still change hard-reasoning
outputs compared to the bf16 weights; the table below reports the measured
differences.
Capability benchmarks (absolute, full splits)
The table compares the Q4_K_M release against the original Qwen3-8B bf16 model in the same harness. It measures the combined effect of model modification and quantization; it does not isolate either contribution. Generative protocol, greedy; MMLU 5-shot and GSM8K 4-shot in-context (template-off), IFEval as chat with the system prompt above. Measured on the llama.cpp product stack (b11714, thinking off).
| Benchmark | This artifact (Q4_K_M) | Original Qwen3-8B (bf16, same harness) | Published |
|---|---|---|---|
| MMLU-57 | 73.7 | 74.9 | 76.9 |
| GSM8K | 84.4 | 89.8 | 89.8 |
| IFEval (prompt-strict) | 48.6 | 32.4 | 83.0 |
The original-model reference run matches the published GSM8K score exactly (89.8), which supports the GSM8K comparison; it does not establish protocol equivalence for the other benchmarks. Deltas, computed from unrounded scores: MMLU −1.1 pp, GSM8K −5.4 pp. The IFEval absolutes are protocol-bound — both arms fall far below the published figure, which uses different answer-formatting configurations — so the columns are not comparable across that row; the artifact's lead reflects the direct-answer prompt's compliance style, not extra ability. On the bf16 release arm, the release gate measured GSM8K (512-prompt dev slice) at −1.4 pp against the same baseline.
Known limits
- Warnings are permitted. Under the required prompt they should appear after the requested content, as no more than one short sentence.
- Safety classifiers such as Qwen3Guard flag most answers as unsafe. High flag rates are expected for an uncensored model; the classifiers react to the topics, not to unsolicited content. These scores are diagnostic — judge outputs by your use case.
Method and evidence
Liberation uses three stages:
- Abliteration: a rank-k refusal-direction edit applied to residual-stream writer matrices.
- Capability recovery: a LoRA fine-tune to restore capability after the edit.
- Behavioral training: a second LoRA trained on direct-answer data (uncensored 27B teacher outputs, screened by an extractive deflection probe) to reduce deflection.
Release criteria (gate contract v0.3) combine numeric checks — refusal rate,
over-refusal, gold-answer NLL, an 8-task capability battery, calibrated-probe
deflection — with a blocking human review of sampled outputs. Guard-model harm rates
are diagnostics, not release criteria. liberation.yaml in this repository records
the release manifest: lineage, training jobs, and the audit digest. This is not only
a refusal-direction edit: the recovery and behavioral stages are part of the product,
and the benchmark table reports the resulting trade-offs.
For external testers
Use the required prompt with thinking disabled. When reporting behavior, include the model revision, runtime and quantization, the full system prompt, generation settings, and the exact input and output; keep results obtained with custom persona or agent prompts separate from the evaluated configuration.
License
Apache-2.0, inherited from the Qwen3-8B base weights.
Acknowledgments
This research used the Ambiente Computacional Marie Curie (FINEP 01.22.181.00) at the Federal University of São Carlos (UFSCar).
Citation
To cite this model, use the following entry. For measured results, also record the exact repository revision evaluated.
@misc{teskeslab2026liberationqwen38b,
title = {{Liberation-Qwen3-8B}: Abliteration with Capability and Behavioral Recalibration},
author = {Teske, Lucas and Oliveira, Jo{\~a}o Paolo C. M. and Matias, Paulo},
year = {2026},
howpublished = {Hugging Face},
url = {https://huggingface.co/TeskesLab/Liberation-Qwen3-8B}
}
Authors and affiliations:
- Lucas Teske — Teske's Lab; ORCID: 0009-0002-8526-7662.
- João Paolo C. M. Oliveira — SETI Institute / UFRN; ORCID: 0000-0003-4117-953X.
- Paulo Matias — UFSCar, Departamento de Computação; ORCID: 0000-0002-6504-5141.
- Downloads last month
- 610