This repository provides an example of how to use a customized API model within OpenCompass.
Configure API Settings Set your
API_BASEandKEYin the following files:my_api.py./mymode/default.py
Integrate Your API Model
Copy
my_api.pyto<your_package_path>/opencompass/models.Add the following import statement to
<your_package_path>/opencompass/models/__init__.pyfrom .my_apiimportMyModelAPI
Copy Configuration Files Copy the
./mymodedirectory to<your_package_path>/opencompass/configs/models.Run Your Process Execute your process with a command like:
opencompass example_gsm8k.py
- OpenCompass GitHub Repository: OpenCompass is an LLM evaluation platform supporting a wide range of models (Llama3, Mistral, InternLM2, GPT-4, LLaMa2, Qwen, GLM, Claude, etc.) across 100+ datasets.
- OpenCompass Documentation: Comprehensive documentation for OpenCompass 0.5.0.