Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/YangLing0818/SuperCorrect-llm
/ functions
Functions
42 in github.com/YangLing0818/SuperCorrect-llm
⨍
Functions
42
◇
Types & classes
5
↓ 4 callers
Function
extract_answer
(pred_str, data_name, use_last_number=True)
parser.py:499
↓ 4 callers
Function
strip_string
(string, skip_unit=False)
parser.py:212
↓ 2 callers
Function
choice_answer_clean
(pred: str)
parser.py:367
↓ 2 callers
Function
generate_completions
(model, tokenizer, prompts, batch_size=1, stop_id_sequences=None, add_special_tokens=True, disable_tqdm=False,
model_utils.py:78
↓ 2 callers
Function
load_data
(data_name, split, data_dir="./dataset")
data_loader.py:9
↓ 2 callers
Function
load_jsonl
(file: Union[str, Path])
utils.py:20
↓ 2 callers
Function
load_prompt
(data_name, prompt_type, num_shots)
utils.py:55
↓ 2 callers
Function
parse_ground_truth
(example: Dict[str, Any], data_name)
parser.py:575
↓ 1 callers
Method
__init__
(self, stop_id_sequences)
model_utils.py:61
↓ 1 callers
Function
_fix_a_slash_b
(string)
parser.py:43
↓ 1 callers
Function
_fix_fracs
(string)
parser.py:11
↓ 1 callers
Function
_fix_sqrt
(string)
parser.py:60
↓ 1 callers
Function
_test_extract_answer
()
parser.py:740
↓ 1 callers
Function
_test_generate_completions
()
model_utils.py:203
↓ 1 callers
Function
clean_units
Clean the units in the number.
parser.py:434
↓ 1 callers
Function
construct_prompt
(example, data_name, args)
utils.py:172
↓ 1 callers
Function
convert_pi_to_number
(code_string)
parser.py:437
↓ 1 callers
Function
convert_word_number
(text: str)
parser.py:65
↓ 1 callers
Function
find_box
(pred_str: str)
parser.py:411
↓ 1 callers
Function
get_examples
()
examples.py:4
↓ 1 callers
Method
get_response
(self, client, prompt, problem)
llm_evaluation.py:23
↓ 1 callers
Function
load_hf_lm_and_tokenizer
( model_name_or_path, tokenizer_name_or_path=None, device_map="auto", load_
model_utils.py:140
↓ 1 callers
Function
lower_keys
(example)
utils.py:41
↓ 1 callers
Function
main
(llm, tokenizer, data_name, args)
eval.py:144
↓ 1 callers
Function
parse_args
()
eval.py:16
↓ 1 callers
Function
parse_question
(example, data_name)
parser.py:654
↓ 1 callers
Function
prepare_data
(data_name, args)
eval.py:57
↓ 1 callers
Method
process_data_in_parallel
(self, data, num_processes)
llm_evaluation.py:61
↓ 1 callers
Function
save_jsonl
(samples, save_path)
utils.py:30
↓ 1 callers
Function
set_seed
(seed: int = 42)
utils.py:13
↓ 1 callers
Function
setup
(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
Function
extract_multi_choice_answer
(pred_str)
parser.py:353
Function
extract_theoremqa_answer
(pred: str, answer_flag: bool = True)
parser.py:459
Method
process_item
(self, item)
llm_evaluation.py:40
Function
run_execute
(executor, result, prompt_type, data_name, execute=False)
parser.py:722
Function
show_sample
(sample, print_all_preds=False)
utils.py:261