MCPcopy Create free account

hub / github.com/LHRLAB/ChatKBQA / functions

Functions419 in github.com/LHRLAB/ChatKBQA

↓ 1 callersMethodparse_query_webqsp
parse a sparql query into a s-expression @param query: sparql query @param mid_list: all mids appeared in the sparql query
parse_sparql_webqsp.py:17
↓ 1 callersFunctionparse_train_args
( args: Optional[Dict[str, Any]] = None )
LLMs/LLaMA/src/llmtuner/tuner/core/parser.py:56
↓ 1 callersFunctionparse_webqsp_sparql
Parse WebQSP sparqls into s-expressions
parse_sparql_webqsp.py:822
↓ 1 callersMethodpostprocess
(self, response: str)
LLMs/LLaMA/src/llmtuner/webui/chat.py:92
↓ 1 callersMethodppo_train
r""" Implements training loop for the PPO stage, like _inner_training_loop() in Huggingface's Trainer.
LLMs/LLaMA/src/llmtuner/tuner/ppo/trainer.py:50
↓ 1 callersFunctionpredict
(query: str, history: List[Tuple[str, str]], system: str, request: ChatCompletionRequest)
LLMs/LLaMA/src/llmtuner/api/app.py:92
↓ 1 callersMethodprefixed_sparql_name
(self, prefix)
entity_retrieval/aqqu_entity_linker.py:68
↓ 1 callersFunctionprepare_dataloader
(args)
run_generator_final.py:6
↓ 1 callersFunctionprepare_model_for_training
r""" Includes: (1) cast the layernorm in fp32 (2) make output embedding layer require grads (3) upcast the lm_head to fp32
LLMs/LLaMA/src/llmtuner/tuner/core/utils.py:32
↓ 1 callersMethodprune_entities
(identified_entities, max_threshold=7)
entity_retrieval/aqqu_entity_linker.py:399
↓ 1 callersFunctionremove_bracket_suffix
(name)
entity_retrieval/aqqu_util.py:68
↓ 1 callersFunctionremove_number_suffix
(name)
entity_retrieval/aqqu_util.py:59
↓ 1 callersFunctionremove_suffixes_from_name
(name)
entity_retrieval/aqqu_util.py:52
↓ 1 callersFunctionreset_logging
r""" Removes basic config of root logger
LLMs/LLaMA/src/llmtuner/extras/logging.py:22
↓ 1 callersFunctionretrieve_relations
(exp: list)
executor/logic_form_util_cwq.py:404
↓ 1 callersFunctionretrieve_relations
(exp: list)
executor/logic_form_util.py:404
↓ 1 callersFunctionrun_dpo
( model_args: "ModelArguments", data_args: "DataArguments", training_args: "Seq2SeqTrainingArgumen
LLMs/LLaMA/src/llmtuner/tuner/dpo/workflow.py:20
↓ 1 callersFunctionrun_ppo
( model_args: "ModelArguments", data_args: "DataArguments", training_args: "Seq2SeqTrainingArgumen
LLMs/LLaMA/src/llmtuner/tuner/ppo/workflow.py:21
↓ 1 callersFunctionrun_prediction
(args,dataloader,output_dir,output_predictions=True)
run_generator_final.py:23
↓ 1 callersFunctionrun_pt
( model_args: "ModelArguments", data_args: "DataArguments", training_args: "Seq2SeqTrainingArgumen
LLMs/LLaMA/src/llmtuner/tuner/pt/workflow.py:16
↓ 1 callersFunctionrun_rm
( model_args: "ModelArguments", data_args: "DataArguments", training_args: "Seq2SeqTrainingArgumen
LLMs/LLaMA/src/llmtuner/tuner/rm/workflow.py:20
↓ 1 callersFunctionrun_sft
( model_args: "ModelArguments", data_args: "DataArguments", training_args: "Seq2SeqTrainingArgumen
LLMs/LLaMA/src/llmtuner/tuner/sft/workflow.py:19
↓ 1 callersMethodsave_predictions
r""" Saves model predictions to `output_dir`. A custom behavior that not contained in Seq2SeqTrainer.
LLMs/LLaMA/src/llmtuner/tuner/rm/trainer.py:84
↓ 1 callersMethodsave_predictions
r""" Saves model predictions to `output_dir`. A custom behavior that not contained in Seq2SeqTrainer.
LLMs/LLaMA/src/llmtuner/tuner/sft/trainer.py:76
↓ 1 callersFunctionserialize_rich_relation
(relation, domain_range_dict, seperator="|")
data_process.py:678
↓ 1 callersFunctionset_visited
(G, s, e, relation)
executor/logic_form_util_cwq.py:252
↓ 1 callersFunctionset_visited
(G, s, e, relation)
executor/logic_form_util.py:252
↓ 1 callersFunctionsimplify_textual_form
(expr)
components/expr_parser.py:247
↓ 1 callersMethodskeleton_form
(self)
components/expr_parser.py:75
↓ 1 callersMethodsparql_name
(self)
entity_retrieval/aqqu_entity_linker.py:65
↓ 1 callersFunctionstart
(dbPath, port)
Freebase-Setup/virtuoso.py:25
↓ 1 callersFunctionstop
(port)
Freebase-Setup/virtuoso.py:110
↓ 1 callersMethodtextual_form_core
(self)
components/expr_parser.py:95
↓ 1 callersMethodtextual_form_core
(self)
components/expr_parser.py:126
↓ 1 callersFunctiontry_relation
(d)
eval_final.py:294
↓ 1 callersFunctiontry_relation
(d)
eval_final_cwq.py:294
↓ 1 callersFunctiontype_checker
Check the type of a token, e.g. Integer, Float or date. Return original token if no type is detected.
eval_final.py:52
↓ 1 callersFunctiontype_checker
Check the type of a token, e.g. Integer, Float or date. Return original token if no type is detected.
eval_final_cwq.py:52
↓ 1 callersFunctionupdate_entity_label
Stardardize all entity labels
data_process.py:572
↓ 1 callersFunctionvanilla_sexpr_linearization_method
textualize a logical form, replace mids with labels Returns: (str): normalized s_expr
components/utils.py:112
Method__call__
r""" Pads batched data to the longest sequence in the batch. We generate 2 * n examples where the first n examples represent chosen e
LLMs/LLaMA/src/llmtuner/tuner/rm/collator.py:13
Method__call__
r""" Uses the model predictions to compute metrics.
LLMs/LLaMA/src/llmtuner/tuner/sft/metric.py:23
Method__call__
r""" Pads batched data to the longest sequence in the batch. We generate 2 * n examples where the first n examples represent chosen e
LLMs/LLaMA/src/llmtuner/tuner/dpo/collator.py:25
Method__eq__
(self, other)
entity_retrieval/aqqu_entity_linker.py:51
Method__eq__
(self, other)
entity_retrieval/aqqu_entity_linker.py:74
Method__eq__
(self, other)
entity_retrieval/aqqu_entity_linker.py:98
Method__getitem__
(self, i)
components/dataset_utils.py:10
Method__hash__
(self)
entity_retrieval/aqqu_entity_linker.py:48
Method__hash__
(self)
entity_retrieval/aqqu_entity_linker.py:71
Method__hash__
(self)
entity_retrieval/aqqu_entity_linker.py:95
Method__init__
(self)
parse_sparql_webqsp.py:14
Method__init__
(self)
parse_sparql_cwq.py:12
Method__init__
(self, examples)
components/dataset_utils.py:4
Method__init__
(self, s_expr, normed_expr, ex=None, f1=None, edist=None)
components/dataset_utils.py:17
Method__init__
(self, construction, val, data_type, fields)
components/expr_parser.py:22
Method__init__
(self, data_type, fields)
components/expr_parser.py:106
Method__init__
(self, data_type, fields)
components/expr_parser.py:130
Method__init__
(self, data_type, fields)
components/expr_parser.py:137
Method__init__
(self, val, data_type, fields)
components/expr_parser.py:145
Method__init__
(self, val, data_type, fields)
components/expr_parser.py:161
Method__init__
(self, val, data_type, fields)
components/expr_parser.py:169
Method__init__
(self, val, data_type, fields)
components/expr_parser.py:176
Method__init__
(self, val, data_type, fields)
components/expr_parser.py:183
Method__init__
(self, name)
entity_retrieval/aqqu_entity_linker.py:18
Method__init__
(self, name, identifier, score, aliases)
entity_retrieval/aqqu_entity_linker.py:33
Method__init__
(self, name, date)
entity_retrieval/aqqu_entity_linker.py:84
Method__init__
(self, mention, name, entity, score=0, surface_score=0, per
entity_retrieval/aqqu_entity_linker.py:105
Method__init__
(self, surface_index, # Better name it max_entities_per_surface max_entities
entity_retrieval/aqqu_entity_linker.py:152
Method__init__
(self, entity_list_file, surface_map_file, entity_index_prefix)
entity_retrieval/surface_index_memory.py:22
Method__init__
(self, *args, **kwargs)
LLMs/LLaMA/src/llmtuner/tuner/rm/trainer.py:22
Method__init__
( self, training_args: "Seq2SeqTrainingArguments", generating_args: "GeneratingArgumen
LLMs/LLaMA/src/llmtuner/tuner/ppo/trainer.py:31
Method__init__
( self, beta: float, model: Union["PreTrainedModel", torch.nn.Module], ref_mod
LLMs/LLaMA/src/llmtuner/tuner/dpo/trainer.py:16
Method__init__
(self, args: Optional[Dict[str, Any]] = None)
LLMs/LLaMA/src/llmtuner/chat/stream_chat.py:13
Method__init__
(self)
LLMs/LLaMA/src/llmtuner/extras/logging.py:7
Method__init__
(self)
LLMs/LLaMA/src/llmtuner/extras/misc.py:14
Method__init__
(self, runner=None)
LLMs/LLaMA/src/llmtuner/extras/callbacks.py:44
Method__init__
(self)
LLMs/LLaMA/src/llmtuner/webui/runner.py:22
Method__init__
(self, elem_list: List[Dict[str, Component]])
LLMs/LLaMA/src/llmtuner/webui/manager.py:12
Method__iter__
(self)
components/dataset_utils.py:13
Method__len__
(self)
components/dataset_utils.py:7
Method__post_init__
(self)
LLMs/LLaMA/src/llmtuner/hparams/finetuning_args.py:67
Method__post_init__
(self)
LLMs/LLaMA/src/llmtuner/hparams/model_args.py:75
Method__repr__
(self)
components/dataset_utils.py:27
Method__repr__
(self)
components/expr_parser.py:92
Method__repr__
(self)
LLMs/LLaMA/src/llmtuner/hparams/data_args.py:20
Method__str__
(self)
components/expr_parser.py:89
Method_encode
r""" Encodes formatted inputs to pairs of token ids. Turn 0: bos + prefix + query resp + eos Turn t: bos + query
LLMs/LLaMA/src/llmtuner/extras/template.py:157
Function_mp_fn
(index)
LLMs/LLaMA/src/train_bash.py:10
Function_prepare_decoder_attention_mask
( self, attention_mask: torch.Tensor, input_shape: torch.Tensor, inputs_embeds: torch.Tensor,
LLMs/LLaMA/src/llmtuner/extras/patches/llama_patch.py:212
Methodas_string
(self)
entity_retrieval/aqqu_entity_linker.py:123
Methodbatched_forward_pass
r""" Calculates model outputs in multiple batches. Subclass and override to inject custom behavior.
LLMs/LLaMA/src/llmtuner/tuner/ppo/trainer.py:228
Methodboost_entity_score
(self, entity)
entity_retrieval/aqqu_entity_linker.py:419
Functioncan_preview
(dataset_dir: str, dataset: list)
LLMs/LLaMA/src/llmtuner/webui/utils.py:36
Functioncan_quantize
(finetuning_type: str)
LLMs/LLaMA/src/llmtuner/webui/utils.py:67
Functionclean_str
remove illegal unicode characters
components/utils.py:46
Methodcompact_logical_form
(self)
components/expr_parser.py:71
Functioncompute_accuracy
(eval_preds: Sequence[Union[np.ndarray, Tuple[np.ndarray]]])
LLMs/LLaMA/src/llmtuner/tuner/rm/metric.py:5
Methodcompute_loss
r""" Computes pairwise loss. The first n examples are chosen and the last n examples are rejected. Subclass and override to inject cu
LLMs/LLaMA/src/llmtuner/tuner/rm/trainer.py:26
Methodconcatenated_forward
( self, model: Optional[torch.nn.Module] = None, batch: Optional[Dict[str, torch.Tenso
LLMs/LLaMA/src/llmtuner/tuner/dpo/trainer.py:48
Functionconstruct_common_data
( filtered_relations_path, domain_range_label_map_path, output_relation_rich_map_path, output_
data_process.py:692
← previousnext →201–300 of 419, ranked by callers