# Sagemaker Serverless Inference for LayoutLMv2 model

**URL:** <https://discuss.huggingface.co/t/sagemaker-serverless-inference-for-layoutlmv2-model/14186>\
**Category:** Amazon SageMaker\
**Created:** [January 28, 2022, 3:07am UTC](https://discuss.huggingface.co/t/sagemaker-serverless-inference-for-layoutlmv2-model/14186 "2022-01-28T03:07:51Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![mansimov](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mansimov/32/3881_2.png) [@mansimov](https://discuss.huggingface.co/u/mansimov)\
**Post date:** [February 7, 2022, 3:03am UTC](https://discuss.huggingface.co/t/sagemaker-serverless-inference-for-layoutlmv2-model/14186/15 "2022-02-07T03:03:19Z")

</div>

Update:

I managed to create the Serverless endpoint successfully!

Using the custom wheel of detectron2 for PyTorch 1.9.1 and torch vision 1.9.1 worked. I will keep the link for others here in case they need it for their projects [http://mansimov.io/files/detectron2-0.6-cp38-cp38-linux\_x86\_64.whl](http://mansimov.io/files/detectron2-0.6-cp38-cp38-linux_x86_64.whl)

Will likely create a small GitHub repo for others to reproduce the LayoutLMv2 (and related models) on AWS sagemaker serverless in future

Thanks @philschmid and @marshmellow77 for help!

---

_[View the full topic](https://discuss.huggingface.co/t/sagemaker-serverless-inference-for-layoutlmv2-model/14186)._
