chansung/LLM-As-Chatbot
81
1import argparse2 3def parse_args():4 parser = argparse.ArgumentParser(5 description="Gradio Application for LLM as a chatbot service"6 )7 parser.add_argument(8 "--base-url",9 help="Hugging Face Hub URL",10 default="elinas/llama-7b-hf-transformers-4.29",11 type=str,12 )13 parser.add_argument(14 "--ft-ckpt-url",15 help="Hugging Face Hub URL",16 # default="tloen/alpaca-lora-7b",17 default="LLMs/Alpaca-LoRA-7B-elina",18 type=str,19 )20 parser.add_argument(21 "--port",22 help="PORT number where the app is served",23 default=6006,24 type=int,25 )26 parser.add_argument(27 "--share",28 help="Create and share temporary endpoint (useful in Colab env)",29 action='store_true'30 )31 parser.add_argument(32 "--gen-config-path",33 help="path to GenerationConfig file",34 default="configs/response_configs/default.yaml",35 # default="configs/gen_config_koalpaca.yaml",36 # default="configs/gen_config_stablelm.yaml",37 type=str38 )39 parser.add_argument(40 "--gen-config-summarization-path",41 help="path to GenerationConfig file used in context summarization",42 default="configs/summarization_configs/default.yaml",43 type=str44 )45 parser.add_argument(46 "--multi-gpu",47 help="Enable multi gpu mode. This will force not to use Int8 but float16, so you need to check if your system has enough GPU memory",48 action='store_true'49 )50 parser.add_argument(51 "--force-download_ckpt",52 help="Force to download ckpt instead of using cached one",53 action="store_true"54 )55 parser.add_argument(56 "--chat-only-mode",57 help="Only show chatting window. Otherwise, other components will be appeared for more sophisticated control",58 action="store_true"59 )60 61 return parser.parse_args()