For this, you can use [ImageGPTForImageClassification].