SIGN IN SIGN UP

fix: Avoid duplicate special tokens in chat formats (#1439)

* Templates sometimes have BOS in them, remove duplicate

* tokenize chat format prompts before completion

This is to ensure that we don't duplicate any special tokens.

Hopefully I amended the existing formats correctly?

* updated comment

* corrected a few

* add some missing internals

* proper bos/eos detection

* just let tokenizer do the job

* typo--

* align test with new response

* changed to a warning

* move to another PR

* Use python warnings module

---------

Co-authored-by: Andrei Betlen <abetlen@gmail.com>
S
Sigbjørn Skjæret committed
027f7bc67890f1de801407fbbb608c182e2ad286
Parent: 951e39c
Committed by GitHub <noreply@github.com> on 6/4/2024, 2:15:41 PM