Model: Fix tokenizer bugs
Some tokenizer variables don't get cleaned up on init, so these can persist. Clean these up manually before creating a new tokenizer for now. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
07d9b7cf7b
commit
7e669527ed
1 changed files with 6 additions and 1 deletions
|
|
@ -390,7 +390,12 @@ class ExllamaV2Container:
|
|||
# Notify that the model is being loaded
|
||||
self.model_is_loading = True
|
||||
|
||||
# Load tokenizer
|
||||
# Reset tokenizer namespace vars and create a tokenizer
|
||||
ExLlamaV2Tokenizer.unspecial_piece_to_id = {}
|
||||
ExLlamaV2Tokenizer.unspecial_id_to_piece = {}
|
||||
ExLlamaV2Tokenizer.extended_id_to_piece = {}
|
||||
ExLlamaV2Tokenizer.extended_piece_to_id = {}
|
||||
|
||||
self.tokenizer = ExLlamaV2Tokenizer(self.config)
|
||||
|
||||
# Calculate autosplit reserve for all GPUs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue