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

all option is same as openai? #48

Open
dongs0104 opened this issue Jul 9, 2024 · 6 comments
Open

all option is same as openai? #48

dongs0104 opened this issue Jul 9, 2024 · 6 comments

Comments

@dongs0104
Copy link

when i use n option is different as openai.

when i use n it turn to use beam search.

@npuichigo
Copy link
Owner

Sorry, I think I misunderstand the n in trtllm, where I have expected multiple beam would be returned. According to this thread, triton-inference-server/tensorrtllm_backend#499, maybe I need to make multiple requests to return n samples.

@npuichigo
Copy link
Owner

By the way, do you know what choice.index would be like when using stream along with n>1?

@dongs0104
Copy link
Author

thanks for your hard work, i will run it on openai, than attach result :)

@dongs0104
Copy link
Author

dongs0104 commented Jul 10, 2024

By the way, do you know what choice.index would be like when using stream along with n>1?

when i use Open AI API it return n == 2 and stream=True

data: {'choices':[{"delta":{"role":"assistant"}, "finish_reason":null, "index":0}]}
data: {'choices':[{"delta":{"role":"assistant"}, "finish_reason":null, "index":1}]}
data: {'choices':[{"delta":{"content":"A"}, "finish_reason":null, "index":0}]}
data: {'choices':[{"delta":{"content":"A"}, "finish_reason":null, "index":0}]}
...
data: {'choices':[{"delta":{"content":"B"}, "finish_reason":null, "index":1}]}
data: {'choices':[{"delta":{"content":"B"}, "finish_reason":null, "index":1}]}
...
data: [DONE]

@dongs0104
Copy link
Author

dongs0104 commented Nov 12, 2024

@npuichigo they support num_return_sequences on v0.14.0 over

@npuichigo
Copy link
Owner

I did not find this option in https://platform.openai.com/docs/api-reference/chat/create

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