[Render][Speculator] Add return_loss_mask to render endpoint for training data generation (#46846)
Signed-off-by: Ranran Haoran Zhang <ranzhang@redhat.com> Co-authored-by: Benjamin Chislett <chislett.ben@gmail.com>
This commit is contained in:
co-authored by
Benjamin Chislett
parent
a2a92cbbaa
commit
09841ae705
@@ -87,6 +87,9 @@ class ChatParams:
|
||||
mm_processor_kwargs: dict[str, Any] | None = None
|
||||
"""The kwargs to pass to the multi-modal processor."""
|
||||
|
||||
return_assistant_tokens_mask: bool = False
|
||||
"""Request a per-token assistant mask from apply_chat_template."""
|
||||
|
||||
def with_defaults(
|
||||
self,
|
||||
default_chat_template_kwargs: dict[str, Any] | None = None,
|
||||
@@ -115,6 +118,7 @@ class ChatParams:
|
||||
default_mm_processor_kwargs,
|
||||
self.mm_processor_kwargs,
|
||||
),
|
||||
return_assistant_tokens_mask=self.return_assistant_tokens_mask,
|
||||
)
|
||||
|
||||
def get_apply_chat_template_kwargs(self) -> dict[str, Any]:
|
||||
|
||||
Reference in New Issue
Block a user