How to change max_length of a fine tuned model
Hello Everyone,I trained and shared a custom model based on gpt2 and now in config.json file of my model in the Model Hub I have the max_length as 50. I don’t remember passing that number as a training argument or such. However I want to use the whole capability of gpt-2 model and generate texts of length 1024 tokens. How can I update my model on Model Hub so that it’s possible to generate longer outputs using a pipeline?Here’s the config file of my model :config.json · YusufSahin99/IFIS_ZORK_AI_FANTASY at mainAny help would be appreciated
2021-07-15T12:21:13Z
This number is just a default for when you use the model in a text-generation pipeline, which can be overridden by passing a newmax_lengthin a call.
2021-08-26T12:36:48Z
Can someone please tell me what is the max_length & min_length values in summaziersummary_text = summarizer(text, max_length=?, min_length=?)[0][‘summary_text’]Thanks
2022-04-17T00:45:00Z
Is it the case themax_lengthcan’t be longer than the model’s sequence length? I ask because I’ve seen examples of settingmax_length=10000for generating long texts, but as soon as I set mymax_lengthgreater than my model’s sequence length it fails withIndexError: index out of range in self. I expected the pipeline to truncate and re-use the context, even if it was generating beyond the model’s sequence length… no?The backtrace points to mymodel.generate()line. so I’m assuming it’s to do with themax_lengthsetting.
2024-05-11T16:01:43Z
Bumping@jbmaxwell’s question, I have the same problem!