Skip to content

Commit

Permalink
improve doc layout
Browse files Browse the repository at this point in the history
  • Loading branch information
JingyaHuang committed Oct 22, 2024
1 parent 8e61eeb commit 375c3cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions optimum/neuron/modeling_seq2seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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(
Expand Down

0 comments on commit 375c3cc

Please sign in to comment.