Beispiel #1
0
 def add(metaset, v):
     if assume_consecutive_token_ids:
         metaset.set(sp.max(metaset, v))
     else:
         metaset.add(v)
Beispiel #2
0
 def add(self, metaset, v):
     if self.config.assume_consecutive_token_ids:
         metaset.set(sp.max(metaset, v + 1))
     else:
         metaset.add(v)
Beispiel #3
0
 def add(self, metaset, v):
     if self.config.assume_consecutive_token_ids:
         sp.verify(metaset == v, message = "Token-IDs should be consecutive")
         metaset.set(sp.max(metaset, v + 1))
     else:
         metaset.add(v)