# Stop sequence for few-shot learning with GPT-J on HF API

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fstop-sequence-for-few-shot-learning-with-gpt-j-on-hf-api%2F10619%3E%5C
**Category:** 🤗Transformers\
**Created:** [October 8, 2021, 3:58pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fstop-sequence-for-few-shot-learning-with-gpt-j-on-hf-api%2F10619 "2021-10-08T15:58:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaisar123](https://avatars.discourse-cdn.com/v4/letter/k/6f9a4e/32.png) [@kaisar123](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fkaisar123)%5C
**Post date:** [October 8, 2021, 3:58pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fstop-sequence-for-few-shot-learning-with-gpt-j-on-hf-api%2F10619%2F1 "2021-10-08T15:58:32Z")

</div>

I am trying to find a a way to declare a stop sequence and show the model a few examples of what I want to generate, i.e.:  
prompt\_tweet = “”"  
key: market  
tweet: take feedback from nature and markets, not from people

### 

key: children  
tweet: Maybe we die, so we can come back as children.

### 

key: hugging face  
tweet:  
“”"  
(Example taken from few-shot learning guide for GPT Neo)

The problem is that I cannot find any indication to such function in the documentation, but I know that is possible to implement that, there are some websites available that generate text with GPT J few shot learning.

Any help?

Thanks,  
KD
