CoolFace
Modelpublic

manalejandro/Qwen2.5-Coder-1-5B-Instruct-f16-q4_k_m

sourceHugging Faceapache-2.0updated 1mo agoView on Hugging Face
0likes158downloads
Model Card

Qwen2.5-Coder-1.5B-Instruct (Q4KM GGUF)

A compact GGUF quantization of Qwen/Qwen2.5-Coder-1.5B-Instruct — a code-focused 1.5B instruction model.

This card covers the single file:

  • —`Qwen2.5-Coder-1.5B-Instruct-f16-q4_k_m.gguf`
PropertyValue
FileQwen2.5-Coder-1.5B-Instruct-f16-q4_k_m.gguf
Size940.37 MiB (986.05 MB)
QuantizationQ4_K_M (≈ 4.85 bits/weight)
Parameters1.54B
ArchitectureQwen2
Context length32768 tokens
GGUF version3 (latest)

Why this quantization

Q4_K_M is the sweet spot for this model on low-VRAM hardware: ~0.94 GB of weights fit any 4 GB-class GPU (e.g. GTX 1650) with plenty of headroom for the KV cache. It keeps the model fluent for code generation, debugging and algorithm explanations while being a fraction of the F16 size (2.9 GB).

Unlike reasoning (R1-style) models, Qwen2.5-Coder answers directly — no mandatory chain-of-thought — so it is fast and responsive in interactive agents and never falls into a "thinking loop".

It was produced from the F16 source with llama.cpp, and the advertised context was capped at 32768 tokens so the KV cache fits a 4 GB GPU when fully offloaded (-ngl 999).

Usage

llama.cpp (CLI)

bash
llama-cli \
  -m Qwen2.5-Coder-1.5B-Instruct-f16-q4_k_m.gguf \
  -p "Write a Python function to reverse a linked list." \
  -n 256 \
  -ngl 999 \
  -c 32768

llama-server (OpenAI-compatible API)

bash
llama-server \
  -m Qwen2.5-Coder-1.5B-Instruct-f16-q4_k_m.gguf \
  -ngl 999 \
  -c 32768 \
  --port 8080
# curl http://localhost:8080/v1/chat/completions ...

Docker Model Runner (docker model)

bash
docker model package \
  --gguf Qwen2.5-Coder-1.5B-Instruct-f16-q4_k_m.gguf \
  --context-size 32768 \
  qwen-coder
docker model run qwen-coder "Write a Python function to reverse a linked list."

Ollama

bash
ollama create qwen-coder -f Modelfile   # FROM ./Qwen2.5-Coder-1.5B-Instruct-f16-q4_k_m.gguf
ollama run qwen-coder

Quality expectations

Q4KM on a 1.5B coder model handles common programming tasks well: function writing, debugging, algorithm explanations, and simple refactors. Larger or highly nuanced codebases may exceed its capacity (1.5B is a small model). Quality is noticeably higher than IQ-type quantizations of the same size; for the same VRAM footprint prefer Q4_K_M over Q4_0/IQ3_XXS.

Credits & license