cdk-samples icon indicating copy to clipboard operation
cdk-samples copied to clipboard

Internal ModelError

Open ninajlu opened this issue 4 years ago • 2 comments

Hi, I tried to deploy gptj https://huggingface.co/EleutherAI/gpt-j-6B with text-generation as the task. It seemed to work but then I tried to curl the post request and got this error ModelError 400

{"error": "ModelError('An error occurred (ModelError) when calling the InvokeEndpoint operation: Received client error (400) from primary with message "{\n "code": 400,\n "type": "InternalServerException",\n "message": "\\u0027gptj\\u0027"\n}\n". See https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-.... for more information.')"}%
Do you know how to fix this?

ninajlu avatar Mar 12 '22 21:03 ninajlu

Hello @ninajlu,

did you check "See https://us-east-1.console.aws.amazon.com/cloudwatch/home?region=us-east-.... for more information.'"? We also have a dedicated blog post on how to deploy GPT-J: https://huggingface.co/blog/gptj-sagemaker

philschmid avatar Mar 14 '22 08:03 philschmid

I was getting this error when my payload wasn't converted into a 'byte' format. I solved it by doing this. payload = json.dumps(payload, indent=2).encode('utf-8')

UsamaEjaz0 avatar Sep 02 '22 21:09 UsamaEjaz0