# I get different answer using Hosted inference API and pipeline object

**URL:** <https://discuss.huggingface.co/t/i-get-different-answer-using-hosted-inference-api-and-pipeline-object/22168>\
**Category:** 🤗Transformers\
**Created:** [August 26, 2022, 2:37pm UTC](https://discuss.huggingface.co/t/i-get-different-answer-using-hosted-inference-api-and-pipeline-object/22168 "2022-08-26T14:37:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gozdi](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/gozdi/32/4221_2.png) [@Gozdi](https://discuss.huggingface.co/u/Gozdi)\
**Post date:** [August 26, 2022, 2:37pm UTC](https://discuss.huggingface.co/t/i-get-different-answer-using-hosted-inference-api-and-pipeline-object/22168/1 "2022-08-26T14:37:11Z")

</div>

Hi i trained convbert base to do question answering. When I use it with pipeline object it’s giving me different answers than API aveliable on your website

```auto
model = TFAutoModelForQuestionAnswering.from_pretrained('Gozdi/convbert-base-adversarial-qa-exp-1-epoch-2')

qa_pipeline = pipeline(task='question-answering', model=model, tokenizer=tokenizer)

qa_pipeline(question="Where do I live?", context='My name is Wolfgang and I live in Berlin')

{'score': 0.7279412746429443, 'start': 34, 'end': 40, 'answer': 'Berlin'}

```

while

 ![huhhinhgace api](https://us1.discourse-cdn.com/hellohellohello/original/2X/2/22257177d1054fe76990b6d3eb481b3029f462ba.png)
