chore
This commit is contained in:
parent
a1ae71d221
commit
3e336830a3
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,7 +19,6 @@ __pycache__
|
||||
/cmd-helper.bat
|
||||
/install-py-dep.bat
|
||||
/backend-python/wkv_cuda
|
||||
/backend-python/rwkv*
|
||||
*.exe
|
||||
*.old
|
||||
.DS_Store
|
||||
|
2224
backend-python/rwkv_pip/tokenizer-midipiano.json
vendored
Normal file
2224
backend-python/rwkv_pip/tokenizer-midipiano.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -372,18 +372,18 @@ class TextRWKV(AbstractRWKV):
|
||||
self.bot = "Assistant"
|
||||
self.END_OF_LINE = 11
|
||||
|
||||
self.AVOID_REPEAT_TOKENS = []
|
||||
self.AVOID_REPEAT_TOKENS = set()
|
||||
AVOID_REPEAT = ",:?!"
|
||||
for i in AVOID_REPEAT:
|
||||
dd = self.pipeline.encode(i)
|
||||
assert len(dd) == 1
|
||||
self.AVOID_REPEAT_TOKENS += dd
|
||||
self.AVOID_PENALTY_TOKENS = []
|
||||
self.AVOID_REPEAT_TOKENS.add(dd[0])
|
||||
self.AVOID_PENALTY_TOKENS = set()
|
||||
AVOID_PENALTY = "\n,.:,。:<>[]{}()/\\|;;" # \n,.:?!,。:?!"“”<>[]{}/\\|;;~`@#$%^&*()_+-=0123456789
|
||||
for i in AVOID_PENALTY:
|
||||
dd = self.pipeline.encode(i)
|
||||
assert len(dd) == 1
|
||||
self.AVOID_PENALTY_TOKENS += dd
|
||||
self.AVOID_PENALTY_TOKENS.add(dd[0])
|
||||
|
||||
self.__preload()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user