LocalAI icon indicating copy to clipboard operation
LocalAI copied to clipboard

Transformer Backend: Implementing use_tokenizer_template and stop_prompts options

Open fakezeta opened this issue 10 months ago • 1 comments

Description

This PR implements embedded template in models for transformers backend with option:

template:
  use_tokenizer_template: true

in the yaml file.

This way the embedded chat template in the tokenizer_config.json is used.

stopwords:
- "<|end_of_text|>"
- "<|eot_id|>"

Option is also implemented. It accept a list of tokens that will be used as stopwords instead of the default.

Signed commits

  • [X] Yes, I signed my commits.

fakezeta avatar Apr 20 '24 20:04 fakezeta

Deploy Preview for localai canceled.

Name Link
Latest commit 43240311e69b26cde1596ef20d1446b4736e045f
Latest deploy log https://app.netlify.com/sites/localai/deploys/662523ec7136fa00085f43cb

netlify[bot] avatar Apr 20 '24 20:04 netlify[bot]