mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-20 14:28:54 +00:00
OAI: Add response_prefix and fix BOS token issues in chat completions
response_prefix is used to add a prefix before generating the next message. This is used in many cases such as continuining a prompt (see #96). Also if a template has BOS token specified, add_bos_token will append two BOS tokens. Add a check which strips a starting BOS token from the prompt if it exists. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -878,6 +878,7 @@ class ExllamaV2Container:
|
||||
encode_special_tokens=True,
|
||||
return_offsets=True,
|
||||
)
|
||||
print(ids)
|
||||
mask = (
|
||||
self.tokenizer.padding_mask(ids)
|
||||
if self.use_cfg and gen_settings.cfg_scale not in [None, 1.0]
|
||||
|
||||
Reference in New Issue
Block a user