forked from SylphAI-Inc/AdalFlow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
45 lines (38 loc) · 1.18 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
from adalflow.components.model_client import GroqAPIClient
from adalflow.components.model_client import OpenAIClient
dspy_save_path = "benchmarks/BHH_object_count/models/dspy"
text_grad_save_path = "benchmarks/BHH_object_count/models/text_grad"
adal_save_path = "benchmarks/BHH_object_count/models/adal"
dspy_hotpot_qa_save_path = "benchmarks/hotpot_qa/models/dspy"
text_grad_hotpot_qa_save_path = "benchmarks/hotpot_qa/models/text_grad"
adal_hotpot_qa_save_path = "benchmarks/hotpot_qa/models/adal"
llama3_model = {
"model_client": GroqAPIClient,
"model_kwargs": {
"model": "llama-3.1-8b-instant",
},
}
gpt_3_model = {
"model_client": OpenAIClient,
"model_kwargs": {
"model": "gpt-3.5-turbo",
"max_tokens": 2000,
"temperature": 0.0,
"top_p": 0.99,
"frequency_penalty": 0,
"presence_penalty": 0,
"stop": None,
},
}
gpt_4o_model = {
"model_client": OpenAIClient,
"model_kwargs": {
"model": "gpt-4o",
"temperature": 0.9,
"top_p": 0.99,
},
}
def load_model(**kwargs):
if "model_client" in kwargs:
kwargs["model_client"] = kwargs["model_client"]()
return kwargs