model template --template -> model template --name

This commit is contained in:
Ashwin Bharambe 2024-07-29 18:21:05 -07:00
parent 45b8a7ffcd
commit 59574924de
2 changed files with 6 additions and 6 deletions

View file

@ -96,13 +96,13 @@ tool-message-success
user-message-default
```
And fetch an example by passing it to `--template`:
And fetch an example by passing it to `--name`:
```
llama model template --template tool-message-success
llama model template --name tool-message-success
llama model template --template tool-message-success
llama model template --name tool-message-success
<|start_header_id|>ipython<|end_header_id|>

View file

@ -46,15 +46,15 @@ class ModelTemplate(Subcommand):
help="Model Family (llama3_1, llama3_X, etc.)",
)
self.parser.add_argument(
"--template",
"--name",
type=str,
help="Usecase template name (system_message, user_message, assistant_message, tool_message)...",
required=False,
)
def _run_model_template_cmd(self, args: argparse.Namespace) -> None:
if args.template:
template, tokens_info = render_jinja_template(args.template)
if args.name:
template, tokens_info = render_jinja_template(args.name)
rendered = ""
for tok, is_special in tokens_info:
if is_special: