Text Generation
Transformers
PyTorch
RefinedWeb
sft
custom_code
text-generation-inference

How to use few-shot learning correctly?

#5
by 0kopr - opened

What is the most correct way to do few-shot learning in the prompting of this model.

Do I have to use a special token for it?

I don't think there is an official method. I make use of the <|system|>, <|prefix_begin|>, and <|endoftext|> tokens. I haven't tried few shot learning frequently because it doesn't seem super effective for me.
One think worth trying if you were wanting to answer the question in either "yes" or "no":

<|system|>Answer the questions with "yes" or "no"<|endoftext|>
<|prompter|>Is the sky blue?<|endoftext|>
<|assistant|>yes<|endoftext|>
<|prompter|>Is it ok to mock people?<|endoftext|>
<|assistant|>no<|endoftext|>
<|prompter|>

and then you ask your question followed by an <|endoftext|><|assistant|>.

Sign up or log in to comment