MCPcopy Create free account

hub / github.com/LHRLAB/ChatKBQA / functions

Functions419 in github.com/LHRLAB/ChatKBQA

↓ 55 callersFunctionload_json
(fname, mode="r", encoding="utf8")
components/utils.py:20
↓ 34 callersMethodupdate
(self, val, n=1)
LLMs/LLaMA/src/llmtuner/extras/misc.py:23
↓ 30 callersFunctiondump_json
(obj, fname, indent=4, mode='w' ,encoding="utf8", ensure_ascii=False)
components/utils.py:27
↓ 18 callersFunctionregister_template
( name: str, prefix: List[Union[str, Dict[str, str]]], prompt: List[Union[str, Dict[str, str]]],
LLMs/LLaMA/src/llmtuner/extras/template.py:182
↓ 16 callersFunctionexecute_query_with_odbc
(query:str)
executor/sparql_executor.py:52
↓ 14 callersMethodtextual_form
(self)
components/expr_parser.py:121
↓ 13 callersFunctionget_logger
(name: str)
LLMs/LLaMA/src/llmtuner/extras/logging.py:31
↓ 13 callersFunctioninitialize_odbc_connection
()
executor/sparql_executor.py:25
↓ 10 callersFunctionget_root
(var: int)
executor/logic_form_util_cwq.py:425
↓ 10 callersFunctionget_root
(var: int)
executor/logic_form_util.py:425
↓ 9 callersFunctionget_save_dir
(*args)
LLMs/LLaMA/src/llmtuner/webui/common.py:19
↓ 8 callersMethod__init__
(self, data_type, fields)
components/expr_parser.py:118
↓ 8 callersFunctionlisp_to_sparql
(lisp_program: str)
executor/logic_form_util_cwq.py:388
↓ 8 callersMethodto_dict
(self)
LLMs/LLaMA/src/llmtuner/hparams/generating_args.py:47
↓ 7 callersMethodbuild
(cls, tok, data_type, fields)
components/expr_parser.py:43
↓ 7 callersFunctionget_label_with_odbc
Get the label of an entity in Freebase
executor/sparql_executor.py:804
↓ 7 callersFunctionlisp_to_sparql
(lisp_program: str)
executor/logic_form_util.py:388
↓ 7 callersFunctionload_model_and_tokenizer
r""" Loads pretrained model and tokenizer. Support both training and inference.
LLMs/LLaMA/src/llmtuner/tuner/core/loader.py:49
↓ 6 callersMethod_convert_inputs_to_ids
r""" Converts context to token ids.
LLMs/LLaMA/src/llmtuner/extras/template.py:122
↓ 6 callersFunctiondump_json
(obj, fname, indent=4, mode='w' ,encoding="utf8", ensure_ascii=False)
executor/sparql_executor.py:1020
↓ 6 callersFunctionget_model_path
(model_name: str)
LLMs/LLaMA/src/llmtuner/webui/common.py:46
↓ 6 callersMethodsave_model
r""" Saves model checkpoint. Subclass and override to inject custom behavior.
LLMs/LLaMA/src/llmtuner/tuner/ppo/trainer.py:300
↓ 5 callersFunctionget_dataset
( model_args: "ModelArguments", data_args: "DataArguments" )
LLMs/LLaMA/src/llmtuner/dsets/loader.py:17
↓ 5 callersFunctionload_config
()
LLMs/LLaMA/src/llmtuner/webui/common.py:27
↓ 5 callersFunctionload_json
(fname, mode="r", encoding="utf8")
executor/sparql_executor.py:1013
↓ 5 callersFunctionplot_loss
(save_dictionary: os.PathLike, keys: Optional[List[str]] = ["loss"])
LLMs/LLaMA/src/llmtuner/extras/ploting.py:28
↓ 5 callersFunctionpreprocess_dataset
( dataset: Union["Dataset", "IterableDataset"], tokenizer: "PreTrainedTokenizer", data_args: "Data
LLMs/LLaMA/src/llmtuner/dsets/preprocess.py:15
↓ 4 callersMethod_initialize
( self, lang: str, model_name: str, dataset: List[str] )
LLMs/LLaMA/src/llmtuner/webui/runner.py:34
↓ 4 callersMethod_pad_tensors_to_target_len
r""" Pads the tensor to the same length as the target tensor.
LLMs/LLaMA/src/llmtuner/tuner/sft/trainer.py:62
↓ 4 callersFunctionconstruct_example
(examples: Dict[str, List[Any]])
LLMs/LLaMA/src/llmtuner/dsets/preprocess.py:28
↓ 4 callersMethodencode_oneturn
r""" Returns a single pair of token ids representing prompt and response respectively.
LLMs/LLaMA/src/llmtuner/extras/template.py:25
↓ 4 callersFunctionget_symbol_type
(symbol: str)
executor/logic_form_util_cwq.py:65
↓ 4 callersFunctionget_symbol_type
(symbol: str)
executor/logic_form_util.py:65
↓ 4 callersMethodlogical_form
(self)
components/expr_parser.py:63
↓ 4 callersFunctionnone_function
(G, start, arg_node=None, type_constraint=True)
executor/logic_form_util_cwq.py:279
↓ 4 callersFunctionnone_function
(G, start, arg_node=None, type_constraint=True)
executor/logic_form_util.py:279
↓ 4 callersFunctionnormalize_entity_name
(name)
entity_retrieval/aqqu_util.py:5
↓ 4 callersMethodparse_assert
(self, eval)
parse_sparql_webqsp.py:387
↓ 4 callersMethodparse_assert
(self, eval)
parse_sparql_cwq.py:380
↓ 4 callersMethodreset
(self)
LLMs/LLaMA/src/llmtuner/extras/misc.py:17
↓ 4 callersFunctionrun
(command)
Freebase-Setup/virtuoso.py:20
↓ 4 callersFunctionsplit_dataset
( dataset: Union["Dataset", "IterableDataset"], data_args: "DataArguments", training_args: "Traini
LLMs/LLaMA/src/llmtuner/dsets/utils.py:38
↓ 3 callersFunctioncwq_evaluate_valid_results
Compute P, R and F1 for CWQ
generation/cwq_evaluate.py:8
↓ 3 callersFunctionexecute_query
(query: str)
executor/sparql_executor.py:37
↓ 3 callersFunctionextract_mentioned_entities_from_sparql
extract entity from sparql
components/utils.py:71
↓ 3 callersFunctionget_logits_processor
()
LLMs/LLaMA/src/llmtuner/extras/misc.py:52
↓ 3 callersFunctionget_types_with_odbc
(entity: str)
executor/sparql_executor.py:75
↓ 3 callersFunctionisqlPort
(port)
Freebase-Setup/virtuoso.py:17
↓ 3 callersFunctionlisp_to_nested_expression
Takes a logical form as a lisp string and returns a nested list representation of the lisp. For example, "(count (division first))" would get
executor/logic_form_util_cwq.py:44
↓ 3 callersFunctionlisp_to_nested_expression
Takes a logical form as a lisp string and returns a nested list representation of the lisp. For example, "(count (division first))" would get
executor/logic_form_util.py:44
↓ 3 callersFunctionparse_s_expr
(expr)
components/expr_parser.py:233
↓ 3 callersMethodprocess_args
( self, query: str, history: Optional[List[Tuple[str, str]]] = None, system: O
LLMs/LLaMA/src/llmtuner/chat/stream_chat.py:21
↓ 3 callersMethodstream_chat
( self, query: str, history: Optional[List[Tuple[str, str]]] = None, system: O
LLMs/LLaMA/src/llmtuner/chat/stream_chat.py:115
↓ 3 callersFunctiontokenize_s_expr
(expr)
components/expr_parser.py:3
↓ 3 callersFunctiontorch_gc
r""" Collects GPU memory.
LLMs/LLaMA/src/llmtuner/extras/misc.py:58
↓ 3 callersFunctionwebqsp_evaluate_valid_results
(args)
generation/webqsp_evaluate_offcial.py:17
↓ 2 callersFunctionFindInList
(entry,elist)
generation/webqsp_evaluate_offcial.py:28
↓ 2 callersMethod__init__
(self, name, value)
entity_retrieval/aqqu_entity_linker.py:60
↓ 2 callersMethod_encode
r""" Encodes formatted inputs to pairs of token ids. Turn 0: bos + prefix + sep + query resp + eos Turn t: sep + bos + quer
LLMs/LLaMA/src/llmtuner/extras/template.py:93
↓ 2 callersMethod_finalize
( self, lang: str, finish_info: str )
LLMs/LLaMA/src/llmtuner/webui/runner.py:54
↓ 2 callersMethod_format
r""" Aligns inputs to the standard format.
LLMs/LLaMA/src/llmtuner/extras/template.py:59
↓ 2 callersMethod_get_special_ids
( self, tokenizer: "PreTrainedTokenizer" )
LLMs/LLaMA/src/llmtuner/extras/template.py:74
↓ 2 callersFunction_infer_dtype
()
LLMs/LLaMA/src/llmtuner/tuner/core/parser.py:34
↓ 2 callersFunction_parse_args
(parser: HfArgumentParser, args: Optional[Dict[str, Any]] = None)
LLMs/LLaMA/src/llmtuner/tuner/core/parser.py:45
↓ 2 callersMethod_parse_eval_args
( self, lang: str, model_name: str, checkpoints: List[str], finetuning
LLMs/LLaMA/src/llmtuner/webui/runner.py:162
↓ 2 callersMethod_parse_train_args
( self, lang: str, model_name: str, checkpoints: List[str], finetuning
LLMs/LLaMA/src/llmtuner/webui/runner.py:64
↓ 2 callersMethod_read_entity_from_offset
Read entity string representation from offset. :param offset: :return:
entity_retrieval/surface_index_memory.py:200
↓ 2 callersFunctionaugment_with_s_expr_cwq
augment original cwq datasets with s-expression
parse_sparql_cwq.py:595
↓ 2 callersFunctionaugment_with_s_expr_webqsp
augment original webqsp datasets with s-expression
parse_sparql_webqsp.py:639
↓ 2 callersFunctionbinary_nesting
(function: str, elements: List[str], types_along_path=None)
executor/logic_form_util_cwq.py:259
↓ 2 callersFunctionbinary_nesting
(function: str, elements: List[str], types_along_path=None)
executor/logic_form_util.py:259
↓ 2 callersFunctioncast_layernorm_dtype
( model: "AutoModelForCausalLMWithValueHead", compute_dtype: torch.dtype, layer_norm_params: Optio
LLMs/LLaMA/src/llmtuner/tuner/ppo/utils.py:23
↓ 2 callersMethodchat_beam
( self, query: str, history: Optional[List[Tuple[str, str]]] = None, system: O
LLMs/LLaMA/src/llmtuner/chat/stream_chat.py:76
↓ 2 callersFunctioncount_parameters
r""" Returns the number of trainable parameters and number of all parameters in the model.
LLMs/LLaMA/src/llmtuner/extras/misc.py:30
↓ 2 callersFunctioncreate_chat_box
( chat_model: "WebChatModel", visible: Optional[bool] = False )
LLMs/LLaMA/src/llmtuner/webui/components/chatbot.py:11
↓ 2 callersFunctioncreate_preview_box
()
LLMs/LLaMA/src/llmtuner/webui/components/data.py:9
↓ 2 callersFunctiondate_post_process
When quering KB, (our) KB tends to autoComplete a date e.g. - 1996 --> 1996-01-01 - 1906-04-18 --> 1906-04-18 05:12:00
eval_final.py:72
↓ 2 callersFunctiondate_post_process
When quering KB, (our) KB tends to autoComplete a date e.g. - 1996 --> 1996-01-01 - 1906-04-18 --> 1906-04-18 05:12:00
eval_final_cwq.py:72
↓ 2 callersFunctiondenormalize_s_expr_new
(normed_expr, entity_label_map, type_label_map,
eval_final.py:92
↓ 2 callersFunctiondenormalize_s_expr_new
(normed_expr, entity_label_map, type_label_map,
eval_final_cwq.py:92
↓ 2 callersMethodencode_multiturn
r""" Returns multiple pairs of token ids representing prompts and responses respectively.
LLMs/LLaMA/src/llmtuner/extras/template.py:44
↓ 2 callersFunctiongen_cmd
(args: Dict[str, Any])
LLMs/LLaMA/src/llmtuner/webui/utils.py:74
↓ 2 callersFunctionget_2hop_relations_with_odbc_wo_filter
(entity: str)
executor/sparql_executor.py:520
↓ 2 callersFunctionget_config_path
()
LLMs/LLaMA/src/llmtuner/webui/common.py:23
↓ 2 callersFunctionget_end_num
(G, s)
executor/logic_form_util_cwq.py:245
↓ 2 callersFunctionget_end_num
(G, s)
executor/logic_form_util.py:245
↓ 2 callersMethodget_entities_for_surface
Return all entities for the surface form. :param surface: :return:
entity_retrieval/surface_index_memory.py:155
↓ 2 callersMethodget_indexrange_entity_el_pro_one_mention
(self, mention, top_k=10)
entity_retrieval/surface_index_memory.py:211
↓ 2 callersFunctionget_infer_args
( args: Optional[Dict[str, Any]] = None )
LLMs/LLaMA/src/llmtuner/tuner/core/parser.py:255
↓ 2 callersFunctionget_template_and_fix_tokenizer
( name: str, tokenizer: "PreTrainedTokenizer" )
LLMs/LLaMA/src/llmtuner/extras/template.py:204
↓ 2 callersFunctionget_train_args
( args: Optional[Dict[str, Any]] = None )
LLMs/LLaMA/src/llmtuner/tuner/core/parser.py:94
↓ 2 callersFunctionis_number
(t)
eval_final.py:17
↓ 2 callersFunctionis_number
(t)
eval_final_cwq.py:17
↓ 2 callersFunctionload_json
(fname, mode="r", encoding="utf8")
generation/webqsp_evaluate_offcial.py:11
↓ 2 callersFunctionload_valuehead_params
(model: torch.nn.Module, checkpoint_dir: os.PathLike)
LLMs/LLaMA/src/llmtuner/extras/save_and_load.py:11
↓ 2 callersFunctionlogical_form_to_graph
(expression: List)
executor/logic_form_util_cwq.py:122
↓ 2 callersFunctionlogical_form_to_graph
(expression: List)
executor/logic_form_util.py:122
↓ 2 callersFunctionmain
(pred_data, dataset_data)
generation/webqsp_evaluate_offcial.py:72
↓ 2 callersFunctionmain
()
LLMs/LLaMA/src/train_bash.py:6
↓ 2 callersMethodon_train_end
r""" Event called at the end of training.
LLMs/LLaMA/src/llmtuner/extras/callbacks.py:73
next →1–100 of 419, ranked by callers