英文:
How to handle token limit in ChatGPT3.5 Turbo when creating tables?
问题
End user can copy tables from a pdf like
, paste the text in openai playground
bird_id bird_posts bird_likes
012 2 5
013 0 4
056 57 70
612 0 12
and will prompt the gpt with "Create table with the given text"
and gpt generates a table like below:
This works well as expected.
But when my input text is sizeable (say 1076 tokens), I face the following error:
Token limit error: The input tokens exceeded the maximum allowed by the model. Please reduce the number of input tokens to continue. Refer to the token count in the 'Parameters' panel for more details.
I will use python for text preprocessing and will get the data from UI.
If my input is textual data (like passages), I can use the approaches suggested by Langchain.
But, I would not be able to use summarization iteratively with tabular text as I might loose rows/columns.
Any inputs how this can be handled?
英文:
End user can copy tables from a pdf like
, paste the text in openai playground
bird_id bird_posts bird_likes
012 2 5
013 0 4
056 57 70
612 0 12
and will prompt the gpt with "Create table with the given text"
and gpt generates a table like below:
This works well as expected.
But when my input text is sizeable (say 1076 tokens), I face the following error:
Token limit error: The input tokens exceeded the maximum allowed by the model. Please reduce the number of input tokens to continue. Refer to the token count in the 'Parameters' panel for more details.
I will use python for text preprocessing and will get the data from UI.
If my input is textual data (like passages), I can use the approaches suggested by Langchain.
But, I would not be able to use summarization iteratively with tabular text as I might loose rows/columns.
Any inputs how this can be handled?
答案1
得分: 1
一般来说,这不能解决任何表格大小的问题 - 这些模型只有有限的上下文长度,这是它们的硬性限制。
据我所知,这是当前积极研究的课题,例如:https://arxiv.org/abs/2304.11062(但这并未在OpenAI方面实现,并且有其自己的限制和困难)。
您可以尝试新的gpt-3.5-turbo-16k
模型,其上下文大小为16384个标记(与您似乎使用的gpt-3.5-turbo
模型的4096个标记相比)。
英文:
In general this cannot be solved for any table size - those models just have limitted context length and that's their hard limitation.
As far as I know this is a subject of active research currently, for example: https://arxiv.org/abs/2304.11062 (but this is not implemented in OpenAI side and has it's own limitations and difficulties).
You can try the new gpt-3.5-turbo-16k
model, which has context size of 16384 tokens (as compared to 4096 tokens for gpt-3.5-turbo
, which you seem to use).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论