-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deepseek lora #91
Comments
这个应该无所谓吧?因为都是pad_token |
好的谢谢解答 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
response = tokenizer(f"Assistant: {example['output']}<|end▁of▁sentence|>", add_special_tokens=False)
input_ids = instruction["input_ids"] + response["input_ids"] + [tokenizer.pad_token_id]
attention_mask = instruction["attention_mask"] + response["attention_mask"] + [1] # 因为eos token咱们也是要关注的所以 补充为1
labels = [-100] * len(instruction["input_ids"]) + response["input_ids"] + [tokenizer.pad_token_id]
想问一下,<|end▁of▁sentence|>是否多余,因为后面加了一个tokenizer.pad_token_id,也表示<|end▁of▁sentence|>
The text was updated successfully, but these errors were encountered: