Closed HenryCai11 closed 1 year ago
Hi,
Thanks for your interest!
Hope these comments can help you.
Thank you so much!
@goodbai-nlp Hi, sorry to bother again. I still wonder how should I initialize the toeknizer with AMRBartTokenizer.
from transformers import BartForConditionalGeneration, BartTokenizer, AutoConfig
from spring_amr.tokenization_bart import AMRBartTokenizer
config = AutoConfig.from_pretrained("xfbai/AMRBART-large-finetuned-AMR3.0-AMRParsing")
model = BartForConditionalGeneration.from_pretrained("xfbai/AMRBART-large-finetuned-AMR3.0-AMRParsing")
tokenizer = AMRBartTokenizer.from_pretrained("facebook/bart-large", config=config)
I tried initializing this way. However, length of the tokenizer did not match the vocab size in config. Did I miss the point for the initialization? Looking forward to your reply. Thank you!
Hi,
I assume you are trying to initialize the tokenizer in the v1 version. You may follow the code here. Additionally, there is no need to pass the config parameter when initializing our tokenizer.
Thank you!
I noticed that for the finetuned AMRBarts, there are no tokenizers offered in the huggingface hub, whereas the v2 models have tokenizers with a different vocab size (v1 53844 vs. v2 53228). My questions are:
Thank you!