# Fairseq MMS HuggingFace model deployment

**URL:** <https://discuss.huggingface.co/t/fairseq-mms-huggingface-model-deployment/43079>\
**Category:** Amazon SageMaker\
**Created:** [June 13, 2023, 1:44pm UTC](https://discuss.huggingface.co/t/fairseq-mms-huggingface-model-deployment/43079 "2023-06-13T13:44:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sane-pike](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@sane-pike](https://discuss.huggingface.co/u/sane-pike)\
**Post date:** [June 13, 2023, 1:44pm UTC](https://discuss.huggingface.co/t/fairseq-mms-huggingface-model-deployment/43079/1 "2023-06-13T13:44:15Z")

</div>

I have been trying to deploy the Fairseq MMS model onto AWS Sagemaker and I keep running into error code: 500 when trying to predict the asr for an audio file.

The detailed error:

```auto
An error occurred (ModelError) when calling the InvokeEndpoint operation: Received server error (500) from primary with message "{
  "code": 500,
  "type": "InternalServerException",
  "message": "Worker died."
}

```

My driver code:

```auto
# initialize model
huggingface_model = HuggingFaceModel(
    transformers_version='4.26.0',
    pytorch_version='1.13.1',
    py_version='py39',
    env=hub,
    role=role, 
)

# deploy model
predictor = huggingface_model.deploy(
    initial_instance_count=1, # number of instances
    instance_type='ml.m5.xlarge' # ec2 instance type
)
 
# add serializer for audio files   
predictor.serializer = DataSerializer(content_type='audio/x-audio')

audio_path="test.flac"

# read audio file
with open("test.flac", "rb") as f:
    data = f.read()

#transcribe
predictor.predict(data)

```

The error occurs at predictor.predict(data)

---

<div class="post-metadata">

**Author:** ![oonyalo](https://avatars.discourse-cdn.com/v4/letter/o/7bcc69/32.png) [@oonyalo](https://discuss.huggingface.co/u/oonyalo)\
**Post date:** [November 23, 2023, 4:30am UTC](https://discuss.huggingface.co/t/fairseq-mms-huggingface-model-deployment/43079/2 "2023-11-23T04:30:29Z")

</div>

Did you resolve this? I have a very similar issue.
