Implimentation of Stopping Criteria List

Dear HF,

Would someone please show me how to use the stopping criteria.

I would like to stop generation if certain words / phrases are generated e.g. “foo bar”, “moo bar foo”

The instructions seem to use the Bert tokeniser - to generate tokens of the stop sequence?

I am trying to implement this with the OPT model (13b) - would I still use the BERT tokeniser?

Would anyone be able to show an example of using this successfully?