Commit 804dac03 authored by Your Name's avatar Your Name

Improve --hf-chat-template help text

parent 6e794ae6
...@@ -3145,8 +3145,8 @@ def check_hf_chat_template(model_type: str = "text", model_name: str = None) -> ...@@ -3145,8 +3145,8 @@ def check_hf_chat_template(model_type: str = "text", model_name: str = None) ->
Tuple of (should_use: bool, template_name: str or None) Tuple of (should_use: bool, template_name: str or None)
template_name is None means auto-detect from tokenizer template_name is None means auto-detect from tokenizer
Syntax: Examples:
# Auto-detect and apply to all text models # Auto-detect and apply to all models
--hf-chat-template auto --hf-chat-template auto
# Apply to all text models with auto-detect # Apply to all text models with auto-detect
...@@ -3158,10 +3158,6 @@ def check_hf_chat_template(model_type: str = "text", model_name: str = None) -> ...@@ -3158,10 +3158,6 @@ def check_hf_chat_template(model_type: str = "text", model_name: str = None) ->
# Apply to specific model with specific template # Apply to specific model with specific template
--hf-chat-template "llama-3.1:llama3" --hf-chat-template "llama-3.1:llama3"
--hf-chat-template "phi-3:chatml" --hf-chat-template "phi-3:chatml"
# Image models
--hf-chat-template image:sd-xl
--hf-chat-template "sd-xl:sdxl"
""" """
hf_chat_template = getattr(global_args, 'hf_chat_template', []) or [] hf_chat_template = getattr(global_args, 'hf_chat_template', []) or []
...@@ -5468,7 +5464,7 @@ def parse_args(): ...@@ -5468,7 +5464,7 @@ def parse_args():
"--hf-chat-template", "--hf-chat-template",
action="append", action="append",
default=[], default=[],
help="Use HuggingFace transformers apply_chat_template. Use without value for auto-detect, or specify model: --hf-chat-template text:model_name. Use --hf-chat-template auto for global auto-detect.", help="Use HuggingFace apply_chat_template. Examples: --hf-chat-template auto (all models), --hf-chat-template text (all text), --hf-chat-template mymodel:llama3 (specific model with template). Can be repeated.",
) )
parser.add_argument( parser.add_argument(
"--system-prompt", "--system-prompt",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment