Confusion with the code
xxSpencer opened this issue · comments
Dululu commented
This is a interesting work! I have some confusion that I need to ask for advice from you, dear author, and thank you for your time.
Basically, I have two question:
① In this funciton, why we need to add '[CLS]' before cope with the text?
def _get_self_info_via_baichuan(self, text: str) -> Tuple[List[str], List[float]]:
text = f"[CLS]{text}"
Is this have something to do with the GPT2's or curie's tokenizer?
② What if I want to replace the LLMs with other models like Baichuan2, anything I have to notice?
Thanks for your patience and time again!
liyucheng09 commented
- Yes, the [CLS] is the bos token for GPT models, indicating the start of the input. Should be replaced if you use other models.
- The overall framework is flexible so feel free to try other models.
Dululu commented
- Yes, the [CLS] is the bos token for GPT models, indicating the start of the input. Should be replaced if you use other models.
- The overall framework is flexible so feel free to try other models.
Thanks! Wish you all the best.
liyucheng09 commented
🫡