Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chaoyi-wu/PMC-LLaMA
/ functions
Functions
30 in github.com/chaoyi-wu/PMC-LLaMA
⨍
Functions
30
◇
Types & classes
9
↓ 1 callers
Function
_tokenize_fn
Tokenize a list of strings.
SFT/train.py:81
↓ 1 callers
Function
construct_spedical_tokens_dict
()
SFT/eval/qa_inference.py:43
↓ 1 callers
Function
inference_on_one
(input_str: Sequence[str], model, tokenizer)
SFT/eval/qa_inference.py:87
↓ 1 callers
Function
main
()
Pretrain/training.py:56
↓ 1 callers
Function
main
()
Pretrain/Data/tokenize_dataset.py:28
↓ 1 callers
Function
make_supervised_data_module
Make dataset and collator for supervised fine-tuning.
SFT/train.py:168
↓ 1 callers
Function
parse_args
()
SFT/eval/eval_medqa.py:15
↓ 1 callers
Function
parse_args
()
SFT/eval/qa_inference.py:34
↓ 1 callers
Function
parse_pmc_answers
(result_dir: str, file_names: Sequence[str])
SFT/eval/eval_medqa.py:34
↓ 1 callers
Function
preprocess
Preprocess the data by tokenizing.
SFT/train.py:105
↓ 1 callers
Method
random_subsection
(self, arr)
Pretrain/Dataset/Paper_dataset.py:59
↓ 1 callers
Function
read_jsonl
(file_path)
SFT/eval/qa_inference.py:112
↓ 1 callers
Function
read_jsonl
(path)
Pretrain/Data/tokenize_dataset.py:12
↓ 1 callers
Function
safe_save_model_for_hf_trainer
Collects the state dict and dump to disk.
Pretrain/training.py:28
↓ 1 callers
Function
sentence_make
(sentence,reflect_array,special_tokens_list)
Pretrain/Data/tokenize_dataset.py:18
↓ 1 callers
Function
smart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
SFT/train.py:58
↓ 1 callers
Function
smart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
SFT/eval/qa_inference.py:62
↓ 1 callers
Function
train
()
SFT/train.py:176
↓ 1 callers
Function
traversal_files
(dir_path: str, extension: str)
SFT/eval/eval_medqa.py:23
Method
__call__
(self, instances: Sequence[Dict])
SFT/train.py:155
Method
__getitem__
(self, i)
SFT/train.py:145
Method
__getitem__
(self,idx)
Pretrain/Dataset/Paper_dataset.py:52
Method
__init__
(self, data_path: str, tokenizer: transformers.PreTrainedTokenizer)
SFT/train.py:123
Method
__init__
(self, root_path, dir_name, seq_length = 512, voc_size = 32000,keep_author = True, keep_bib = True)
Pretrain/Dataset/Paper_dataset.py:39
Method
__len__
(self)
SFT/train.py:142
Method
__len__
(self)
Pretrain/Dataset/Paper_dataset.py:49
Function
prepare_data
(data_list: Sequence[dict], model, tokenizer)
SFT/eval/qa_inference.py:120
Function
read_json
(path)
Pretrain/training.py:24
Function
read_jsonl
(path,eval_num)
Pretrain/Dataset/Paper_dataset.py:22
Function
write_json
(x, path)
Pretrain/training.py:20