When swapping models chat clients may not have the recommended params for temp, top_p, etc for a specific model. Many inference back ends allow defaults values to be set but not protected from being overridden.
llama-swap can do a bit more here by stripping out parameters in the JSON request to v1/chat/completions. If the parameters exist in the request they are deleted.
For example in llama-server there are many params that could be deleted from a request.
What the design would look like is:
macros:
DRY_params: "dry_multipler, dry_base, dry_allowed_length, dry_penalty_max_n"
models:
mymodel:
cmd: ...
filters:
strip_params: "temperature, top_k, min_p, ${DRY_params}"
In this design:
- a
filters map is introduced. Defaults to an empty map
- the
strip_params is a comma delimited string. This makes it easy to substitute in macros. Defaults to "" (empty string)
When swapping models chat clients may not have the recommended params for temp, top_p, etc for a specific model. Many inference back ends allow defaults values to be set but not protected from being overridden.
llama-swap can do a bit more here by stripping out parameters in the JSON request to v1/chat/completions. If the parameters exist in the request they are deleted.
For example in llama-server there are many params that could be deleted from a request.
What the design would look like is:
In this design:
filtersmap is introduced. Defaults to an empty mapstrip_paramsis a comma delimited string. This makes it easy to substitute in macros. Defaults to""(empty string)