MaartenGr / MaartenGr/BERTopic

KeyBERTInspired representation with precomputed embeddings

Open
#1,484 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.8k
Forks
920
Avg merge
22h 24m
Merged PRs (30d)
5

Description

I am having some trouble to do some create some fine tuned representations. I am using OpenAI ada embeddings, I precalculate them and use it as backend. However, when I tried to use KeyBERTInspired for finetuning it try to create again some embeddings.

If I don't use the OpenAI backend the problem is that it cannot use the embeddings already generated and try to create new.
![image](https://github.com/MaartenGr/BERTopic/assets/6162841/55aa54dd-ad8d-4e4a-8446-6c0559ba0d77)

However, if I put the openAI backend, the problem is for empty tokens that send them to the API and as it cannot create teh embedding an error is returned.
![image](https://github.com/MaartenGr/BERTopic/assets/6162841/e3373c54-04b4-4368-9b0f-50fe706ca915)

Is there a way to use prior calculated embeddings of documents or how can we fill the empty documents in this case? Thank you so much in advance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported behavior with KeyBERTInspired, precomputed document embeddings, and the OpenAI backend. Trace how representations handle precomputed embeddings and empty tokens; the issue is done when both workflows avoid unnecessary embedding requests and no longer fail on empty documents.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.