(self)
| 1561 | self.debug_mode = debug_mode |
| 1562 | |
| 1563 | def validate(self): |
| 1564 | watermark_missing_arg_msg = ( |
| 1565 | "Some of the keys in `watermarking_config` are defined incorrectly. `{key}` should be {correct_value}` " |
| 1566 | "but found {found_value}" |
| 1567 | ) |
| 1568 | if self.sampling_table_size > 2**24: |
| 1569 | raise ValueError( |
| 1570 | watermark_missing_arg_msg.format( |
| 1571 | key="sampling_table_size", |
| 1572 | correct_value="< 2**24", |
| 1573 | found_value=self.sampling_table_size, |
| 1574 | ), |
| 1575 | ) |
| 1576 | |
| 1577 | def construct_processor(self, vocab_size: int, device) -> "WatermarkLogitsProcessor": |
| 1578 | return SynthIDTextWatermarkLogitsProcessor( |
nothing calls this directly
no outgoing calls
no test coverage detected