hi, I have a similar question. I just need the output text quite long, such as 5000 character length. but by editing def interact_model( model_name='124M', seed=None, nsamples=1, batch_size=1, length=1020, temperature=1, top_k=0, top_p=1, models_dir='models', ): it throws a error, is it possible to make the output length greatly longer?
3条答案
按热度按时间q5lcpyga1#
使用--length=1将输出1个token。更短的输出=>更少的等待时间。但是我没有注意到你的问题。我的输出是由输入上下文长度自动设置的,如果我有700多个单词,它会生成一个小输出(2~3句?),它的质量相当好。但是,一个错别字,一些语法错误或类似的错误可能会显著降低输出。
wmomyfyw2#
解决这个问题的一种方法是检测较小的句子(比如20个单词)是否完整。如果不完整,则将该句子作为输入重新馈送,并与新运行的输出连接。
0yycz8jy3#
hi, I have a similar question. I just need the output text quite long, such as 5000 character length. but by editing
def interact_model(
model_name='124M',
seed=None,
nsamples=1,
batch_size=1,
length=1020,
temperature=1,
top_k=0,
top_p=1,
models_dir='models',
):
it throws a error, is it possible to make the output length greatly longer?