The Inference Toolkit uses the transformers pipelines under the hood. So if your are deploying a model for Question-Answering it would use the pipeline("question-answering"). You can find the code for this here: transformers/question_answering.py at master · huggingface/transformers · GitHub 3
But if you want to use your own function return_best_combinaton you could create a custom inference.py with your own “prediction” step.
  

      huggingface.co
  

  
    

Deploy models to Amazon SageMaker 3