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

[Bug]: benchmark script #600

Open
songsey opened this issue Jan 15, 2024 · 4 comments
Open

[Bug]: benchmark script #600

songsey opened this issue Jan 15, 2024 · 4 comments

Comments

@songsey
Copy link

songsey commented Jan 15, 2024

Current Behavior

The llm adapter does not fail but it only to generate directly from llm when the similarity threshold is close enough to the maximum distance. It means what you get is either a positive or a negative hit. There is no cache miss. So I'm not sure what it is trying to do with try-except block in the code below ?

https://github.com/zilliztech/GPTCache/blob/main/examples/benchmark/benchmark_sqlite_faiss_onnx.py

Can you update for the benchmark code that you used to generate the figures in the report in the examples folder ?

Expected Behavior

No response

Steps To Reproduce

No response

Environment

No response

Anything else?

No response

@SimFG
Copy link
Collaborator

SimFG commented Jan 16, 2024

@songsey
You can try to reduce the similarity_threshold, such as 0.9 or 0.8, you will get different results.

@songsey
Copy link
Author

songsey commented Jan 16, 2024

It doesn’t seem to me llm adapter is going to raise an exception if it doesn’t meet the theshold requirement?

@SimFG
Copy link
Collaborator

SimFG commented Jan 16, 2024

Got it. When running this script, the network should be disconnected, which means that when you need to access openai, an error will be reported, which means that the cache is invalid.

@songsey
Copy link
Author

songsey commented Jan 16, 2024

Can you check the script with LangChainLLM class ? It doesn’t seem to “disconnect”

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