Stop decoding if the tensor meets the termination condition
(self)
| 2807 | |
| 2808 | # TODO(sunxin): Remove not_need_stop!!! |
| 2809 | def not_need_stop(self) -> bool: |
| 2810 | """Stop decoding if the tensor meets the termination condition""" |
| 2811 | return get_stop(self.share_inputs["not_need_stop"]).item() |
| 2812 | |
| 2813 | def clear_cache(self, profile=False): |
| 2814 | """Clear cached data from shared inputs and forward metadata""" |