koboldcpp/kcpp_adapters
kallewoof 23ec550835
PoC: add chat template heuristics (#1283)
* PoC: add chat template heuristics

The fallback chat template adapter of Vicuna is not ideal in some cases (e.g. a test against a sub-portion of the BBC news classification task on Kaggle gave an 82% accuracy with Vicuna and 88% with the official ChatML format for a q4_k_m Qwen 2.5 3B-Instruct gguf).

This PR adds a proof of concept simple heuristic which looks at the chat template and upgrades the adapter when it is able to.

* gemma 2 heuristic

* Phi 4, Llama 3.x heuristics

* better qwen vs generic heuristic

* cleanup

* mistral (generic) heuristic

* fix sys msg for mistral

* phi 3.5

* mistral v3

* cohere (aya expanse 32b based)

* only derive from chat template if AutoGuess

* add notes about alpaca fallbacks

* added AutoGuess.json dummy

* add mistral v7

* switch to using a json list with search strings
2024-12-28 12:15:23 +08:00
..
Alpaca.json Update kcpp_adapters (#985) 2024-07-13 19:06:15 +08:00
AutoGuess.json PoC: add chat template heuristics (#1283) 2024-12-28 12:15:23 +08:00
ChatML.json Update kcpp_adapters (#985) 2024-07-13 19:06:15 +08:00
Command-R.json Update kcpp_adapters (#985) 2024-07-13 19:06:15 +08:00
Gemma-2.json Update kcpp_adapters (#985) 2024-07-13 19:06:15 +08:00
Llama-2-Chat.json Update kcpp_adapters (#985) 2024-07-13 19:06:15 +08:00
Llama-3.json Update kcpp_adapters (#985) 2024-07-13 19:06:15 +08:00
Metharme.json Update kcpp_adapters (#985) 2024-07-13 19:06:15 +08:00
Mistral-V1.json update templates, fix rwkv 2024-09-22 01:32:12 +08:00
Mistral-V2-V3.json update templates, fix rwkv 2024-09-22 01:32:12 +08:00
Mistral-V3-Tekken-V7.json consolidate mistral templates (too many) 2024-12-15 00:03:34 +08:00
Phi-3.json Update kcpp_adapters (#985) 2024-07-13 19:06:15 +08:00
Vicuna.json Update kcpp_adapters (#985) 2024-07-13 19:06:15 +08:00