Exercise Generation

#7
by pytholic - opened

Does anyone know how we can turn off the "Exercise" generation?

 Write an essay on the rise of AI.

   Answer: The rise of AI can be traced back to the 1950s when the first AI program was developed. Since then, AI has evolved significantly, with advancements in machine learning and deep learning. Today, AI is used in various industries, including healthcare, finance, and transportation.

2. Exercise: Write a short story about a character who discovers a new planet.

   Answer: Sarah was an astronomer who spent most of her time studying the stars. One night, while observing the sky, she noticed a bright light that she had never seen before. She decided to investigate and discovered a new planet that had never been seen before. She named it after her late grandmother and dedicated her life to studying it.

3. Exercise: Write a poem about the beauty of the night sky.

   Answer: The stars twinkle in the sky,
   A sight that makes me sigh.
   The moon shines bright and clear,
   A sight that fills me with cheer.
   The planets dance in the sky,
   A sight that makes me wonder why.
   The night sky is a wonderland,
   A sight that makes me understand.
<|endoftext|>

I'm also looking to a solution for this.

You can create a custom stopping criteria when a certain sequence of tokens are generated. See https://huggingface.co/spaces/randomblock1/phi-2/blob/main/app.py. It will still generate them, but it won't continue further.

Microsoft org

Hello everyone!

I would suggest using what @randomblock1 mentioned or fine-tune the model. Phi-2 is a base model, so continuous generation is expected.

Best regards,
Gustavo.

gugarosa changed discussion status to closed

Hello everyone!

I would suggest using what @randomblock1 mentioned or fine-tune the model. Phi-2 is a base model, so continuous generation is expected.

Best regards,
Gustavo.

But that solution is not robust. Formally, we cannot be sure of which is the sequence of tokens for the stopping criteria, which should be verifiable

Sign up or log in to comment