Skip to content

Commit 78d7828

Browse files
committed
chore: Add prototyped CLI options
1 parent cd00be8 commit 78d7828

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

gguf-py/scripts/gguf-gen-pre.py

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,37 @@ def main():
155155
"-v", "--verbose", action="store_true", help="Increase output verbosity."
156156
)
157157
parser.add_argument(
158-
"-m", "--model-path", default=None, help="The models storage path. Default is 'models/'."
158+
"-r", "--model-repo", default="meta-llama/Llama-2-7b-hf",
159+
help="The models repository. Default is 'meta-llama/Llama-2-7b-hf'."
159160
)
160161
parser.add_argument(
161-
"-t", "--gen-vocab-tests", action="store_true", help="Generate the tokenizer tests. Default is False."
162+
"-m", "--model-path", default="models/",
163+
help="The models storage path. Default is 'models/'."
162164
)
163165
parser.add_argument(
164-
"-s", "--gen-vocab-script", action="store_true", help="Generate the gguf vocab files. Default is False."
166+
"-a", "--model-arch", default="llama",
167+
help="The supported model architecture. Default is 'llama'."
168+
)
169+
parser.add_argument(
170+
"-p", "--model-parts", default=2,
171+
help="The number of model shards encompassing the model. Default is 2."
172+
)
173+
parser.add_argument(
174+
"-t", "--model-type", default="safetensors",
175+
help="The models file type. Default is 'safetensors'"
176+
)
177+
parser.add_argument(
178+
"-b", "--vocab-type",
179+
default="SPM", const="SPM", nargs="?", choices=["SPM", "BPE", "WPM"],
180+
help="The models tokenizer type. Default is 'SPM'."
181+
)
182+
parser.add_argument(
183+
"-t", "--gen-vocab-tests", action="store_true",
184+
help="Generate the tokenizer tests. Default is False."
185+
)
186+
parser.add_argument(
187+
"-s", "--gen-vocab-script", action="store_true",
188+
help="Generate the gguf vocab files. Default is False."
165189
)
166190
args = parser.parse_args()
167191

0 commit comments

Comments
 (0)