microsoft / unilm

Large-scale Self-supervised Pre-training Across Tasks, Languages, and Modalities
https://aka.ms/GeneralAI
MIT License
19.11k stars 2.44k forks source link

(BEIT-3) I can't find transformers.py #1589

Closed matsutaku44 closed 5 days ago

matsutaku44 commented 5 days ago

Model I am using (UniLM, MiniLM, LayoutLM ...): BEIT-3

I tried to run this code :

from transformers import XLMRobertaTokenizer
tokenizer = XLMRobertaTokenizer("/your_beit3_model_path/beit3.spm")

However, I can't find transformers.py at unilm/beit3/

donglixp commented 5 days ago

from transformers import XLMRobertaTokenizer tokenizer = XLMRobertaTokenizer("/your_beit3_model_path/beit3.spm")

The above code is used to load the tokenizer.

donglixp commented 5 days ago

The transformers package can be installed following the instruction https://github.com/microsoft/unilm/tree/master/beit3#setup .

The package dependency is at https://github.com/microsoft/unilm/blob/master/beit3/requirements.txt#L18 .

matsutaku44 commented 5 days ago

@donglixp Thank you very much!