Skip to content

Optimize head‑truncation loop in summarize_real() #3764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jayeshthk
Copy link

The update in history.py (summarize_real) includes = >

  1. Eliminate list reversals and streamline token summation
  2. Refactor head slicing: iterate directly over sized_head for speed
  3. Improve performance of message splitting by removing unnecessary reversals.

I think it will make it bit faster as per my exp..

@CLAassistant
Copy link

CLAassistant commented Apr 9, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants