mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2026-07-28 11:46:09 +08:00
[misc] fix typos in comments and help text (#10633)
Co-authored-by: Karunanidhi Mishra <11963379+kmishra1204@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d58ec6a0bc
commit
445163ab5e
@@ -929,7 +929,7 @@ class InternVLPlugin(BasePlugin):
|
|||||||
messages = deepcopy(messages)
|
messages = deepcopy(messages)
|
||||||
mm_inputs = self._get_mm_inputs(images, videos, audios, processor)
|
mm_inputs = self._get_mm_inputs(images, videos, audios, processor)
|
||||||
|
|
||||||
image_pixel_patch_list = mm_inputs.get("image_num_patches") # pathes of images
|
image_pixel_patch_list = mm_inputs.get("image_num_patches") # patches of images
|
||||||
video_num_patches = mm_inputs.get("video_num_patches") # all patches for frames of videos
|
video_num_patches = mm_inputs.get("video_num_patches") # all patches for frames of videos
|
||||||
video_patch_indices = mm_inputs.get("video_patch_indices") # num frames of per video
|
video_patch_indices = mm_inputs.get("video_patch_indices") # num frames of per video
|
||||||
|
|
||||||
@@ -2667,7 +2667,7 @@ class Qwen2OmniPlugin(Qwen2VLPlugin):
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
use_audio_in_video and len(audios) and len(videos)
|
use_audio_in_video and len(audios) and len(videos)
|
||||||
): # if use the audio of video # deal video token and audio token togather
|
): # if use the audio of video # deal video token and audio token together
|
||||||
if len(videos) != len(audios):
|
if len(videos) != len(audios):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Number of videos ({len(videos)}) must match number of audios ({len(audios)}) when using audio in video."
|
f"Number of videos ({len(videos)}) must match number of audios ({len(audios)}) when using audio in video."
|
||||||
|
|||||||
@@ -1035,7 +1035,7 @@ register_template(
|
|||||||
format_assistant=StringFormatter(slots=["{{content}}<turn|>\n"]),
|
format_assistant=StringFormatter(slots=["{{content}}<turn|>\n"]),
|
||||||
format_system=StringFormatter(
|
format_system=StringFormatter(
|
||||||
slots=["<|turn>system\n<|think|>{{content}}<turn|>\n"]
|
slots=["<|turn>system\n<|think|>{{content}}<turn|>\n"]
|
||||||
), # default thought singal contained
|
), # default thought signal contained
|
||||||
format_observation=StringFormatter(
|
format_observation=StringFormatter(
|
||||||
slots=["<|turn>tool\n{{content}}<turn|>\n<|turn>model\n"]
|
slots=["<|turn>tool\n{{content}}<turn|>\n<|turn>model\n"]
|
||||||
), # seem not consistent with the chattemplate
|
), # seem not consistent with the chattemplate
|
||||||
@@ -1061,7 +1061,7 @@ register_template(
|
|||||||
format_assistant=StringFormatter(slots=["{{content}}<turn|>\n"]),
|
format_assistant=StringFormatter(slots=["{{content}}<turn|>\n"]),
|
||||||
format_system=StringFormatter(
|
format_system=StringFormatter(
|
||||||
slots=["<|turn>system\n<|think|>{{content}}<turn|>\n"]
|
slots=["<|turn>system\n<|think|>{{content}}<turn|>\n"]
|
||||||
), # default thought singal contained
|
), # default thought signal contained
|
||||||
format_observation=StringFormatter(slots=["<|turn>tool\n{{content}}<turn|>\n<|turn>model\n"]),
|
format_observation=StringFormatter(slots=["<|turn>tool\n{{content}}<turn|>\n<|turn>model\n"]),
|
||||||
format_tools=ToolFormatter(tool_format="gemma4"),
|
format_tools=ToolFormatter(tool_format="gemma4"),
|
||||||
format_function=FunctionFormatter(slots=["<|tool>{{content}}<tool|>"], tool_format="gemma4"),
|
format_function=FunctionFormatter(slots=["<|tool>{{content}}<tool|>"], tool_format="gemma4"),
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class EvaluationArguments:
|
|||||||
)
|
)
|
||||||
n_shot: int = field(
|
n_shot: int = field(
|
||||||
default=5,
|
default=5,
|
||||||
metadata={"help": "Number of examplars for few-shot learning."},
|
metadata={"help": "Number of exemplars for few-shot learning."},
|
||||||
)
|
)
|
||||||
save_dir: str | None = field(
|
save_dir: str | None = field(
|
||||||
default=None,
|
default=None,
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ class BAdamArgument:
|
|||||||
"help": (
|
"help": (
|
||||||
"The mode of the mask for BAdam optimizer. "
|
"The mode of the mask for BAdam optimizer. "
|
||||||
"`adjacent` means that the trainable parameters are adjacent to each other, "
|
"`adjacent` means that the trainable parameters are adjacent to each other, "
|
||||||
"`scatter` means that trainable parameters are randomly choosed from the weight."
|
"`scatter` means that trainable parameters are randomly chosen from the weight."
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@@ -530,7 +530,7 @@ class FinetuningArguments(
|
|||||||
)
|
)
|
||||||
freeze_vision_tower: bool = field(
|
freeze_vision_tower: bool = field(
|
||||||
default=True,
|
default=True,
|
||||||
metadata={"help": "Whether ot not to freeze the vision tower in MLLM training."},
|
metadata={"help": "Whether or not to freeze the vision tower in MLLM training."},
|
||||||
)
|
)
|
||||||
freeze_multi_modal_projector: bool = field(
|
freeze_multi_modal_projector: bool = field(
|
||||||
default=True,
|
default=True,
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ def check_template(lang: str, template: str) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def get_trainer_info(lang: str, output_path: os.PathLike, do_train: bool) -> tuple[str, "gr.Slider", dict[str, Any]]:
|
def get_trainer_info(lang: str, output_path: os.PathLike, do_train: bool) -> tuple[str, "gr.Slider", dict[str, Any]]:
|
||||||
r"""Get training infomation for monitor.
|
r"""Get training information for monitor.
|
||||||
|
|
||||||
If do_train is True:
|
If do_train is True:
|
||||||
Inputs: top.lang, train.output_path
|
Inputs: top.lang, train.output_path
|
||||||
|
|||||||
Reference in New Issue
Block a user