[PR #584] [MERGED] improve native embedder handling of large files #3414

Closed
opened 2026-02-22 18:33:44 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/584
Author: @timothycarambat
Created: 1/13/2024
Status: Merged
Merged: 1/13/2024
Merged by: @timothycarambat

Base: masterHead: embedder-improvements


📝 Commits (3)

  • de42721 improve native embedder handling of large files
  • 088c7da perf changes
  • 1755570 ignore storage tmp

📊 Changes

5 files changed (+78 additions, -14 deletions)

View changed files

📝 cloud-deployments/aws/cloudformation/aws_https_instructions.md (+7 -1)
📝 server/.gitignore (+1 -0)
📝 server/package.json (+2 -2)
📝 server/utils/EmbeddingEngines/native/index.js (+58 -7)
📝 server/yarn.lock (+10 -4)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

What is in this change?

Improve native embedder to handle large files (>100K words) without memory accrual resulting in OOM on some devices that are resource-constrained.

Additional Information

There could be improvement in other models as well as the native model relies on a local tmp write log for storing the response and other models still keep the embedding array in memory as the iterate.

Note: this doesn't improve the speed at which native embeddings are done, it just keeps very large file embeds from crashing the entire instance.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/584 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 1/13/2024 **Status:** ✅ Merged **Merged:** 1/13/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `embedder-improvements` --- ### 📝 Commits (3) - [`de42721`](https://github.com/Mintplex-Labs/anything-llm/commit/de4272168445b72be5928606b9b926d0f0ab9aff) improve native embedder handling of large files - [`088c7da`](https://github.com/Mintplex-Labs/anything-llm/commit/088c7da0d1d8e1dfc0f6faa1c06b4283f7462ce2) perf changes - [`1755570`](https://github.com/Mintplex-Labs/anything-llm/commit/175557089e64e7b4b96e377e6a779c7f92e18609) ignore storage tmp ### 📊 Changes **5 files changed** (+78 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `cloud-deployments/aws/cloudformation/aws_https_instructions.md` (+7 -1) 📝 `server/.gitignore` (+1 -0) 📝 `server/package.json` (+2 -2) 📝 `server/utils/EmbeddingEngines/native/index.js` (+58 -7) 📝 `server/yarn.lock` (+10 -4) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [x] 🐛 fix - [x] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### What is in this change? Improve `native` embedder to handle large files (>100K words) without memory accrual resulting in OOM on some devices that are resource-constrained. ### Additional Information There could be improvement in other models as well as the native model relies on a local `tmp` write log for storing the response and other models still keep the embedding array in memory as the iterate. Note: this doesn't improve the speed at which native embeddings are done, it just keeps very large file embeds from crashing the entire instance. ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:33:44 -05:00
yindo closed this issue 2026-02-22 18:33:44 -05:00
yindo changed title from [PR #584] improve native embedder handling of large files to [PR #584] [MERGED] improve native embedder handling of large files 2026-06-05 15:13:17 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#3414