Skip to content
Snippets Groups Projects
Commit a089b403 authored by Benoit Favre's avatar Benoit Favre
Browse files

add gpt-4 result

parent 29404f50
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@ gpt-3.5-turbo-0301.run2 0.4551
gpt-3.5-turbo-0301 0.4038
text-curie-001 0.1217
text-davinci-003 0.2884
gpt-4 0.7788
FrenchMedMCQA: A French Multiple-Choice Question Answering Dataset for Medical domain
......
This diff is collapsed.
This diff is collapsed.
......@@ -5,7 +5,7 @@ import backoff
openai.api_key = OPENAI_TOKEN
openai_lm_models = ['text-davinci-003', 'text-davinci-002', 'code-davinci-002', 'code-cushman-001', 'text-curie-001', 'text-babbage-001', 'text-ada-001', 'davinci', 'curie', 'babage', 'ada']
openai_chat_models = ['gpt-3.5-turbo-0301', 'gpt-3.5-turbo']
openai_chat_models = ['gpt-3.5-turbo-0301', 'gpt-3.5-turbo', 'gpt-4', 'gpt-4-0314', 'gpt-4-32k', 'gpt-4-32k-0314']
@backoff.on_exception(backoff.expo, (openai.error.RateLimitError, openai.error.APIError))
def openai_complete(prompt, model='text-davinci-003'):
......@@ -40,6 +40,7 @@ def main(result_path: str, corpus_path: str, model: str = 'openai/gpt-3.5-turbo-
def generate(input_string):
if api == 'openai':
if llm in openai_chat_models:
#print('This is a chat model')
return openai_chat(input_string, llm)
else:
return openai_complete(input_string, llm)
......
......@@ -8,6 +8,8 @@ python run_opt-iml.py output/opt-iml-30b_prompt0.txt ../json/dev.json opt-iml-30
python run_api.py output/code-cushman-001_prompt0.txt ../json/dev.json openai/code-cushman-001 | tee logs/code-cushman-001_prompt0.txt
python run_api.py output/code-davinci-002_prompt0.txt ../json/dev.json openai/code-davinci-002 | tee logs/code-davinci-002_prompt0.txt
python run_api.py output/gpt-4-0314_prompt0.txt ../json/dev.json openai/gpt-4-0314 | tee logs/gpt-4-0314_prompt0.txt
python run_api.py output/j1-jumbo_prompt0.txt ../json/dev.json ai21/j1-jumbo | tee logs/j1-jumbo_prompt0.txt
python run_bloomz.py output/en_bloomz-560m_prompt0.txt ../json/dev-en.json bloomz-560m en/0 | tee logs/en_bloomz-560m_prompt0.txt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment