Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding End-Of-Generation-Token parameter for text generation Inference API #376

Open
aryananumula opened this issue Jan 2, 2024 · 1 comment

Comments

@aryananumula
Copy link

Is your feature request related to a problem? Please describe.
While using the Inference API for a chatbot-style text-generation model, such as openchat-3.5, it is not possible to set an end of generation token.

Describe the solution you'd like
Addition of the end_of_generation_token parameter to the Inference API for text generation models.

Describe alternatives you've considered
Setting max_new_tokens to 1, and then generating new tokens and looking for a certain token to stop at.

Additional context
There is no additional context for this request.

@MichaelVandi
Copy link

You can do something like this

{
    "inputs": "What is Deep Learning?",
    "parameters": {
        "max_new_tokens": 300,
        "stop": ["<|end_of_text|>", "<|endoftext|>", "}"]
    }
}

Where parameters.stop is an array of eos tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants