feat(lore): raise memory limit to 2G for transformer NER#17
Merged
Conversation
…_trf) Lore now defaults to the en_core_web_trf spaCy model (transformer NER), which loads torch + RoBERTa and needs ~1.5GB RAM. The old 256M limit OOM-killed the container on model load. Raise to 2G, and surface LORE_GRAPH_SPACY_MODEL as an overridable env (default en_core_web_trf) so it can be dialed down to en_core_web_sm/lg (and the limit lowered) for a smaller footprint. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKkfVA3iY5G3Q43Mg4Xsu2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lore now defaults to
en_core_web_trf(transformer NER — see agentkitai/lore#100) which loads torch + RoBERTa and needs ~1.5 GB RAM. The previous 256 M limit OOM-killed the container on model load (OOMKilled=true, entity extraction silently died).LORE_GRAPH_SPACY_MODEL(defaulten_core_web_trf) as an overridable env so it can be dialed down toen_core_web_sm/lgfor a smaller footprint (lower the limit to ~512M then).Verified locally: with 2G,
OOMKilled=false, and extraction persists transformer-typed entities (Sarah→person,MongoDB→technology,AWS→organization).🤖 Generated with Claude Code
https://claude.ai/code/session_01CKkfVA3iY5G3Q43Mg4Xsu2