llama.cpp/examples/high_level_api
Sigbjørn Skjæret dbcf64cf07
feat: Support SPM infill (#1492)
* Support SPM infill

* typo--

* one less layer of parenthesis necessary

* new required internals

* manually add bos/eos if model requires it

* add bos even when unknown

This is identical behaviour to llama.cpp

I guess any model that doesn't use BOS is recent enough to have the add_bos_token metadata.

* don't add bos/eos on non-infill pre-tokenized prompt

* add tokenizer hack to remove leading space in suffix

* I keep forgetting metadata are strings

* check if bos exists

* add example

* add cls/sep instead of bos/eos for WPM vocab

* simplify

* color-code filtered suffix

---------

Co-authored-by: Andrei Betlen <abetlen@gmail.com>
2024-06-13 03:45:24 -04:00
..
fastapi_server.py fix: Run server command. Closes #1143 2024-01-31 10:37:19 -05:00
high_level_api_embedding.py Update model paths to be more clear they should point to file 2023-04-09 22:45:55 -04:00
high_level_api_inference.py Update model paths to be more clear they should point to file 2023-04-09 22:45:55 -04:00
high_level_api_infill.py feat: Support SPM infill (#1492) 2024-06-13 03:45:24 -04:00
high_level_api_streaming.py Update model paths to be more clear they should point to file 2023-04-09 22:45:55 -04:00
langchain_custom_llm.py Update model paths to be more clear they should point to file 2023-04-09 22:45:55 -04:00