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

When the input contains end_id, the last character of output is repeated. #113

Open
PAOPAO6 opened this issue Nov 9, 2023 · 3 comments
Open
Assignees
Labels
triaged Issue has been triaged by maintainers

Comments

@PAOPAO6
Copy link

PAOPAO6 commented Nov 9, 2023

model: baichuan1 13b
enable inflight_fused_batching

good case post:
curl -X POST 10.60.133.200:8030/v2/models/ensemble/generate -d '{"max_tokens": 90, "bad_words": "", "stop_words": "", "text_input": "What is machine learning?"}'

reponse:
{"model_name":"ensemble","model_version":"1","sequence_end":false,"sequence_id":0,"sequence_start":false,"text_output":" What is machine learning?\nMachine learning is a branch of artificial intelligence that focuses on developing algorithms that can learn from data and improve performance over time. It is a subset of artificial intelligence that focuses on the development of algorithms that can learn from data and improve performance over time. Machine learning algorithms are used to identify patterns in data and make predictions based on those patterns.</s>100% of the"}

bad case post:
curl -X POST 10.60.133.200:8030/v2/models/ensemble/generate -d '{"max_tokens": 90, "bad_words": "", "stop_words": "", "end_id": 2, "text_input": "What is machine learning?"}'

reponse:
{"model_name":"ensemble","model_version":"1","sequence_end":false,"sequence_id":0,"sequence_start":false,"text_output":"What is machine learning?\nMachine learning is a branch of artificial intelligence that focuses on developing algorithms that can learn from data and improve performance over time. It is a subset of artificial intelligence that focuses on the development of algorithms that can learn from data and improve performance over time. Machine learning algorithms are used to identify patterns in data and make predictions based on those patterns.."}

@PAOPAO6
Copy link
Author

PAOPAO6 commented Nov 9, 2023

@byshiue

@BasicCoder
Copy link

The latest main branch already supports the exclude_input_in_output parameter. If you are using an old version, may be you can reference this #95. this code, the seq_len-1 can get the truth output.

@byshiue byshiue self-assigned this Nov 10, 2023
@byshiue byshiue added the triaged Issue has been triaged by maintainers label Nov 10, 2023
@PAOPAO6
Copy link
Author

PAOPAO6 commented Nov 14, 2023

The latest main branch already supports the exclude_input_in_output parameter. If you are using an old version, may be you can reference this #95. this code, the seq_len-1 can get the truth output.

think you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants