# How to pass Pipeline parameters to SageMaker Hosting?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-pass-pipeline-parameters-to-sagemaker-hosting%2F17481%3E%5C
**Category:** Amazon SageMaker\
**Created:** [May 3, 2022, 3:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-pass-pipeline-parameters-to-sagemaker-hosting%2F17481 "2022-05-03T15:35:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![OlivierCR](https://avatars.discourse-cdn.com/v4/letter/o/b19c9b/32.png) [@OlivierCR](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FOlivierCR)%5C
**Post date:** [May 3, 2022, 3:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-pass-pipeline-parameters-to-sagemaker-hosting%2F17481%2F1 "2022-05-03T15:35:20Z")

</div>

Hi,

Some HF Pipelines have many [controls](https://huggingface.co/transformers/v3.0.2/main_classes/pipelines.html#transformers.SummarizationPipeline) allowing to customize the inference. How to pass those parameters to a SageMaker HF hosting endpoint, for a specific invocation request?

---

<div class="post-metadata">

**Author:** ![philschmid](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/philschmid/32/38022_2.png) [@philschmid](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fphilschmid)%5C
**Post date:** [May 3, 2022, 4:06pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-pass-pipeline-parameters-to-sagemaker-hosting%2F17481%2F2 "2022-05-03T16:06:54Z")

</div>

You can find documentation here: [Reference](https://huggingface.co/docs/sagemaker/reference#inference-toolkit-api)

---

<div class="post-metadata">

**Author:** ![marshmellow77](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/marshmellow77/32/3279_2.png) [@marshmellow77](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmarshmellow77)%5C
**Post date:** [May 3, 2022, 4:33pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-pass-pipeline-parameters-to-sagemaker-hosting%2F17481%2F3 "2022-05-03T16:33:14Z")

</div>

To give a specific example (in this case text generation):

- [gptj-playground/gptj-playground-app.py at prompt-engineering · marshmellow77/gptj-playground · GitHub](https://github.com/marshmellow77/gptj-playground/blob/prompt-engineering/streamlit/gptj-playground-app.py#L45) (setting parameters)
- [gptj-playground/utils.py at prompt-engineering · marshmellow77/gptj-playground · GitHub](https://github.com/marshmellow77/gptj-playground/blob/prompt-engineering/streamlit/utils.py#L14) (calling the endpoint)

---

<div class="post-metadata">

**Author:** ![OlivierCR](https://avatars.discourse-cdn.com/v4/letter/o/b19c9b/32.png) [@OlivierCR](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FOlivierCR)%5C
**Post date:** [May 4, 2022, 9:51am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-pass-pipeline-parameters-to-sagemaker-hosting%2F17481%2F4 "2022-05-04T09:51:55Z")

</div>

many many thanks!
