mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-29 18:26:37 +08:00
Generate: rename prefill-prompt to prefill-response
This commit is contained in:
parent
431ece6c5b
commit
9f9da6af23
@ -61,9 +61,9 @@ def setup_arg_parser():
|
|||||||
help="Message to be processed by the model ('-' reads from stdin)",
|
help="Message to be processed by the model ('-' reads from stdin)",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--prefill-prompt",
|
"--prefill-response",
|
||||||
default=None,
|
default=None,
|
||||||
help="Prefill prompt to be used for the chat template",
|
help="Prefill response to be used for the chat template",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--max-tokens",
|
"--max-tokens",
|
||||||
@ -224,8 +224,8 @@ def main():
|
|||||||
messages = []
|
messages = []
|
||||||
messages.append({"role": "user", "content": prompt})
|
messages.append({"role": "user", "content": prompt})
|
||||||
|
|
||||||
if args.prefill_prompt is not None:
|
if args.prefill_response is not None:
|
||||||
messages.append({"role": "assistant", "content": args.prefill_prompt})
|
messages.append({"role": "assistant", "content": args.prefill_response})
|
||||||
prompt = tokenizer.apply_chat_template(
|
prompt = tokenizer.apply_chat_template(
|
||||||
messages,
|
messages,
|
||||||
tokenize=False,
|
tokenize=False,
|
||||||
|
Loading…
Reference in New Issue
Block a user