Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LZHgrla committed Oct 11, 2023
1 parent c7bd9e3 commit 5b543b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xtuner/dataset/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def encode_fn(example, tokenizer, max_length, input_ids_with_output=True):
"""
if tokenizer.__class__.__name__ == 'QWenTokenizer':
bos_token_id = []
eos_token_id = tokenizer.encode('<|im_end|>', add_special_tokens=False)
eos_token_id = tokenizer.im_end_id
elif tokenizer.__class__.__name__ == 'ChatGLMTokenizer':
bos_token_id = []
eos_token_id = tokenizer.eos_token_id
Expand Down

0 comments on commit 5b543b3

Please sign in to comment.