Skip to content

Commit

Permalink
Fix args type (huggingface#1214)
Browse files Browse the repository at this point in the history
* fix args type

* add args desc
  • Loading branch information
zspo authored and Andrew Lapp committed May 10, 2024
1 parent 2008390 commit 81f045e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trl/trainer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ class DataCollatorForCompletionOnlyLM(DataCollatorForLanguageModeling):
calculated on the completion made by the assistant.
Args:
instruction_template (`Optional[str]`): the template form that indicates the start of the human instruction, typically something like
'### Human:\n'. Useful for assistant-style conversation datasets
response_template (`Union[str, List[int]]`): the template form that indicates the start of the response, typically something like
'### Response:\n'. It can also be passed as tokenized ids, which can be useful when using a tokenizer that encodes the response
differently if it does not have proper context.
instruction_template (`Union[str, List[int]]`): the template form that indicates the start of the human instruction, typically something like
'### Human:\n'. Useful for assistant-style conversation datasets. It can also be passed as tokenized ids.
mlm (`bool`, *optional*, defaults to `False`): Whether or not to use masked language modeling in the underlying
`DataCollatorForLanguageModeling` class. Note that this option currently has no effect but is present
for flexibility and backwards-compatibility.
Expand Down

0 comments on commit 81f045e

Please sign in to comment.