MCPcopy Create free account

hub / github.com/SeungyounShin/Llama2-Code-Interpreter / functions

Functions94 in github.com/SeungyounShin/Llama2-Code-Interpreter

↓ 5 callersMethodadd_and_run
(self, code_string)
code_interpreter/JuypyterClient.py:27
↓ 5 callersMethodexecute_code_and_return_output
(self, code_str: str)
code_interpreter/BaseCodeInterpreter.py:57
↓ 5 callersMethodextract_code_blocks
(text: str)
code_interpreter/BaseCodeInterpreter.py:48
↓ 4 callersFunctionget_embedding
(text, model="text-embedding-ada-002")
code_interpreter/RetrospectiveGPTCodeInterpreter.py:67
↓ 4 callersFunctionpermute
(w, n_heads=n_heads, dim1=dim, dim2=dim)
utils/convert_llama_weights_to_hf.py:119
↓ 3 callersFunctionchange_markdown_image
(text: str)
chatbot.py:97
↓ 3 callersMethodchat
( self, user_message: str, VERBOSE: bool = False, MAX_TRY: int = 6, co
code_interpreter/GPTCodeInterpreter.py:116
↓ 3 callersMethodgenerate
( self, prompt: str = "[INST]\n###User : hi\n###Assistant :", max_new_tokens=512,
chatbot.py:51
↓ 3 callersFunctionmsg_to_code_result_tok_temp
(msg: List[Dict])
finetuning/conversation_template.py:29
↓ 2 callersMethodchat
(self, user_message: str, VERBOSE: bool = False, MAX_TRY=5)
code_interpreter/LlamaCodeInterpreter.py:174
↓ 2 callersMethodclean_code_output
(self, output: str)
code_interpreter/LlamaCodeInterpreter.py:164
↓ 2 callersMethoddialog_to_prompt
(self, dialog: List[Dict])
code_interpreter/LlamaCodeInterpreter.py:108
↓ 2 callersMethodextract_code_blocks
(self, prompt: str)
code_interpreter/LlamaCodeInterpreter.py:154
↓ 2 callersFunctionfind_all_sublist_end
Find all the ending indices of a sublist in a main list.
finetuning/train.py:111
↓ 2 callersFunctionfind_all_sublist_start
Find all the starting indices of a sublist in a main list.
finetuning/train.py:122
↓ 2 callersMethodgenerate
( self, prompt: str = "[INST]\n###User : hi\n###Assistant :", max_new_tokens=512,
code_interpreter/LlamaCodeInterpreter.py:114
↓ 2 callersFunctionget_error_header
(traceback_str)
utils/cleaner.py:5
↓ 2 callersFunctionjson_to_code_result_tok_temp
(json_file_name: str = "425.json")
finetuning/conversation_template.py:68
↓ 1 callersMethodChatCompletion
(self)
code_interpreter/GPTCodeInterpreterDataCollect.py:136
↓ 1 callersMethodChatCompletion
(self)
code_interpreter/RetrospectiveGPTCodeInterpreter.py:205
↓ 1 callersMethodChatCompletion
(self)
code_interpreter/RetrospectiveGPTCodeInterpreter.py:277
↓ 1 callersMethodChatCompletion
(self)
code_interpreter/GPTCodeInterpreter.py:97
↓ 1 callersFunction_tokenize_fn
Tokenize a list of strings.
finetuning/train.py:85
↓ 1 callersFunctionbuild_model_from_hf_path
( hf_model_path: str = "./ckpt/llama-2-13b-chat", peft: bool = False )
finetuning/train.py:246
↓ 1 callersFunctionbuild_model_from_hf_path
( hf_base_model_path: str = "./ckpt/llama-2-13b-chat", load_peft: Optional[bool] = False, peft_mod
eval/inference.py:84
↓ 1 callersMethodchat
(self, user_message: str, VERBOSE: bool = False, MAX_RETRY: int = 6)
code_interpreter/GPTCodeInterpreterDataCollect.py:144
↓ 1 callersMethodchat
( self, user_message: str, VERBOSE: bool = False, MAX_TRY: int = 6, co
code_interpreter/RetrospectiveGPTCodeInterpreter.py:296
↓ 1 callersMethodclean_output
(self, outputs)
code_interpreter/JuypyterClient.py:12
↓ 1 callersFunctionclean_the_dialog
(dialog, question)
code_interpreter/GPTCodeInterpreterDataCollect.py:77
↓ 1 callersFunctionclean_the_dialog
(dialog, question)
code_interpreter/RetrospectiveGPTCodeInterpreter.py:43
↓ 1 callersFunctionclean_the_dialog
(dialog, question)
code_interpreter/GPTCodeInterpreter.py:39
↓ 1 callersMethodclose
Shutdown the kernel.
code_interpreter/JuypyterClient.py:73
↓ 1 callersFunctioncompute_intermediate_size
(n, ffn_dim_multiplier=1, multiple_of=256)
utils/convert_llama_weights_to_hf.py:75
↓ 1 callersFunctioncreate_peft_config
(model)
finetuning/train.py:60
↓ 1 callersFunctiondelete_print_asser
(code_text: str)
eval/human_eval.py:61
↓ 1 callersFunctionexec_with_timeout
(import_str, full_test_code)
eval/human_eval.py:153
↓ 1 callersFunctionextract_all_code_block
(input_str: str)
eval/human_eval.py:48
↓ 1 callersFunctionextract_all_code_block_gpt
(input_str: str)
eval/human_eval.py:54
↓ 1 callersFunctionextract_text
(prompt, remove_lines=True)
eval/human_eval.py:31
↓ 1 callersFunctionget_error_message
(traceback_str)
utils/check_nb_plot_img_out.py:8
↓ 1 callersFunctionget_last_outermost_function_name
(function_str)
eval/human_eval.py:106
↓ 1 callersMethodget_response_content
(self)
code_interpreter/GPTCodeInterpreterDataCollect.py:125
↓ 1 callersMethodget_response_content
(self)
code_interpreter/RetrospectiveGPTCodeInterpreter.py:266
↓ 1 callersMethodget_response_content
(self)
code_interpreter/GPTCodeInterpreter.py:86
↓ 1 callersFunctiongradio_launch
(model_path: str, load_in_4bit: bool = True, MAX_TRY: int = 5)
chatbot.py:102
↓ 1 callersFunctioninference
( user_input="What is 100th fibo num?", max_new_tokens=512, do_sample: bool = True, use_cache:
eval/inference.py:148
↓ 1 callersFunctionload_jsonl
(file_path, num_lines_to_display=5)
eval/gsm8k.py:10
↓ 1 callersFunctionmain
()
utils/convert_llama_weights_to_hf.py:332
↓ 1 callersFunctionmake_supervised_data_module
Make dataset and collator for supervised fine-tuning.
finetuning/train.py:233
↓ 1 callersFunctionpreprocess
( trajs: Sequence[str], tokenizer: transformers.PreTrainedTokenizer, )
finetuning/train.py:133
↓ 1 callersFunctionread_json
(path)
utils/convert_llama_weights_to_hf.py:81
↓ 1 callersFunctionremove_string
(s)
code_interpreter/GPTCodeInterpreterDataCollect.py:31
↓ 1 callersFunctionremove_string
(s)
code_interpreter/RetrospectiveGPTCodeInterpreter.py:38
↓ 1 callersFunctionremove_string
(s)
code_interpreter/GPTCodeInterpreter.py:34
↓ 1 callersFunctionsave_dialog
(dialog, base_path: str = f"{prj_root_path}/gpt_data_gen")
code_interpreter/GPTCodeInterpreterDataCollect.py:58
↓ 1 callersMethodsave_dialog
(self, path: str = "./output/dialog.json")
code_interpreter/GPTCodeInterpreter.py:111
↓ 1 callersMethodsave_embeddings
(self)
code_interpreter/RetrospectiveGPTCodeInterpreter.py:128
↓ 1 callersMethodsave_embeddings
(self)
code_interpreter/RetrospectiveGPTCodeInterpreter.py:213
↓ 1 callersFunctiontrain
()
finetuning/train.py:307
↓ 1 callersFunctionwrite_json
(text, path)
utils/convert_llama_weights_to_hf.py:86
↓ 1 callersFunctionwrite_model
(model_path, input_base_path, model_size, safe_serialization=True)
utils/convert_llama_weights_to_hf.py:91
↓ 1 callersFunctionwrite_tokenizer
(tokenizer_path, input_tokenizer_path)
utils/convert_llama_weights_to_hf.py:322
Method__call__
(self, instances: Sequence[Dict])
finetuning/train.py:216
Method__call__
(self, query, top_k=3, VERBOSE: bool = False)
code_interpreter/RetrospectiveGPTCodeInterpreter.py:131
Method__call__
(self, query, top_k=3, VERBOSE: bool = False)
code_interpreter/RetrospectiveGPTCodeInterpreter.py:216
Method__getitem__
(self, i)
finetuning/train.py:206
Method__init__
(self, data_path: str, tokenizer: transformers.PreTrainedTokenizer)
finetuning/train.py:187
Method__init__
(self, config)
finetuning/codellama_wrapper.py:11
Method__init__
(self, model="gpt-4")
code_interpreter/GPTCodeInterpreterDataCollect.py:97
Method__init__
( self, data_directory="./gpt_data_gen_retrospect/", embeddings_path="./gpt_data_gen_r
code_interpreter/RetrospectiveGPTCodeInterpreter.py:86
Method__init__
( self, model="gpt-4", data_directory="./eval/gpt_mbpp_output", embeddings_pat
code_interpreter/RetrospectiveGPTCodeInterpreter.py:139
Method__init__
(self, model="gpt-4")
code_interpreter/RetrospectiveGPTCodeInterpreter.py:236
Method__init__
( self, model_path: str, load_in_8bit: bool = False, load_in_4bit: bool = Fals
code_interpreter/LlamaCodeInterpreter.py:48
Method__init__
(self)
code_interpreter/JuypyterClient.py:7
Method__init__
(self)
code_interpreter/BaseCodeInterpreter.py:35
Method__init__
(self, model="gpt-4")
code_interpreter/GPTCodeInterpreter.py:59
Method__len__
(self)
finetuning/train.py:203
Functionbot
(history)
chatbot.py:112
Functionbuild_model_from_hf_path
( hf_base_model_path: str = "./ckpt/llama-2-13b-chat", load_peft: Optional[bool] = False, peft_mod
code_interpreter/llama_hf.py:52
Functionclean_error_msg
(error_str:str ='')
utils/cleaner.py:12
Methodclose
close jupyter notebook, and this class instance
code_interpreter/RetrospectiveGPTCodeInterpreter.py:290
Methodclose
close jupyter notebook, and this class instance
code_interpreter/GPTCodeInterpreter.py:105
Functioncreate_peft_config
(model)
eval/inference.py:60
Functioncreate_peft_config
(model)
code_interpreter/llama_hf.py:28
Functionextract_function_from_code_block
(code_block: str)
eval/human_eval.py:73
Functionextract_test_assertion
(test_func: str)
eval/human_eval.py:136
Functiongen_questions
(prefix="What is 55th fibonacci number?")
code_interpreter/GPTCodeInterpreterDataCollect.py:36
Functionget_function_name
(function_str)
eval/human_eval.py:128
Functionget_last_function_name
(function_str)
eval/human_eval.py:113
Functionget_outermost_function_name
(function_str)
eval/human_eval.py:121
Methodparse_last_answer
(text: str)
code_interpreter/BaseCodeInterpreter.py:54
Methodrun_code_in_thread
()
code_interpreter/JuypyterClient.py:29
Methodsave_dialog
(self, path: str = "./output/dialog.json")
code_interpreter/RetrospectiveGPTCodeInterpreter.py:285
Functionuser
(user_message, history)
chatbot.py:213