Commit Graph

11 Commits

Author SHA1 Message Date
Henk
a87d5d6f23 Remove HF's llama workaround 2023-05-03 20:18:40 +02:00
Llama
35d344b951 Remove torch dependency and more generic dim0 workaround
Remove torch dependency from hf.py
Make workaround for dimension zero values of token_ids
more generic to handle every token, not just newlines.
2023-05-03 09:48:16 -07:00
Llama
3768848548 Fix tokenization and whitespace issues with llama-derived models
Work around the 'soft' prefix space behavior of sentencepiece.
Override encode to restore the deleted HF support for decode_with_prefix_space.
Override decode to skip the soft space and return true decoded tokens.
Allow submitting chat messages with embedded newlines.
Split sentences between punctuation and whitespace, rather than after whitespace.
Also include trailing quotes and brackets after sentence stoppers.
This avoids splitting ." and .) into two tokens, for instance.
Insert whitespace at the beginning of the author's note, since sentences are
split with leading whitespace.
Remove spurious newlines at the end of chat responses.
2023-05-03 01:27:11 -07:00
somebody
a0f4ab5c6a Move bad token grabber until after newlinemode has been deduced 2023-05-02 20:23:36 -05:00
somebody
efe268df60 Move overrides to better places 2023-05-02 20:18:33 -05:00
somebody
933dbd634a HFInferenceModel: Make badwordsids not unique to torch 2023-05-01 17:13:33 -05:00
onesome
d4f7b60dc9 Fix for multiple paths 2023-04-26 16:49:12 -05:00
onesome
6776a71532 Add more info to custom model error 2023-04-26 16:36:52 -05:00
onesome
bbf4963d6e Fix custmodpth stuff for hf loading 2023-04-26 16:18:45 -05:00
somebody
8c8bdfaf6a Model: Fix assorted bugs
and ignore warnings in pytest
2023-03-10 20:00:39 -06:00
somebody
54cecd4d5d Model: And another refactor 2023-03-01 19:16:35 -06:00