MCPcopy Create free account

hub / github.com/Ljyustc/SocraticLM / functions

Functions47 in github.com/Ljyustc/SocraticLM

↓ 14 callersMethodget_command
(self, token)
codes/tokenization_chatglm.py:124
↓ 6 callersMethodbuild_single_message
(self, role, metadata, message)
codes/tokenization_chatglm.py:231
↓ 5 callersMethodencode
(self, s: str, bos: bool = False, eos: bool = False)
codes/tokenization_chatglm.py:52
↓ 4 callersMethod_pad_tensors_to_max_len
(self, tensor, max_length)
codes/trainer_seq2seq.py:231
↓ 4 callersFunctionprint_dataset_example
(example)
codes/main.py:395
↓ 3 callersMethodvocab_size
(self)
codes/tokenization_chatglm.py:167
↓ 2 callersMethodbuild_prompt
(self, query, history=None)
codes/tokenization_chatglm.py:222
↓ 2 callersMethoddecode
(self, t: List[int])
codes/tokenization_chatglm.py:61
↓ 2 callersFunctionmain
()
codes/main.py:78
↓ 1 callersMethod__init__
(self, model_path: str)
codes/tokenization_chatglm.py:15
↓ 1 callersMethod_convert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
codes/tokenization_chatglm.py:183
↓ 1 callersMethodconvert_id_to_token
Converts an index (integer) in a token (str) using the vocab.
codes/tokenization_chatglm.py:85
↓ 1 callersMethodconvert_token_to_id
Converts a token (str) in an id using the vocab.
codes/tokenization_chatglm.py:79
↓ 1 callersMethoddecode_tokens
(self, tokens: List[str])
codes/tokenization_chatglm.py:75
↓ 1 callersMethodevaluate
Run evaluation and returns metrics. The calling script will be responsible for providing a method to compute metrics, as they are ta
codes/trainer_seq2seq.py:31
↓ 1 callersFunctionget_args
()
codes/data_preprocess.py:7
↓ 1 callersMethodget_prefix_tokens
(self)
codes/tokenization_chatglm.py:218
↓ 1 callersMethodget_text_sequence_effective_length
(self, tensor: list)
codes/data_collator.py:7
↓ 1 callersMethodpredict
Run prediction and returns predictions and potential metrics. Depending on the dataset and your use case, your test dataset may cont
codes/trainer_seq2seq.py:80
↓ 1 callersMethodtokenize
(self, s: str, encode_special_tokens=False)
codes/tokenization_chatglm.py:37
Method__call__
(self, features, return_tensors=None)
codes/data_collator.py:19
Method__init__
( self, vocab_file, padding_side="left", clean_up_tokenization_spaces=False,
codes/tokenization_chatglm.py:99
Method__init__
(self, *args, save_changed=False, **kwargs)
codes/trainer.py:33
Method__post_init__
(self)
codes/arguments.py:213
Method_convert_token_to_id
Converts a token (str) in an id using the vocab.
codes/tokenization_chatglm.py:179
Function_mp_fn
(index)
codes/main.py:645
Method_pad
Pad encoded inputs (on left/right and up to predefined length or max length in the batch) Args: encoded_inputs:
codes/tokenization_chatglm.py:276
Method_save
(self, output_dir: Optional[str] = None, state_dict=None)
codes/trainer.py:37
Method_tokenize
(self, text, **kwargs)
codes/tokenization_chatglm.py:176
Functionbuild_chat_input
(tokenizer, query, prompt: str, history=None, role="user")
codes/main.py:62
Methodbuild_chat_input
(self, query, history=None, role="user")
codes/tokenization_chatglm.py:238
Methodbuild_inputs_with_special_tokens
Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and adding special tokens
codes/tokenization_chatglm.py:251
Functionbuild_qa_prompt
(query: str)
codes/main.py:54
Functioncompute_metrics
(eval_preds)
codes/main.py:490
Methodconvert_tokens_to_string
(self, tokens: List[str])
codes/tokenization_chatglm.py:187
Methodeos_token
(self)
codes/tokenization_chatglm.py:139
Methodeos_token_id
(self)
codes/tokenization_chatglm.py:151
Methodget_vocab
Returns vocab as a dict
codes/tokenization_chatglm.py:170
Methodpad_token
(self)
codes/tokenization_chatglm.py:135
Methodpad_token_id
(self)
codes/tokenization_chatglm.py:147
Methodprediction_step
Perform an evaluation step on `model` using `inputs`. Subclass and override to inject custom behavior. Args: mo
codes/trainer_seq2seq.py:138
Functionpreprocess_function_eval
(examples)
codes/main.py:221
Functionpreprocess_function_train
(examples)
codes/main.py:276
Functionpreprocess_function_train_problem_solving
(examples)
codes/main.py:327
Methodsave_vocabulary
Save the vocabulary and special tokens file to a directory. Args: save_directory (`str`): The directory
codes/tokenization_chatglm.py:190
Methodunk_token
(self)
codes/tokenization_chatglm.py:131
Methodunk_token_id
(self)
codes/tokenization_chatglm.py:143