

TITLE
Text generation pipeline - output_scores parameter

COMMENTS
2

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
In `text-generation` pipeline, I am looking for a parameter which calculates the confidence score of the generated text. Source: [here](https://huggingface.co/transformers/main_classes/pipelines.html#transformers.TextGenerationPipeline)

I am assuming that,  `output_scores` (from [here](https://huggingface.co/transformers/main_classes/configuration.html#transformers.PretrainedConfig)) parameter is not returned while prediction,

**Code**:

`predictedText = pipeline('text-generation',model=checkpoint_path, tokenizer=gpt2_tokenizer, config={'max_length':20, 'output_scores':True})`

`predictedText('This is a ')`


**Output**:

`Setting `pad_token_id` to `eos_token_id`:50256 for open-end generation.
[{'generated_text': 'This is a Generated Text'}]`

In the output, I am looking for a confidence score of the predicted text to be displayed



