Skip to content
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

Shrink the size of some FreeLists. #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tavianator
Copy link

These FreeLists were responsible for 5.4MiB of allocations per query.
This is an excessive amount for systems that may have hundreds or
thousands of queries in flight at any particular time. They are now
shrunk to 82KiB per query.

The sizes were determined by some internal experimentation; they are the
smallest sizes that didn't cause reallocations on a typical NER task
(for us). YMMV for other tasks.

These FreeLists were responsible for 5.4MiB of allocations per query.
This is an excessive amount for systems that may have hundreds or
thousands of queries in flight at any particular time.  They are now
shrunk to 82KiB per query.

The sizes were determined by some internal experimentation; they are the
smallest sizes that didn't cause reallocations on a typical NER task
(for us).  YMMV for other tasks.
@tavianator
Copy link
Author

In our internal benchmarks, this increased tagging performance between 10-30X, depending on the size of the CRF.

@tavianator
Copy link
Author

Furthermore, training time stayed the same, within 0.03%.

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

Successfully merging this pull request may close these issues.

1 participant