MCPcopy Create free account
hub / github.com/ZinYY/TreeLoRA / parse_args

Function parse_args

inference/infer_single.py:53–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52
53def parse_args():
54 def list_of_strings(arg):
55 return arg.split(',')
56 parser = argparse.ArgumentParser(
57 description=
58 "Finetune a transformers model on a causal language modeling task")
59 parser.add_argument('--data_path',
60 type=str,
61 default='Dahoas/rm-static',
62 help='Path to the training dataset. A single data path.')
63 parser.add_argument(
64 '--data_output_path',
65 type=str,
66 default='./tmp/data_files/',
67 help=
68 'Where to store the data-related files such as shuffle index. This needs to be on a local storage of a node (not on a shared storage)'
69 )
70 parser.add_argument(
71 "--model_name_or_path",
72 type=str,
73 help=
74 "Path to pretrained model or model identifier from huggingface.co/models.",
75 required=True,
76 )
77 parser.add_argument(
78 "--inference_model_path",
79 type=str,
80 help=
81 "Path to inference model.",
82 required=True,
83 )
84 parser.add_argument(
85 "--max_prompt_len",
86 type=int,
87 default=512,
88 help="The maximum sequence length.",
89 )
90 # inference params
91 parser.add_argument(
92 "--max_ans_len",
93 type=int,
94 default=256,
95 help="The maximum answer length.",
96 )
97 parser.add_argument(
98 "--temperature",
99 type=float,
100 default=0.1,
101 help="Generate temperature params.",
102 )
103
104 parser.add_argument(
105 "--inference_batch",
106 type=int,
107 default=4,
108 help="Inference batch size.",
109 )
110 # add other inference params

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected