I’m training GPT-2, constructed in the following manner:
                configuration = GPT2Config(
                    output_hidden_states=True,
                )
                architecture = AutoModelForCausalLM.from_config(
                    configuration)

When I pass an input sequence into the model, like so, I can access its output logits:
            # Output type: BaseModelOutputWithPastAndCrossAttentions
            architecture_output = self.architecture(
                input_ids=intractn.task_input_ids,
                attention_mask=intractn.task_attention_masks)


How does one convert the logits into string sentences? I discovered the .generate() method, but this seems to generate new outputs.
I suppose I could convert the logits to a distribution, sample, convert to token ids and then use tokenizer.decode() but that seems too manual. What’s the right way to do this in HuggingFace?