From 375c3cc5bc28d046a030b6cd90eee035bceb9ae2 Mon Sep 17 00:00:00 2001 From: Jingya HUANG <44135271+JingyaHuang@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:25:07 +0000 Subject: [PATCH] improve doc layout --- optimum/neuron/modeling_seq2seq.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/optimum/neuron/modeling_seq2seq.py b/optimum/neuron/modeling_seq2seq.py index c6b1253c9..bb4e344c9 100644 --- a/optimum/neuron/modeling_seq2seq.py +++ b/optimum/neuron/modeling_seq2seq.py @@ -423,8 +423,10 @@ def _combine_encoder_decoder_config(self, encoder_config: "PretrainedConfig", de ) results = [tokenizer.decode(t, skip_special_tokens=True) for t in output] ``` - Example of text-to-text generation with tensor parallelism: + *(For large models, in order to fit into Neuron cores, we need to applly tensor parallelism. Hers below is an example ran on `inf2.24xlarge`.)* + Example of text-to-text generation with tensor parallelism: + ```python from transformers import {processor_class} from optimum.neuron import {model_class} @@ -447,7 +449,7 @@ def _combine_encoder_decoder_config(self, encoder_config: "PretrainedConfig", de ) results = [tokenizer.decode(t, skip_special_tokens=True) for t in output] ``` -""" +""" # noqa: W293 @add_start_docstrings(