pseudotensor commited on
Commit
ce8ae40
1 Parent(s): 5f5e828

Update with h2oGPT hash e95264ef109b874d951ede593714966674c4e463

Browse files
Files changed (1) hide show
  1. evaluate_params.py +47 -0
evaluate_params.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ no_default_param_names = [
2
+ 'instruction',
3
+ 'iinput',
4
+ 'context',
5
+ 'instruction_nochat',
6
+ 'iinput_nochat',
7
+ ]
8
+
9
+ gen_hyper = ['temperature',
10
+ 'top_p',
11
+ 'top_k',
12
+ 'num_beams',
13
+ 'max_new_tokens',
14
+ 'min_new_tokens',
15
+ 'early_stopping',
16
+ 'max_time',
17
+ 'repetition_penalty',
18
+ 'num_return_sequences',
19
+ 'do_sample',
20
+ ]
21
+
22
+ eval_func_param_names = ['instruction',
23
+ 'iinput',
24
+ 'context',
25
+ 'stream_output',
26
+ 'prompt_type',
27
+ 'prompt_dict'] + \
28
+ gen_hyper + \
29
+ ['chat',
30
+ 'instruction_nochat',
31
+ 'iinput_nochat',
32
+ 'langchain_mode',
33
+ 'langchain_action',
34
+ 'top_k_docs',
35
+ 'chunk',
36
+ 'chunk_size',
37
+ 'document_choice',
38
+ ]
39
+
40
+ # form evaluate defaults for submit_nochat_api
41
+ eval_func_param_names_defaults = eval_func_param_names.copy()
42
+ for k in no_default_param_names:
43
+ if k in eval_func_param_names_defaults:
44
+ eval_func_param_names_defaults.remove(k)
45
+
46
+
47
+ eval_extra_columns = ['prompt', 'response', 'score']