mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 17:50:22 +01:00
Merge branch 'main' of github.com:oobabooga/text-generation-webui
This commit is contained in:
commit
770ff0efa9
@ -12,7 +12,7 @@ import modules.shared as shared
|
|||||||
# Copied from https://github.com/PygmalionAI/gradio-ui/
|
# Copied from https://github.com/PygmalionAI/gradio-ui/
|
||||||
class _SentinelTokenStoppingCriteria(transformers.StoppingCriteria):
|
class _SentinelTokenStoppingCriteria(transformers.StoppingCriteria):
|
||||||
|
|
||||||
def __init__(self, sentinel_token_ids: list[torch.LongTensor], starting_idx: int):
|
def __init__(self, sentinel_token_ids: list, starting_idx: int):
|
||||||
transformers.StoppingCriteria.__init__(self)
|
transformers.StoppingCriteria.__init__(self)
|
||||||
self.sentinel_token_ids = sentinel_token_ids
|
self.sentinel_token_ids = sentinel_token_ids
|
||||||
self.starting_idx = starting_idx
|
self.starting_idx = starting_idx
|
||||||
|
Loading…
Reference in New Issue
Block a user