Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ML-GSAI/LLaDA
/ functions
Functions
3,438 in github.com/ML-GSAI/LLaDA
⨍
Functions
3,438
◇
Types & classes
889
↳
Endpoints
19
↓ 6 callers
Method
tokenize
(self, text)
opencompass/opencompass/datasets/lawbench/utils/modules/tokenization.py:121
↓ 6 callers
Function
truncatefn
(s, length=300)
opencompass/opencompass/datasets/livecodebench/testing_util.py:22
↓ 5 callers
Function
_check_type_list
(obj, typelist: List)
opencompass/opencompass/utils/types.py:22
↓ 5 callers
Function
_convert_chat_messages
(inputs, merge_role=True, skip_empty_prompt=True)
opencompass/opencompass/models/dllm.py:461
↓ 5 callers
Function
_get_possible_max_seq_len
(max_seq_len, path)
opencompass/opencompass/models/huggingface_above_v4_33.py:45
↓ 5 callers
Method
_get_ppl
Get perplexity scores given a list of inputs. Args: inputs (List[str]): A list of strings. mask_length (Optional[List
opencompass/opencompass/models/huggingface.py:484
↓ 5 callers
Function
calc_scores_f1
(dict_gt, dict_pred)
opencompass/opencompass/datasets/medbench/medbench.py:417
↓ 5 callers
Function
estimator
(n: int, c: int, k: int)
opencompass/opencompass/datasets/codecompass/metrics.py:7
↓ 5 callers
Method
exec_code
(self, code_piece: str)
opencompass/opencompass/lagent/actions/python_interpreter.py:26
↓ 5 callers
Method
format
Generate the ReAct format prompt. Args: chat_history (List[Dict]): The history log in previous runs. inner_step (List
opencompass/opencompass/lagent/agents/react.py:19
↓ 5 callers
Function
get_number
(options)
opencompass/opencompass/datasets/kaoshi.py:12
↓ 5 callers
Method
get_output_paths
Get the paths to the output files. Every file should exist if the task succeeds. Args: file_extension (str): The file ext
opencompass/opencompass/tasks/base.py:103
↓ 5 callers
Function
load
(f, *args, **kwargs)
opencompass/opencompass/utils/fileio.py:258
↓ 5 callers
Method
load
(path)
opencompass/opencompass/datasets/hellaswag.py:17
↓ 5 callers
Function
multi_choice_judge
(prediction, option_list, answer_token)
opencompass/opencompass/datasets/lawbench/utils/function_utils.py:11
↓ 5 callers
Function
post_process
(dataset_name, setting_name, prediction)
opencompass/opencompass/datasets/agieval/post_process.py:180
↓ 5 callers
Function
removeprefix
(s, prefix)
opencompass/opencompass/datasets/PMMEval/mifeval_utils/detectable_format_checker.py:5
↓ 5 callers
Function
safe_format
Safely formats a string with the given keyword arguments. If a keyword is not found in the string, it will be ignored. Args: input_st
opencompass/opencompass/utils/prompt.py:11
↓ 5 callers
Method
save_results
(self, origin_prompt, prediction, idx, gold=None)
opencompass/opencompass/openicl/icl_inferencer/icl_base_inferencer.py:114
↓ 5 callers
Method
summarize
Summarize the results of the tasks. Args: status (list[tuple[str, int]]): A list of (task name, exit code).
opencompass/opencompass/runners/base.py:54
↓ 5 callers
Function
visualize
(df_raw, save_path: str,model_name: str ,dataset_type:str)
opencompass/opencompass/summarizers/needlebench.py:274
↓ 4 callers
Method
__init__
(self)
opencompass/opencompass/datasets/smolinstruct.py:353
↓ 4 callers
Method
__init__
(self, label, children=None, node_type='other')
opencompass/opencompass/datasets/phybench/EED.py:206
↓ 4 callers
Function
_convert_base_messages
(inputs)
opencompass/opencompass/models/huggingface_above_v4_33.py:496
↓ 4 callers
Method
_encode_template
Encode the raw template given in the config into a str or a PromptList. Args: prompt_template (List[Dict]] or str): The r
opencompass/opencompass/openicl/icl_prompt_template.py:209
↓ 4 callers
Method
build_description
(self)
opencompass/opencompass/datasets/IFEval/instructions.py:899
↓ 4 callers
Function
build_from_cfg
A helper function that builds object with MMEngine's new config.
opencompass/opencompass/registry.py:49
↓ 4 callers
Function
calculate_elementwise_average
(model_name, merged_df, mean=False)
opencompass/opencompass/summarizers/needlebench.py:111
↓ 4 callers
Function
computeFScore
(tp, fp, fn, beta)
opencompass/opencompass/datasets/lawbench/utils/compare_m2_for_evaluation.py:356
↓ 4 callers
Function
compute_rouge
(hyps, refs)
opencompass/opencompass/datasets/lawbench/utils/function_utils.py:32
↓ 4 callers
Function
convert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
opencompass/opencompass/datasets/lawbench/utils/modules/tokenization.py:84
↓ 4 callers
Function
extract_boxed_answer
(pred_str, strip_double_curly_brace=False)
opencompass/opencompass/datasets/math.py:54
↓ 4 callers
Function
extract_last_line
(string)
opencompass/opencompass/datasets/agieval/post_process.py:8
↓ 4 callers
Function
extract_role_pred
Extract the role prediction from the full prediction string. The role prediction may be the substring between the begin and end string. Args:
opencompass/opencompass/tasks/base.py:12
↓ 4 callers
Function
floatify
(num: str)
opencompass/opencompass/datasets/TheoremQA/number_utils.py:7
↓ 4 callers
Function
format_load
Format the raw data into the format that can be evaluated. Args: raw_data (str): The raw data. start_character (str, optional): T
opencompass/opencompass/datasets/teval/utils/format_load.py:3
↓ 4 callers
Function
generate
Args: model: Mask predictor. prompt: A tensor of shape (1, L). steps: Sampling steps, less than or equal to gen_length.
generate.py:44
↓ 4 callers
Method
generate
Generate results given a list of inputs. Args: inputs (List[str]): A list of strings. max_out_len (int): The maximum
opencompass/opencompass/models/vllm.py:64
↓ 4 callers
Method
generate_ice_item
Generate in-context example based on the provided :obj:`entry` data. Args: entry (:obj:`Dict`): A piece of data to be used for ge
opencompass/opencompass/openicl/icl_prompt_template.py:71
↓ 4 callers
Method
generate_input_field_corpus
Generate corpus for input field. Args: dataset (:obj:`Dataset` or :obj:`DatasetDict`): A :obj:`datasets.Dataset`
opencompass/opencompass/openicl/icl_dataset_reader.py:117
↓ 4 callers
Function
get_definition_name
(node: Node)
opencompass/opencompass/datasets/bigcodebench/extractor.py:81
↓ 4 callers
Method
get_labels
Get the labels of the dataset, especially useful for ppl inferencer. If `ice_template` is provided, the labels will be the keys of the
opencompass/opencompass/openicl/icl_retriever/icl_base_retriever.py:47
↓ 4 callers
Method
get_ppl
Get perplexity scores given a list of inputs. Args: inputs (List[str]): A list of strings. mask_length (Optional[List
opencompass/opencompass/models/turbomind.py:158
↓ 4 callers
Method
get_ppl_from_template
Get perplexity given a list of templates. Args: templates (List[PromptType]): A list of templates. mask_length (List[
opencompass/opencompass/models/base.py:163
↓ 4 callers
Method
get_token
Get a token from the bucket.
opencompass/opencompass/models/base_api.py:448
↓ 4 callers
Function
highlight
(row: List[str], meta_col_count: int = META_COL_COUNT)
opencompass/opencompass/summarizers/multi_model.py:89
↓ 4 callers
Method
load
(path: str, local_mode: bool = False)
opencompass/opencompass/datasets/mbpp.py:29
↓ 4 callers
Method
load
Load the dataset using shared .
opencompass/opencompass/datasets/korbench/korbench.py:20
↓ 4 callers
Method
load
(path: str, prompt_mode: str, discipline: str = None, field: str = None
opencompass/opencompass/datasets/supergpqa/supergpqa.py:32
↓ 4 callers
Method
load
(self, path: str, name: str, alignment_bench_config_path: Optional[str]
opencompass/opencompass/datasets/subjective/alignbench.py:97
↓ 4 callers
Method
load_single
(source_file, desc_list)
opencompass/opencompass/datasets/rolebench.py:16
↓ 4 callers
Function
lower
(text)
opencompass/opencompass/datasets/lveval/evaluators.py:160
↓ 4 callers
Method
match_any_label
(self, pred, test_item)
opencompass/opencompass/datasets/custom.py:32
↓ 4 callers
Function
merge_dataframes
(model_name, dataset_abbrs, parsed_data)
opencompass/opencompass/summarizers/needlebench.py:396
↓ 4 callers
Function
normalize_answer
(text, unit)
opencompass/opencompass/datasets/tabmwp.py:61
↓ 4 callers
Function
parse_molecule
(molecular_formula)
opencompass/opencompass/datasets/smolinstruct.py:52
↓ 4 callers
Method
parse_template
Parse the intermidate prompt template, and wrap it with meta template if applicable. When the meta template is set and the input is a
opencompass/opencompass/models/base_api.py:193
↓ 4 callers
Method
print_for_gpt
Complex print function. We often use it as print_for_gpt(pad_space=1, pad_char='> ') However, more complex arguments can be used to
opencompass/opencompass/datasets/musr/tree.py:293
↓ 4 callers
Method
pronunciation_similarity
>>> c = CharFuncs('data/char_meta.txt') >>> c.pronunciation_similarity('牛', '午') 0.27999999999999997 >>> c.pronunciat
opencompass/opencompass/datasets/lawbench/utils/char_smi.py:302
↓ 4 callers
Function
remove_command
(s, command, keep_inside=False)
opencompass/opencompass/datasets/phybench/latex_pre_process.py:108
↓ 4 callers
Function
remove_non_alphanumeric
(s)
opencompass/opencompass/datasets/korbench/korbench_utils.py:397
↓ 4 callers
Function
remove_non_alphanumeric
(s)
opencompass/opencompass/datasets/supergpqa/supergpqa_utils.py:397
↓ 4 callers
Function
remove_punc
(text)
opencompass/opencompass/datasets/lveval/evaluators.py:156
↓ 4 callers
Function
safe_regex_search
(pattern, text, flags=0)
opencompass/opencompass/datasets/supergpqa/supergpqa_eval.py:8
↓ 4 callers
Function
scale_and_offset
Convert ratings from the natural scale to the Elo rating scale with an anchored baseline.
opencompass/opencompass/summarizers/subjective/compass_arena_bradley_terry.py:277
↓ 4 callers
Method
shape_similarity
>>> c = CharFuncs('data/char_meta.txt') >>> c.shape_similarity('牛', '午') 0.8571428571428572 >>> c.shape_similarity('田
opencompass/opencompass/datasets/lawbench/utils/char_smi.py:248
↓ 4 callers
Function
tree_edit_distance
We use APTED algorithm proposed by M. Pawlik and N. Augsten github link: https://github.com/DatabaseGroup/apted
opencompass/opencompass/datasets/lawbench/utils/char_smi.py:39
↓ 3 callers
Method
_call
(self, command: str, timeout: Optional[int] = None)
opencompass/opencompass/lagent/actions/ipython_interpreter.py:125
↓ 3 callers
Method
_evaluate
(self, data_sample)
opencompass/opencompass/datasets/teval/evaluators/review_evaluator.py:71
↓ 3 callers
Method
_format_raw_txt
(self, raw_results)
opencompass/opencompass/summarizers/needlebench.py:491
↓ 3 callers
Function
_format_with_fast_chat_template
(inputs: List[str], name: str='vicuna')
opencompass/opencompass/models/huggingface_above_v4_33.py:92
↓ 3 callers
Function
_get_meta_template
(meta_template)
opencompass/opencompass/models/dllm.py:22
↓ 3 callers
Method
_preprocess_messages
Preprocess input into messages format and calculate max output length. Args: input: Input prompt as string or PromptList
opencompass/opencompass/models/openai_api.py:486
↓ 3 callers
Method
_process_answer
(self, text)
opencompass/opencompass/datasets/mbpp.py:309
↓ 3 callers
Method
_process_results
Process the evaluation results. Args: outputs (list): List of evaluation results for each test case. prompts (list): L
opencompass/opencompass/openicl/icl_evaluator/code_evaluator.py:160
↓ 3 callers
Method
_set_default_value
(self, cfg: ConfigDict, key: str, value: Any)
opencompass/opencompass/tasks/openicl_infer.py:144
↓ 3 callers
Method
batch_encode
(self, input_texts: Union[str, List[str]], max_seq_len: int,
opencompass/opencompass/models/interntrain.py:455
↓ 3 callers
Function
bold
(text)
opencompass/opencompass/summarizers/multi_model.py:24
↓ 3 callers
Function
calc_nlg_task_scores
(list_structured_golden, list_structured_predict)
opencompass/opencompass/datasets/medbench/medbench.py:367
↓ 3 callers
Function
calc_tree_size
Calculate the size of a subtree based on its total insertion cost. The function computes the size of a subtree by summing up the insertion
opencompass/opencompass/datasets/phybench/EED.py:73
↓ 3 callers
Method
chat
(self, message: str)
opencompass/opencompass/lagent/agents/react.py:95
↓ 3 callers
Method
compute_exact
(a_gold, a_pred)
opencompass/opencompass/datasets/lawbench/utils/rc_f1.py:65
↓ 3 callers
Function
convert_to_unicode
Converts `text` to Unicode (if it's not already), assuming utf-8 input.
opencompass/opencompass/datasets/lawbench/utils/modules/tokenization.py:26
↓ 3 callers
Method
do_predictions_postprocess
(self, model_output, answer_lenth=None)
opencompass/opencompass/datasets/kaoshi.py:49
↓ 3 callers
Method
do_predictions_postprocess
(self, model_output, answer_lenth=None)
opencompass/opencompass/datasets/GaokaoBench.py:44
↓ 3 callers
Method
estimator
Calculates 1 - comb(n - c, k) / comb(n, k).
opencompass/opencompass/datasets/humaneval_multi.py:133
↓ 3 callers
Function
evaluate_response_vs_answer
(response, answer, question_type, rule_id, idx)
opencompass/opencompass/datasets/korbench/korbench_utils.py:563
↓ 3 callers
Function
evaluate_response_vs_answer
(response, answer, question_type, rule_id, idx)
opencompass/opencompass/datasets/supergpqa/supergpqa_utils.py:563
↓ 3 callers
Function
evaluate_responses
(data, mode, base_path=None)
opencompass/opencompass/datasets/korbench/korbench_utils.py:662
↓ 3 callers
Function
extract_code
(text)
opencompass/opencompass/lagent/actions/ipython_interpreter.py:255
↓ 3 callers
Function
extract_inner_text_from_brackets
(text)
opencompass/opencompass/datasets/korbench/korbench_utils.py:358
↓ 3 callers
Function
extract_inner_text_from_brackets
(text)
opencompass/opencompass/datasets/supergpqa/supergpqa_utils.py:358
↓ 3 callers
Function
extract_last_line
(string)
opencompass/opencompass/datasets/medbench/post_process.py:8
↓ 3 callers
Function
extract_option_content
(text, options_content=None)
opencompass/opencompass/datasets/supergpqa/supergpqa_eval.py:60
↓ 3 callers
Function
extract_option_labels
(text, options='ABCDEFGHIJ')
opencompass/opencompass/datasets/supergpqa/supergpqa_eval.py:19
↓ 3 callers
Function
find_file
Find the first available file with given extensions.
opencompass/opencompass/datasets/supergpqa/supergpqa_utils.py:30
↓ 3 callers
Function
first_option_postprocess
Find first valid option for text.
opencompass/opencompass/utils/text_postprocessors.py:73
↓ 3 callers
Method
from_json
(cls, js)
opencompass/opencompass/datasets/musr/tree.py:153
↓ 3 callers
Function
get_all_possible_patterns
(option_keys)
opencompass/opencompass/datasets/circular.py:35
↓ 3 callers
Function
get_circular_patterns
(option_keys)
opencompass/opencompass/datasets/circular.py:26
← previous
next →
101–200 of 3,438, ranked by callers