Is there a way I can use Transformers 3.1.0 in SageMaker?
I’m trying to use the following package in SageMaker:GitHub - georgian-io/Multimodal-Toolkit: Multimodal model for text and tabular data with HuggingFace tI’m actually not sure if it will be possible unless I make a PR to make it work with Transformers 4.6.1 or I build my own multimodal network.They used Transformers 3.1.0 and haven’t updated it since. Is there a way around this so that I can use multimodal transformers in SageMaker?Thanks!
2021-08-19T14:05:10Z
Hey@JacquesThibs,Sadly there is no DLC for version 3.1.0 the first DLC contains transformers 4.4.2.Could elaborate a bit more on what you want to do? Maybe can find a workaround.Additionally, it is always possible to provide a customrequirements.txtwhere you could downgrade transformers to 3.1.0.Do you want to use this for training or inference?
2021-08-19T14:52:31Z
Hey@philschmidthanks for the response!Yeah, I noticed that the DLCs are only for newer versions of transformers, but I was hoping there would be a way around if I only needed the library for certain parts, not sure. I’m currently doing this for a SageMaker course, but it would be “easier” to use transformers 3.1.0 if I used my own Docker container and spin up an EC2 instance, right?Anyway, what I’m trying to do is to train and do inference on a multimodal model. Icouldbuild my own multimodal model, but since I’m only doing this to learn SageMaker, I was hoping there would be an easier way to do it.I’m working with a multitask dataset with additional tabular data, which is why I’m trying to use a multimodal tabular model.When I do pip install multimodal-transformers, it installs transformers 3.1.0, but I’m not sure will work… I’ve been running into some other dependency issues so I haven’t been able to try it out for training yet.What are you saying I should provide therequirements.txtfile to?
2021-08-19T15:08:55Z
Hey,Thank you for all this information.If you want to do this to learn how to use SageMaker I definitely suggest building an NLP model and then integrate it afterwards into your multimodal data.If you still want to use themultimodal-transformersyou could create arequirements.txtin the same directory as yourentry_pointSageMaker will then install these requirements before running your training.And for your inference, you can take a look here at how to build custominference.pyDeploy models to Amazon SageMaker
2021-08-19T15:36:07Z
Thanks@philschmid! I knew that was possible and it was the first thing I was going to try, but transformers will still work if I do that, even if it downgrades to 3.1.0? I’ll try it out. Thanks!