Added a way to see vocabulary size
This commit is contained in:
@@ -29,6 +29,10 @@ class NanoSocratesSpecial(Encoder):
|
||||
VOC_LENGTH = len(self.__vocabulary)
|
||||
return BPE_OFFSET + VOC_LENGTH + 1
|
||||
|
||||
@property
|
||||
def vocabulary_size(self) -> int:
|
||||
return len(self.vocabulary)
|
||||
|
||||
@property
|
||||
def vocabulary(self) -> dict[str, int]:
|
||||
return self.__vocabulary
|
||||
|
||||
Reference in New Issue
Block a user