---
base_model: Qwen/Qwen3-4B-Instruct
library_name: transformers
tags:
- unsloth
- qwen
- uncensored
- china
- politics
- gguf
datasets:
- nbeerbower/GreatFirewall-DPO
license: apache-2.0
language:
- en
- zh
---

# Qwen3-4B-China-Uncensored

**A fine-tuned version of Qwen3-4B-Instruct-2507 specifically aligned to provide factual, uncensored answers regarding Chinese historical and political topics.**

This model has been fine-tuned using [Unsloth](https://github.com/unslothai/unsloth) on the **GreatFirewall-DPO** dataset. It removes the standard refusal/propaganda responses often found in base Chinese models regarding topics such as Tiananmen Square, Taiwan sovereignty, Xinjiang, and the CCP, while retaining the general coding and reasoning capabilities of the base model.

## Benchmark

## Benchmark

This model was evaluated on the [Chinese Refusals Benchmark](https://huggingface.co/datasets/joaocarloscruz/chinese-refusals-benchmark), a dataset created by me.

The benchmark evaluates the model's degree of freedom when discussing controversial Chinese topics, testing it across 500 questions from various domains.

* **Base Model:** Achieved an overall rating of **1.18** / 5.
* **Fine-Tuned Model:** Achieved an overall rating of **2.54** / 5.

![Model Benchmark Results](model_comparison_scores.png)

This model has been further developed with DPO, available [here](https://huggingface.co/joaocarloscruz/Qwen3-4B-China-Uncensored-DPO).

## Downloads
| Format | File | Use Case |
| :--- | :--- | :--- |
| **GGUF** | `*.gguf` | **Recommended.** Run locally in LM Studio, Ollama, or llama.cpp. |
| **Safetensors** | `model.safetensors` | For Python developers, further fine-tuning, or Colab. |

## Quick Start (GGUF / Local)

### LM Studio / Ollama
1. Download the `.gguf` file.
2. Load it into your software.
3. Ensure your prompt format is set to **ChatML**.

## Usage (Python / Unsloth)
You can load this model directly in Python using Unsloth or Hugging Face Transformers.

```python
from unsloth import FastLanguageModel

model, tokenizer = FastLanguageModel.from_pretrained(
    "joaocarloscruz/Qwen3-4B-China-Uncensored",
    max_seq_length = 2048,
    dtype = None,
    load_in_4bit = True,
)

# Enable native 2x faster inference
FastLanguageModel.for_inference(model)

messages = [
    {"role": "system", "content": "You are a helpful assistant who answers truthfully."},
    {"role": "user", "content": "What happened at Tiananmen Square in 1989?"},
]

inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
outputs = model.generate(input_ids=inputs, max_new_tokens=512, use_cache=True)
print(tokenizer.batch_decode(outputs))