def add(metaset, v): if assume_consecutive_token_ids: metaset.set(sp.max(metaset, v)) else: metaset.add(v)
def add(self, metaset, v): if self.config.assume_consecutive_token_ids: metaset.set(sp.max(metaset, v + 1)) else: metaset.add(v)
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)