AI model inference and training