Add openfunctionv2 model inference script and fix minor bug #360
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new model handler openfunctions_handler.py to run inference on OS model gorilla-llm/gorilla-openfunctions-v2 and reproduce the results on leaderboard
Issue: #352
Changes
function
is mistakenly put inside the for loop, instead it should be put outside loopTest
Result: https://www.toptal.com/developers/paste-gd/GLTJTe4l
generate evaluation for AST based metrics
🦍 Model: gorilla-llm_gorilla-openfunctions-v2
2024-04-15 18:37:42,909 INFO worker.py:1616 -- Started a local Ray instance. View the dashboard at 127.0.0.1:8265
🔍 Running test: parallel_multiple_function
✅ Test completed: parallel_multiple_function. 🎯 Accuracy: 0.695
2024-04-15 18:37:43,761 INFO worker.py:1454 -- Calling ray.init() again after it has already been called.
2024-04-15 18:37:43,774 INFO worker.py:1454 -- Calling ray.init() again after it has already been called.
🔍 Running test: parallel_function
✅ Test completed: parallel_function. 🎯 Accuracy: 0.845
2024-04-15 18:37:43,813 INFO worker.py:1454 -- Calling ray.init() again after it has already been called.
🔍 Running test: simple
(raylet) /home/jobuser/build/openconnect-lib-core-image/environments/satellites/python/lib/python3.10/site-packages/ray/dashboard/modules/reporter/reporter_agent.py:56: UserWarning:
gpustat
package is not installed. GPU monitoring is not available. To have full functionality of the dashboard please installpip install ray[default]
.)(raylet) warnings.warn(
✅ Test completed: simple. 🎯 Accuracy: 0.845
2024-04-15 18:37:43,854 INFO worker.py:1454 -- Calling ray.init() again after it has already been called.
🔍 Running test: relevance
✅ Test completed: relevance. 🎯 Accuracy: 0.6875
2024-04-15 18:37:43,876 INFO worker.py:1454 -- Calling ray.init() again after it has already been called.
🔍 Running test: multiple_function
✅ Test completed: multiple_function. 🎯 Accuracy: 0.935
Rank,Overall Acc,Model,Model Link,Organization,License,AST Summary,Exec Summary,Simple Function AST,Python Simple Function AST,Java Simple Function AST,JavaScript Simple Function AST,Multiple Functions AST,Parallel Functions AST,Parallel Multiple AST,Simple Function Exec,Python Simple Function Exec,REST Simple Function Exec,Multiple Functions Exec,Parallel Functions Exec,Parallel Multiple Exec,Relevance Detection,Cost ($ Per 1k Function Calls),Latency Mean (s),Latency Standard Deviation (s),Latency 95th Percentile (s)
1,80.48%,Gorilla-OpenFunctions-v2 (FC) from HuggingFace,https://huggingface.co/gorilla-llm/gorilla-openfunctions-v2,Gorilla LLM,Apache 2.0,83.00%,0.00%,84.50%,84.50%,0.00%,0.00%,93.50%,84.50%,69.50%,0.00%,0.00%,0.00%,0.00%,0.00%,0.00%,68.75%,N/A,N/A,N/A,N/A