Text Generation
GGUF
English
pollard
llama.cpp
qwen2
code
code-completion
memory-fit
conversational
imatrix
Instructions to use PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard 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 PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS # Run inference directly in the terminal: llama cli -hf PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS # Run inference directly in the terminal: llama cli -hf PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS # Run inference directly in the terminal: ./llama-cli -hf PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS # Run inference directly in the terminal: ./build/bin/llama-cli -hf PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS
Use Docker
docker model run hf.co/PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS
- LM Studio
- Jan
- vLLM
How to use PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS
- Ollama
How to use PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard with Ollama:
ollama run hf.co/PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS
- Unsloth Studio
How to use PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard to start chatting
- Pi
How to use PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard with Docker Model Runner:
docker model run hf.co/PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS
- Lemonade
How to use PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS
Run and chat with the model
lemonade run user.Qwen2.5-Coder-1.5B-Instruct-Pollard-IQ4_XS
List all available models
lemonade list
- Hermes Agent
How to use PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:IQ4_XS" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
| quantized_by: PollardWeights | |
| pipeline_tag: text-generation | |
| base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct | |
| base_model_relation: quantized | |
| license: apache-2.0 | |
| language: | |
| - en | |
| tags: | |
| - pollard | |
| - gguf | |
| - llama.cpp | |
| - qwen2 | |
| - code | |
| - code-completion | |
| - memory-fit | |
| - conversational | |
| # Pollard memory-fit quantizations of Qwen2.5-Coder-1.5B-Instruct by Qwen | |
| Local **code completion that fits your box.** Built with | |
| **[Pollard Weights](https://github.com/WestWaters/pollard-weights)** β sized to your | |
| machine's RAM, not to a bit-width chart. Standard GGUF: runs in any recent | |
| **llama.cpp** (the `qwen2` architecture is long-supported) and anything built on it. | |
| **70β93 tok/s on an Apple M4**, whole model under 1.3 GB. | |
| Original model: https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct | |
| ## Model details | |
| | | | | |
| |---|---| | |
| | Parameter count | ~1.54B (dense) | | |
| | Architecture | `qwen2` (28 layers) | | |
| | Input support | text / code | | |
| | Fill-in-the-middle | yes β Qwen2.5-Coder FIM tokens (see below) | | |
| | Speculative decoding | no | | |
| | imatrix | **yes** β importance-matrix guided (mixed prose + code corpus) | | |
| | Perplexity / KLD measured | not measured β **verified by live code generation + throughput** (below) | | |
| The sensitive tensors (token embeddings, attention q/k/v/o, norms, output head) keep | |
| high precision and the FFN bulk carries the compression β a smarter quant, tuned to | |
| how much RAM you actually have. (This is a **dense** model, so the build uses Pollard's | |
| role/depth-aware memory-fit mode + imatrix; the measured-KL knapsack is reserved for | |
| MoE models where it demonstrably beats uniform.) | |
| ## Which file should I choose? | |
| - **Fastest / smallest** β **`IQ4_XS`** (0.86 GB, **93 tok/s** on M4). Great for a lean | |
| completion sidecar. | |
| - **Balanced (recommended)** β **`Q5_K_M`** (1.12 GB, **71 tok/s**). Best quality-per-byte | |
| for everyday completion. | |
| - **Max fidelity** β **`Q6_K`** (1.25 GB, **72 tok/s**). Near-lossless. | |
| ## Available files | |
| | file | quant | size | M4 tok/s | notes | | |
| |---|---|---|---|---| | |
| | [`β¦-Pollard-IQ4_XS.gguf`](https://huggingface.co/PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard/blob/main/Qwen2.5-Coder-1.5B-Instruct-Pollard-IQ4_XS.gguf) | IQ4_XS | 0.86 GB | **93.0** | fastest / smallest | | |
| | [`β¦-Pollard-Q5_K_M.gguf`](https://huggingface.co/PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard/blob/main/Qwen2.5-Coder-1.5B-Instruct-Pollard-Q5_K_M.gguf) | Q5_K_M | 1.12 GB | **71.2** | balanced β **recommended** | | |
| | [`β¦-Pollard-Q6_K.gguf`](https://huggingface.co/PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard/blob/main/Qwen2.5-Coder-1.5B-Instruct-Pollard-Q6_K.gguf) | Q6_K | 1.25 GB | **72.5** | max fidelity | | |
| ## Prompt format (chat / instruct) | |
| Qwen2.5-Coder uses ChatML: | |
| ``` | |
| <|im_start|>system | |
| {system_prompt}<|im_end|> | |
| <|im_start|>user | |
| {prompt}<|im_end|> | |
| <|im_start|>assistant | |
| ``` | |
| ## Fill-in-the-middle (code completion) | |
| For editor-style completion, use the Qwen2.5-Coder FIM tokens β prefix + suffix, model | |
| fills the middle: | |
| ``` | |
| <|fim_prefix|>def is_prime(n): | |
| <|fim_suffix|> | |
| return True<|fim_middle|> | |
| ``` | |
| Repo-level completion is supported too via `<|repo_name|>` and `<|file_sep|>` separators. | |
| ## Download a specific file | |
| ```bash | |
| pip install -U "huggingface_hub[cli]" | |
| hf download PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard \ | |
| --include "Qwen2.5-Coder-1.5B-Instruct-Pollard-Q5_K_M.gguf" --local-dir ./ | |
| ``` | |
| ## How to run | |
| ```bash | |
| curl -LsSf https://llama.app/install.sh | sh | |
| llama-server -hf PollardWeights/Qwen2.5-Coder-1.5B-Instruct-Pollard:Q5_K_M | |
| ``` | |
| or with a local file: | |
| ```bash | |
| # OpenAI-compatible API + web UI at :8080 β point your editor / continue.dev at it | |
| llama-server -m Qwen2.5-Coder-1.5B-Instruct-Pollard-Q5_K_M.gguf -ngl 99 | |
| # one-shot | |
| llama-cli -m Qwen2.5-Coder-1.5B-Instruct-Pollard-Q5_K_M.gguf -ngl 99 -st \ | |
| -p "Write a Python function is_prime(n). Only the function." | |
| # Ollama | |
| ollama create qwen2.5-coder-1.5b-pollard -f Modelfile # FROM ./β¦-Q5_K_M.gguf | |
| ``` | |
| Also runs in **LM Studio, koboldcpp, ramalama, Jan, Text Generation WebUI, LoLLMs** β | |
| standard GGUF. | |
| ## Verified | |
| Loaded and generated from on an **Apple M4 Mac Mini (16 GB)**, llama.cpp Metal, before | |
| shipping β *measure first, no claim before a number.* Throughput is in the table above; | |
| correctness spot-check (`Q5_K_M`, "Write a Python function is_prime(n)"): | |
| ```python | |
| def is_prime(n): | |
| if n <= 1: | |
| return False | |
| for i in range(2, int(n**0.5) + 1): | |
| if n % i == 0: | |
| return False | |
| return True | |
| ``` | |
| ## imatrix | |
| The importance matrix was computed on a mixed prose + source-code corpus and guides the | |
| IQ/K-quant quality. (The base Qwen2.5-Coder builds elsewhere are often quantized without | |
| one; these are imatrix-guided.) | |
| ## ARM / AVX | |
| llama.cpp repacks weights into an interleaved layout at load time for faster ARM/AVX | |
| inference β no special file needed; the old `Q4_0_4_4/4_8/8_8` variants are not required. | |
| ## Credits & license | |
| - **Base model:** [Qwen2.5-Coder-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct) | |
| by the Qwen team, under **Apache-2.0**. This build inherits that license. | |
| - **Quantization runtime:** [llama.cpp](https://github.com/ggml-org/llama.cpp) (ggml-org). | |
| - **Method & builder:** [Pollard Weights](https://github.com/WestWaters/pollard-weights) β | |
| *measure first, no claim before a number.* | |