Skip to content
Minsing Log
Go back

English Edition

What is context length?

Data & ML

Conclusion

It is the number of tokens an LLM can process at once. It is the maximum length of an input sequence for an LLM. Clear explanation

This is important because

  1. A model cannot exceed the context length when summarizing articles.

  2. Long-term planning tasks require long input sequences.

  3. Longer and more complex inputs can generate richer output content.

  4. Memory issues For the reasons above, a context length serving as a reference point is needed.

Is a larger context length always better?

A larger context length increases the model’s comprehension ability, but it can be costly in practice, and the model’s performance may be lower than expected. In addition, answer quality may decline and the risk of hallucinations may increase. Clear explanation

Situation

A problem arose in which testing the RAGchain beir benchmark took more than an hour. When benchmarking 7 datasets at once, it kept running because the ragas metric in calculate metric exceeded its token limit.

Because the context length was exceeded, it kept retrying, and the solutions were:

  1. Switch to a model with a larger context length.

  2. Do not use the ragas metric.

공개 여정 구독

글이 올라오면 이메일로 보내드릴게요.

개발, 창업, 배움, 실패와 회고를 짧고 솔직하게 기록합니다. 검색으로 스쳐가는 독자가 아니라 여정을 따라오는 팬을 만들기 위한 뉴스레터입니다.

뉴스레터는 준비 중입니다. 그동안 RSS 로 구독하거나 이메일 로 알림을 요청해 주세요.


Share this post:

Comments

Sign in with GitHub to leave a comment.


Previous Post
The Unspoken Rules of Naming
Next Post
What Are Synchronous and Asynchronous?