Skip to content

Commit

Permalink
Fix llama tokenization doctest (#24990)
Browse files Browse the repository at this point in the history
fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
  • Loading branch information
ydshieh and ydshieh committed Jul 21, 2023
1 parent a7d2131 commit f1a1eb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformers/models/llama/tokenization_llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def create_token_type_ids_from_sequences(
return output

def _build_conversation_input_ids(self, conversation: "Conversation") -> List[int]:
"""Builds the input ids for a conversation.
r"""Builds the input ids for a conversation.
This is the format used in the provided examples. System prompts should be manually added at the beginning of
the conversation. If no system prompt is given, the `DEFAULT_SYSTEM_PROMPT` will be used.
```
Expand All @@ -347,7 +347,7 @@ def _build_conversation_input_ids(self, conversation: "Conversation") -> List[in
>>> Conversation(
... "<<SYS>>\n Only answer with emojis, and charades\n<</SYS>>\n\nHow can I build a house in 10 septs?"
... )
... ) # doctest: +IGNORE_RESULT
```
Args:
conversation (`Conversation`):
Expand Down

0 comments on commit f1a1eb4

Please sign in to comment.