Skip to content

Speed up NER inference#598

Merged
magdyksaleh merged 8 commits intomainfrom
make-ner-fast-again
Sep 10, 2024
Merged

Speed up NER inference#598
magdyksaleh merged 8 commits intomainfrom
make-ner-fast-again

Conversation

@magdyksaleh
Copy link
Contributor

  • Remove indexing into input ids which is no longer needed
  • Clean up protos

entity.word = input[entity.start..entity.end].to_string();
entity.word = input[entity.start..entity.end]
.to_string()
.to_ascii_lowercase();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to exactly match HF output

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this comment to the code here to explain the lowercasing?

@magdyksaleh magdyksaleh merged commit 19301c7 into main Sep 10, 2024
@magdyksaleh magdyksaleh deleted the make-ner-fast-again branch September 10, 2024 16:30
magdyksaleh added a commit that referenced this pull request Sep 10, 2024
@prd-tuong-nguyen
Copy link

@tgaddair @magdyksaleh Hi guys, NER and Sequence classification are fantastic features. Do you have a plan to release them?

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.

3 participants