MCPcopy Create free account

hub / github.com/YangLing0818/SuperCorrect-llm / functions

Functions42 in github.com/YangLing0818/SuperCorrect-llm

↓ 4 callersFunctionextract_answer
(pred_str, data_name, use_last_number=True)
parser.py:499
↓ 4 callersFunctionstrip_string
(string, skip_unit=False)
parser.py:212
↓ 2 callersFunctionchoice_answer_clean
(pred: str)
parser.py:367
↓ 2 callersFunctiongenerate_completions
(model, tokenizer, prompts, batch_size=1, stop_id_sequences=None, add_special_tokens=True, disable_tqdm=False,
model_utils.py:78
↓ 2 callersFunctionload_data
(data_name, split, data_dir="./dataset")
data_loader.py:9
↓ 2 callersFunctionload_jsonl
(file: Union[str, Path])
utils.py:20
↓ 2 callersFunctionload_prompt
(data_name, prompt_type, num_shots)
utils.py:55
↓ 2 callersFunctionparse_ground_truth
(example: Dict[str, Any], data_name)
parser.py:575
↓ 1 callersMethod__init__
(self, stop_id_sequences)
model_utils.py:61
↓ 1 callersFunction_fix_a_slash_b
(string)
parser.py:43
↓ 1 callersFunction_fix_fracs
(string)
parser.py:11
↓ 1 callersFunction_fix_sqrt
(string)
parser.py:60
↓ 1 callersFunction_test_extract_answer
()
parser.py:740
↓ 1 callersFunction_test_generate_completions
()
model_utils.py:203
↓ 1 callersFunctionclean_units
Clean the units in the number.
parser.py:434
↓ 1 callersFunctionconstruct_prompt
(example, data_name, args)
utils.py:172
↓ 1 callersFunctionconvert_pi_to_number
(code_string)
parser.py:437
↓ 1 callersFunctionconvert_word_number
(text: str)
parser.py:65
↓ 1 callersFunctionfind_box
(pred_str: str)
parser.py:411
↓ 1 callersFunctionget_examples
()
examples.py:4
↓ 1 callersMethodget_response
(self, client, prompt, problem)
llm_evaluation.py:23
↓ 1 callersFunctionload_hf_lm_and_tokenizer
( model_name_or_path, tokenizer_name_or_path=None, device_map="auto", load_
model_utils.py:140
↓ 1 callersFunctionlower_keys
(example)
utils.py:41
↓ 1 callersFunctionmain
(llm, tokenizer, data_name, args)
eval.py:144
↓ 1 callersFunctionparse_args
()
eval.py:16
↓ 1 callersFunctionparse_question
(example, data_name)
parser.py:654
↓ 1 callersFunctionprepare_data
(data_name, args)
eval.py:57
↓ 1 callersMethodprocess_data_in_parallel
(self, data, num_processes)
llm_evaluation.py:61
↓ 1 callersFunctionsave_jsonl
(samples, save_path)
utils.py:30
↓ 1 callersFunctionset_seed
(seed: int = 42)
utils.py:13
↓ 1 callersFunctionsetup
(args)
eval.py:103
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs)
model_utils.py:15
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs)
model_utils.py:40
Method__call__
(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs)
model_utils.py:65
Method__init__
(self, api_key, base_url="https://api.openai.com/v1/")
llm_evaluation.py:19
Method__init__
(self, keywords_str, tokenizer)
model_utils.py:10
Method__init__
(self, stop_id_sequences, prompt_length)
model_utils.py:35
Functionextract_multi_choice_answer
(pred_str)
parser.py:353
Functionextract_theoremqa_answer
(pred: str, answer_flag: bool = True)
parser.py:459
Methodprocess_item
(self, item)
llm_evaluation.py:40
Functionrun_execute
(executor, result, prompt_type, data_name, execute=False)
parser.py:722
Functionshow_sample
(sample, print_all_preds=False)
utils.py:261