如何在创建表格时处理ChatGPT3.5 Turbo中的令牌限制?

huangapple go评论75阅读模式
英文:

How to handle token limit in ChatGPT3.5 Turbo when creating tables?

问题

End user can copy tables from a pdf like
如何在创建表格时处理ChatGPT3.5 Turbo中的令牌限制?

, 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:
如何在创建表格时处理ChatGPT3.5 Turbo中的令牌限制?

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
如何在创建表格时处理ChatGPT3.5 Turbo中的令牌限制?

, 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:
如何在创建表格时处理ChatGPT3.5 Turbo中的令牌限制?

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).

huangapple
  • 本文由 发表于 2023年6月9日 14:13:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/76437658.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定