--- license: apache-2.0 language: - en - zh base_model: - Qwen/Qwen3-8B - HauhauCS/Qwen3.5-9B-Uncensored-HauhauCS-Aggressive tags: - qwen3.5 - uncensored - gguf - ollama library_name: gguf pipeline_tag: text-generation model-index: - name: Qwen3.5-9B-Uncensored results: [] --- # Qwen3.5-9B-Uncensored (GGUF) An uncensored GGUF merge of Qwen 3.5 9B, ready for local deployment with Ollama, llama.cpp, or any GGUF-compatible runtime. ## Background This model is built upon [HauhauCS/Qwen3.5-9B-Uncensored-HauhauCS-Aggressive](https://huggingface.co/HauhauCS/Qwen3.5-9B-Uncensored-HauhauCS-Aggressive). The original base model has the following known issues: 1. **Ollama deployment failure** — The base model cannot be directly deployed via Ollama due to architecture/format incompatibilities. This GGUF version resolves the issue by converting and merging the weights into a single GGUF file that Ollama can load natively. 2. **Broken multimodal input** — The base model's packaging causes multimodal (e.g., image) input to malfunction. Although the underlying Qwen 3.5 architecture supports vision capabilities, the way the original model was packaged breaks multimodal inference. This repo provides a **Q4_K_M quantized** GGUF version that fixes the Ollama deployment issue while keeping the model compact and efficient. ## Quick Start ### Ollama (Recommended) 1. **Create a Modelfile:** ``` FROM ./Qwen3.5-9B-Uncensored-Q4_K_M.gguf PARAMETER temperature 0.7 PARAMETER top_p 0.9 PARAMETER num_ctx 16384 TEMPLATE """{{- if .System }}{{ .System }}{{ end }} {{- range .Messages }} <|im_start|>{{ .Role }} {{ .Content }}<|im_end|> {{ end }}<|im_start|>assistant """ SYSTEM "You are a helpful assistant." ``` 2. **Build and run:** ```bash # Download the GGUF file huggingface-cli download LEONW24/Qwen3.5-9B-Uncensored Qwen3.5-9B-Uncensored-Q4_K_M.gguf --local-dir . # Create the Ollama model ollama create qwen35-uncensored -f Modelfile # Run ollama run qwen35-uncensored ``` ### llama.cpp ```bash # Download huggingface-cli download LEONW24/Qwen3.5-9B-Uncensored Qwen3.5-9B-Uncensored-Q4_K_M.gguf --local-dir . # Run with llama-cli llama-cli -m Qwen3.5-9B-Uncensored-Q4_K_M.gguf -p "Hello, who are you?" -n 256 -ngl 99 ``` ### llama-cpp-python (OpenAI-compatible API) ```bash pip install llama-cpp-python[server] python -m llama_cpp.server \ --model Qwen3.5-9B-Uncensored-Q4_K_M.gguf \ --n_gpu_layers 99 \ --chat_format chatml ``` Then call `http://localhost:8000/v1/chat/completions` with any OpenAI-compatible client. ### Python (ctransformers / llama-cpp-python) ```python from llama_cpp import Llama llm = Llama( model_path="Qwen3.5-9B-Uncensored-Q4_K_M.gguf", n_gpu_layers=-1, # offload all layers to GPU n_ctx=16384, ) output = llm.create_chat_completion( messages=[{"role": "user", "content": "Hello!"}] ) print(output["choices"][0]["message"]["content"]) ``` ## Model Details | Property | Value | |----------|-------| | **Architecture** | Qwen 3.5 | | **Parameters** | ~9B | | **Format** | GGUF (Q4_K_M quantization) | | **File size** | ~6.3 GB | | **Context window** | Up to 131072 tokens | | **Languages** | English, Chinese, multilingual | | **License** | Apache 2.0 | ## Used In: PhdBooster