A LoRA fine-tune of Qwen2.5-7B-Instruct, merged into the base weights and
quantized to Q4_K_M GGUF for efficient local inference. Runs comfortably on
consumer GPUs with 8 GB VRAM (e.g. RTX 4060) via Ollama or llama.cpp.
This repository ships the Q4_K_M quant — the recommended balance of size
and quality for most use cases. It keeps the most sensitive weights at higher
precision while compressing the rest to 4-bit, yielding minimal quality loss
versus the full-precision model at roughly a quarter of the size.
Quant
Bits
Size
Quality
RAM/VRAM
Q4_K_M
~4.5
4.4 GB
Good (recommended)
~6 GB
Usage
Ollama (recommended)
Pull and run directly from the Hub:
ollama run hf.co/waguriagent/qwen2.5-7b-uncensored-gguf:Q4_K_M
Or build a local model from the downloaded GGUF with a Modelfile:
dockerfile
1FROM ./qwen2.5-7b-uncensored.Q4_K_M.gguf23TEMPLATE """{{ if .System }}<|im_start|>system
4{{ .System }}<|im_end|>
5{{ end }}{{ if .Prompt }}<|im_start|>user
6{{ .Prompt }}<|im_end|>
7{{ end }}<|im_start|>assistant
8{{ .Response }}<|im_end|>
9"""
1011PARAMETER stop "<|im_start|>"
12PARAMETER stop "<|im_end|>"
13PARAMETER temperature 0.7
14PARAMETER top_p 0.9
bash
1ollama create my-model -f Modelfile
2ollama run my-model
llama.cpp
bash
1# Download the GGUF2huggingface-cli download waguriagent/qwen2.5-7b-uncensored-gguf \3 qwen2.5-7b-uncensored.Q4_K_M.gguf --local-dir .45# Run interactively6./llama-cli -m qwen2.5-7b-uncensored.Q4_K_M.gguf \7 -p "You are a helpful assistant." -cnv
89# Or serve an OpenAI-compatible API10./llama-server -m qwen2.5-7b-uncensored.Q4_K_M.gguf -c 8192
Python (llama-cpp-python)
python
1from llama_cpp import Llama
23llm = Llama(4 model_path="qwen2.5-7b-uncensored.Q4_K_M.gguf",5 n_ctx=8192,6 n_gpu_layers=-1,# offload all layers to GPU7)89out = llm.create_chat_completion(10 messages=[11{"role":"system","content":"You are a helpful assistant."},12{"role":"user","content":"Explain gradient descent in one paragraph."},13],14 temperature=0.7,15)16print(out["choices"][0]["message"]["content"])
The adapter was trained with PEFT + TRL (no quantization during training),
loading the base model in BF16 and training LoRA adapters directly on an
H100 80GB GPU. Sequence packing was enabled so short samples are concatenated
into dense sequences, maximizing token throughput per step.
Hyperparameters
Hyperparameter
Value
Epochs
1
Effective batch size
32 (4 × 8 grad accumulation)
Sequence length
2048
Learning rate
2e-4
LR scheduler
Cosine with 3% warmup
Optimizer
AdamW (fused)
Weight decay
0.01
Max grad norm
0.3
Attention
FlashAttention-2
Gradient checkpointing
Enabled
LoRA rank / alpha
32 / 64
LoRA dropout
0
Pipeline
BF16 LoRA train (1 epoch)
→ merge adapter into base weights
→ convert to GGUF F16 (llama.cpp)
→ quantize to Q4_K_M
→ upload to Hugging Face
This is a 4-bit quantized model; expect a small quality degradation versus the
full-precision base. For maximum quality, use a higher-bit quant or the merged
FP16 model.
The model inherits the knowledge cutoff, biases, and limitations of the
Qwen2.5-7B-Instruct base model.
Fine-tuning on a domain-specific dataset can narrow general-purpose capability.
Evaluate on your own tasks before production use.
License
Released under the Apache 2.0 license, consistent with the
Qwen2.5-7B-Instruct base model. Review the
base model license
for full terms.