-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature] Add support for MiniMax API (#548)
* update requirement * update requirement * update with minimax * update api model * Update readme * fix error --------- Co-authored-by: zhangsongyang <[email protected]>
- Loading branch information
Showing
17 changed files
with
368 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from mmengine.config import read_base | ||
from opencompass.models.minimax import MiniMax | ||
from opencompass.partitioners import NaivePartitioner | ||
from opencompass.runners import LocalRunner | ||
from opencompass.runners.local_api import LocalAPIRunner | ||
from opencompass.tasks import OpenICLInferTask | ||
|
||
with read_base(): | ||
# from .datasets.collections.chat_medium import datasets | ||
from .summarizers.medium import summarizer | ||
from .datasets.ceval.ceval_gen import ceval_datasets | ||
|
||
datasets = [ | ||
*ceval_datasets, | ||
] | ||
|
||
models = [ | ||
dict( | ||
abbr='minimax_abab5.5-chat', | ||
type=MiniMax, | ||
path='abab5.5-chat', | ||
key='xxxxxxx', # please give you key | ||
group_id='xxxxxxxx', # please give your group_id | ||
query_per_second=1, | ||
max_out_len=2048, | ||
max_seq_len=2048, | ||
batch_size=8), | ||
] | ||
|
||
infer = dict( | ||
partitioner=dict(type=NaivePartitioner), | ||
runner=dict( | ||
type=LocalAPIRunner, | ||
max_num_workers=4, | ||
concurrent_users=4, | ||
task=dict(type=OpenICLInferTask)), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
from mmengine.config import read_base | ||
from opencompass.models.xunfei_api import XunFei | ||
from opencompass.partitioners import NaivePartitioner | ||
from opencompass.runners import LocalRunner | ||
from opencompass.runners.local_api import LocalAPIRunner | ||
from opencompass.tasks import OpenICLInferTask | ||
|
||
with read_base(): | ||
# from .datasets.collections.chat_medium import datasets | ||
from .summarizers.medium import summarizer | ||
from .datasets.ceval.ceval_gen import ceval_datasets | ||
|
||
datasets = [ | ||
*ceval_datasets, | ||
] | ||
|
||
models = [ | ||
dict( | ||
abbr='Spark-v1-1', | ||
type=XunFei, | ||
appid="xxxx", | ||
path='ws://spark-api.xf-yun.com/v1.1/chat', | ||
api_secret = "xxxxxxx", | ||
api_key = "xxxxxxx", | ||
query_per_second=1, | ||
max_out_len=2048, | ||
max_seq_len=2048, | ||
batch_size=8), | ||
dict( | ||
abbr='Spark-v3-1', | ||
type=XunFei, | ||
appid="xxxx", | ||
domain='generalv3', | ||
path='ws://spark-api.xf-yun.com/v3.1/chat', | ||
api_secret = "xxxxxxxx", | ||
api_key = "xxxxxxxxx", | ||
query_per_second=1, | ||
max_out_len=2048, | ||
max_seq_len=2048, | ||
batch_size=8), | ||
] | ||
|
||
infer = dict( | ||
partitioner=dict(type=NaivePartitioner), | ||
runner=dict( | ||
type=LocalAPIRunner, | ||
max_num_workers=2, | ||
concurrent_users=2, | ||
task=dict(type=OpenICLInferTask)), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from mmengine.config import read_base | ||
from opencompass.models import ZhiPuAI | ||
from opencompass.partitioners import NaivePartitioner | ||
from opencompass.runners import LocalRunner | ||
from opencompass.runners.local_api import LocalAPIRunner | ||
from opencompass.tasks import OpenICLInferTask | ||
|
||
with read_base(): | ||
# from .datasets.collections.chat_medium import datasets | ||
from .summarizers.medium import summarizer | ||
from .datasets.ceval.ceval_gen import ceval_datasets | ||
|
||
datasets = [ | ||
*ceval_datasets, | ||
] | ||
|
||
models = [ | ||
dict( | ||
abbr='chatglm_pro', | ||
type=ZhiPuAI, | ||
path='chatglm_pro', | ||
key='xxxxxxxxxxxx', | ||
query_per_second=1, | ||
max_out_len=2048, | ||
max_seq_len=2048, | ||
batch_size=8), | ||
] | ||
|
||
infer = dict( | ||
partitioner=dict(type=NaivePartitioner), | ||
runner=dict( | ||
type=LocalAPIRunner, | ||
max_num_workers=2, | ||
concurrent_users=2, | ||
task=dict(type=OpenICLInferTask)), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.