mindspore-lab / mindnlp

Easy-to-use and high-performance NLP and LLM framework based on MindSpore, compatible with models and datasets of 🤗Huggingface.
https://mindnlp.cqu.ai/
Apache License 2.0
615 stars 170 forks source link

如何将huggingface的VisionEncoderDecoderModel用Mindnlp.transformers实现 #1390

Closed KeepSmile1 closed 3 weeks ago

KeepSmile1 commented 1 month ago

from transformers import VisionEncoderDecoderModel model = VisionEncoderDecoderModel.from_pretrained('./model/hand-write/') 模型目录包含pytorch_model.bin和config文件

换成mindnlp.transformers后,没有VisionEncoderDecoderModel,是否有类似的实现,或者我如何从本地加载pytorch模型(encoder-decoder)?

KeepSmile1 commented 1 month ago

我看mindnlp/transformer/model里已经有trocr模块,但是AutoModel.from_pretrained('trocr')显示mindnlp.utils.errors.GatedRepoError: You should have authorization to access the model., 什么时候能使用?

lvyufeng commented 1 month ago

我看一下