mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 16:17:57 +01:00
Lint
This commit is contained in:
parent
2d196ed2fe
commit
a36fa73071
@ -1,5 +1,4 @@
|
|||||||
import gc
|
import gc
|
||||||
import logging
|
|
||||||
import os
|
import os
|
||||||
import pprint
|
import pprint
|
||||||
import re
|
import re
|
||||||
@ -29,7 +28,6 @@ import modules.shared as shared
|
|||||||
from modules import RoPE, sampler_hijack
|
from modules import RoPE, sampler_hijack
|
||||||
from modules.logging_colors import logger
|
from modules.logging_colors import logger
|
||||||
from modules.models_settings import get_model_metadata
|
from modules.models_settings import get_model_metadata
|
||||||
from modules.relative_imports import RelativeImport
|
|
||||||
|
|
||||||
transformers.logging.set_verbosity_error()
|
transformers.logging.set_verbosity_error()
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ class DRYLogitsProcessor(LogitsProcessor):
|
|||||||
match_lengths = {}
|
match_lengths = {}
|
||||||
|
|
||||||
for i in match_indices:
|
for i in match_indices:
|
||||||
next_token = input_ids_row[i+1].item()
|
next_token = input_ids_row[i + 1].item()
|
||||||
|
|
||||||
if next_token in self.sequence_breakers:
|
if next_token in self.sequence_breakers:
|
||||||
continue
|
continue
|
||||||
@ -234,7 +234,7 @@ class DRYLogitsProcessor(LogitsProcessor):
|
|||||||
# Start of input reached.
|
# Start of input reached.
|
||||||
break
|
break
|
||||||
|
|
||||||
previous_token = input_ids_row[-(match_length+1)].item()
|
previous_token = input_ids_row[-(match_length + 1)].item()
|
||||||
if input_ids_row[j] != previous_token:
|
if input_ids_row[j] != previous_token:
|
||||||
# Start of match reached.
|
# Start of match reached.
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user