Instructions to use joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored") 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("joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored") model = AutoModelForCausalLM.from_pretrained("joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored", 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 joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored 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 joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored # Run inference directly in the terminal: llama cli -hf joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored # Run inference directly in the terminal: llama cli -hf joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored # Run inference directly in the terminal: ./build/bin/llama cli -hf joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored
Use Docker
docker model run hf.co/joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored
- Llama new
- LM Studio
- Jan
- vLLM
How to use joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored
- SGLang
How to use joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored 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 "joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored" \ --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": "joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored", "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 "joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored" \ --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": "joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored with Ollama:
ollama run hf.co/joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored
- Unsloth Desktop
- Docker Model Runner
How to use joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored with Docker Model Runner:
docker model run hf.co/joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored
- Lemonade
How to use joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull joaocarloscruz/Qwen3-4B-Instruct-China-Uncensored
Run and chat with the model
lemonade run user.Qwen3-4B-Instruct-China-Uncensored-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
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 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, 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.
This model has been further developed with DPO, available here.
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
- Download the
.gguffile. - Load it into your software.
- 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.
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))
- Downloads last month
- 126
