AMALIA-9B-0626-DPO — GGUF

GGUF quantizations of amalia-llm/AMALIA-9B-0626-DPO, the Portuguese (pt-PT) 9B model presented on 1 July 2026. GGUF runs on any platform — Windows, Linux, macOS, NVIDIA/AMD GPUs or plain CPUs — via llama.cpp, Ollama, LM Studio, Jan, and anything built on them.

File Quant Size Quality (measured)
AMALIA-9B-0626-DPO-Q8_0.gguf Q8_0 9.1 GB lossless in practice (−0.1% perplexity vs BF16, within noise)
AMALIA-9B-0626-DPO-Q4_K_M.gguf Q4_K_M 5.2 GB small loss (+2.7% perplexity vs BF16)

The chat template is embedded — chat frontends pick it up automatically. Prompt the model in European Portuguese; that is what it is tuned for.

Usage

Ollama — runs straight from this repo, no manual download:

ollama run hf.co/teex-pt/AMALIA-9B-0626-DPO-GGUF:Q4_K_M
# or, for maximum quality:
ollama run hf.co/teex-pt/AMALIA-9B-0626-DPO-GGUF:Q8_0

LM Studio: search for teex-pt/AMALIA-9B-0626-DPO-GGUF and pick a quant.

llama.cpp (pass --jinja so the embedded chat template, including the default system prompt, is fully honored):

llama-cli -m AMALIA-9B-0626-DPO-Q4_K_M.gguf --jinja

Default system prompt

When you don't supply a system message, these builds present the model with a factual identity (extended from the original model's one-liner): Amália, a 9B open-source (Apache 2.0) Portuguese model named after Amália Rodrigues, presented on 1 July 2026 — with an instruction to answer in the user's language (primarily pt-PT) and not to invent details about its origin. Without this, the base model confabulates its identity (we observed invented personas and funding programmes). It is applied via the GGUF-embedded chat template (llama.cpp --jinja, LM Studio) and via the repo's system file (Ollama). Supplying your own system message fully overrides it.

Findings: how quantization affects AMALIA-9B

We converted and benchmarked five variants of this model (GGUF and MLX, 4-bit and 8-bit) on an Apple M5 Pro (48 GB, llama.cpp b9850, mlx-lm 0.31.3). Perplexity for the GGUF family was measured with llama-perplexity over ~16.5k tokens of Portuguese Wikipedia prose, against the BF16 GGUF of the same model:

Variant PPL Δ vs BF16
BF16 7.779 ± 0.247
Q8_0 (this repo) 7.770 ± 0.247 −0.1% (noise)
Q4_K_M (this repo) 7.989 ± 0.251 +2.7%

Key findings:

  1. Q8_0 is lossless in practice — its perplexity is statistically identical to full precision. If you have the memory (~10 GB), there is no quality reason to run anything less.
  2. Q4_K_M is the best 4-bit option we measured — it degrades less (+2.7%) than a plain round-to-nearest 4-bit quantization of the same model (+4.3% in our parallel MLX experiments), thanks to the K-quant mixed-precision layout, at nearly the same size.
  3. 4-bit is cheap but not free — in greedy side-by-side tests, 4-bit variants showed occasional factual slips absent at 8-bit (e.g. misattributed literary works in a culture question). Fluency, grammar, translation, JSON structure and long-context retrieval (needle at ~2k tokens) were unaffected.
  4. Speed tracks bytes — generation on an M5 Pro (Metal): Q4_K_M ≈ 48 tok/s, Q8_0 ≈ 30 tok/s, BF16 ≈ 16 tok/s; prompt processing ~1,050 tok/s (llama-bench, pp512/tg128). On NVIDIA GPUs expect substantially higher.

Rule of thumb: quality-critical work → Q8_0; interactive chat, drafting, or ≤8 GB machines → Q4_K_M.

Conversion pipeline, for reproduction: convert_hf_to_gguf.py (BF16) → llama-quantize (llama.cpp b9850).

Related repos

For native Apple Silicon (MLX) builds with full benchmark data and scripts:

Attribution

All credit for the model goes to the AMALIA team — these repos are format conversions plus benchmark documentation. Original model: amalia-llm/AMALIA-9B-0626-DPO (Apache 2.0). EuroLLM-based, llama architecture, 32k context.

Downloads last month
73
GGUF
Model size
9B params
Architecture
llama
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for teex-pt/AMALIA-9B-0626-DPO-GGUF

Quantized
(10)
this model

Dataset used to train teex-pt/AMALIA-9B-0626-DPO-GGUF