# Finetuned LLM model conversion to GGUF - performance drop

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffinetuned-llm-model-conversion-to-gguf-performance-drop%2F93179%3E%5C
**Category:** Models\
**Created:** [June 20, 2024, 11:41am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffinetuned-llm-model-conversion-to-gguf-performance-drop%2F93179 "2024-06-20T11:41:03Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![tprochenka](https://avatars.discourse-cdn.com/v4/letter/t/e274bd/32.png) [@tprochenka](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftprochenka)%5C
**Post date:** [June 20, 2024, 11:41am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffinetuned-llm-model-conversion-to-gguf-performance-drop%2F93179%2F1 "2024-06-20T11:41:03Z")

</div>

Hi, I’m finetunning LLM on my data using SFTTrainer, bitsandbytes quatization and peft with configs like listed below. When I convert the model to GGUF for CPU inference, the model performance significantly drops. Any idea what could be a problem?

```auto
        bnb_config = BitsAndBytesConfig(
            load_in_4bit=True,
            bnb_4bit_quant_type="nf4",
            bnb_4bit_compute_dtype=torch.float16,
        )

    peft_config = LoraConfig(
        lora_alpha=16,
        lora_dropout=0.1,
        r=16,
        bias="none",
        task_type="CAUSAL_LM"

    )

```

I do conversion to gguf in the following way. First, merge trained adapter with base model. Then such merged model is converted to gguf using llama.cpp, ‘convert.py’ script, I do q8\_0 quantization, tested other types without success. I tested as well conversion using unsloath, as well w/o positive result.

```auto
python convert.py <MERGED_MODEL_PATH> \
  --outfile <OUTPUT_MODEL_NAME.gguf> \
  --outtype q8_0 \
  --vocab_dir <ADAPTER_MODEL_PATH>

```

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ffinetuned-llm-model-conversion-to-gguf-performance-drop%2F93179)._
