From f39d565d1a2c395027ec3f3d2ca6be741e259623 Mon Sep 17 00:00:00 2001 From: Millaguie Date: Mon, 10 Aug 2026 13:46:21 +0200 Subject: [PATCH] llama : warn when quantizing to DT3 The reference-quantizer disclaimer only existed in the code and in llama-quantize --help; now it is also printed where the mistake would actually be made, at the start of a quantization run targeting DT3. --- src/llama-quant.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/llama-quant.cpp b/src/llama-quant.cpp index a2bf632c1..edd212c9c 100644 --- a/src/llama-quant.cpp +++ b/src/llama-quant.cpp @@ -884,6 +884,11 @@ static void llama_model_quantize_impl(const std::string & fname_inp, const std:: throw std::runtime_error(format("invalid output file type %d\n", ftype)); } + if (ftype == LLAMA_FTYPE_MOSTLY_DT3) { + LLAMA_LOG_WARN("%s: DT3 is being quantized with the in-tree REFERENCE quantizer only - " + "the measured DT3 quality requires the planes from ternaria's PTQTP pipeline\n", __func__); + } + // mmap consistently increases speed on Linux, and also increases speed on Windows with // hot cache. It may cause a slowdown on macOS, possibly related to free memory. #if defined(__linux__) || defined(_WIN32)