Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

This model's maximum context length is 8192 tokens - question #516

Closed
dyardy opened this issue May 25, 2024 · 2 comments
Closed

This model's maximum context length is 8192 tokens - question #516

dyardy opened this issue May 25, 2024 · 2 comments

Comments

@dyardy
Copy link

dyardy commented May 25, 2024

Context / Scenario

see below

Question

Running the service on my workstation and running dotnet-webclient sample against the service.

I am seeing the following error.

Is this an error as part of the generation of embeddings?
I am using azure ada model and do not see any limit setting there. In addition, I am not sure how to limit the length limit setting when generating the embeddings.

Ideas? (much appreciated)

[18:00:24.333] warn: Microsoft.KernelMemory.Search.SearchClient[0] No memories available
[18:01:30.133] fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1] An unhandled exception has occurred while executing the request. Azure.RequestFailedException: This model's maximum context length is 8192 tokens. However, your messages resulted in 10383 tokens. Please reduce the length of the messages. Status: 400 (model_error) ErrorCode: context_length_exceeded Content: {
"error": {
"message": "This model's maximum context length is 8192 tokens. However, your messages resulted in 10383 tokens. Please reduce the length of the messages.",
"type": "invalid_request_error",
"param": "messages",
"code": "context_length_exceeded"
}
}

@dyardy dyardy added the question Further information is requested label May 25, 2024
@dyardy dyardy changed the title [Question] This model's maximum context length is 8192 tokens - question May 25, 2024
@dyardy
Copy link
Author

dyardy commented May 25, 2024

Note also when asking any question I also received this error
"Azure.RequestFailedException: This model's maximum context length is 8192 tokens. However, your messages resulted in 11815 tokens. Please reduce the length of the messages.
Status: 400 (model_error)
ErrorCode: context_length_exceeded

Content:
{
"error": {
"message": "This model's maximum context length is 8192 tokens. However, your messages resulted in 11815 tokens. Please reduce the length of the messages.",
"type": "invalid_request_error",
"param": "messages",
"code": "context_length_exceeded"
}
}"

@dyardy
Copy link
Author

dyardy commented May 27, 2024

I resolved the problem by using gpt4 32k. The issue/problem was related to capturing embeddings and the limit was on the initial side of things. It was more that the question was converted to tokens, and on the question side, it was too large.

@dyardy dyardy closed this as completed May 27, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 4, 2024
@dluc dluc converted this issue into discussion #557 Jun 4, 2024
@dluc dluc added discussion and removed question Further information is requested labels Jun 4, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants