File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
fastchat/serve/monitor/classify Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ task_name:
1313 - creative_writing_v0.1
1414
1515model_name : null
16- name : llama-3-70b-instruct
16+ name : llama-3.1 -70b
1717endpoints :
18- - api_base : null
19- api_key : null
18+ - api_base : https://api.cerebras.ai/v1
19+ api_key : CEREBRAS_API_KEY
2020parallel : 50
2121temperature : 0.0
2222max_token : 512
Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ def get_answer(
108108
109109 for category in categories :
110110 conv = category .pre_process (question ["prompt" ])
111+ start_time = time .time ()
111112 output = chat_completion_openai (
112113 model = model_name ,
113114 messages = conv ,
@@ -116,7 +117,9 @@ def get_answer(
116117 api_dict = api_dict ,
117118 )
118119 # Dump answers
119- category_tag [category .name_tag ] = category .post_process (output )
120+ category_tag [category .name_tag ] = category .post_process (
121+ output
122+ ) | {"completion_time" : round (time .time () - start_time , 5 )}
120123
121124 if testing :
122125 output_log [category .name_tag ] = output
You can’t perform that action at this time.
0 commit comments