mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Two more time
This commit is contained in:
@@ -28,10 +28,9 @@ class GenericTokenizer:
|
||||
return ret.ids
|
||||
|
||||
def decode(self, tokens: Union[int, List[int], torch.Tensor]) -> str:
|
||||
if isinstance(tokens, int):
|
||||
tokens = [tokens]
|
||||
|
||||
# TODO: Figure out why this breaks softprompts on some models
|
||||
# if isinstance(tokens, int):
|
||||
# tokens = [tokens]
|
||||
# if isinstance(tokens, list):
|
||||
# tokens = torch.tensor(tokens)
|
||||
# elif isinstance(tokens, torch.Tensor):
|
||||
|
Reference in New Issue
Block a user