20,688 questions
-5 votes
1 answer
78 views
Best way to extract a names from a string [closed]
I have a function that takes a string as an input and tries to extract the name and surname. It is a combination of NER and regex to try to extract the names present. Is there a better or more ...
Advice
0 votes
1 replies
38 views
Organisation/Person tagging using Spacy
We’re working on a problem where our master dataset contains names of organizations and individuals, but some entries are untagged. We only have the names (no additional details such as email or ...
0 votes
0 answers
45 views
Inconsistent name normalization when extracting data using OpenAI API (gpt-4.0-mini)
I'm using the OpenAI API (gpt-4.0-mini) to extract and normalize names from social media posts. However, even with strict prompting, the output sometimes contains slightly different spellings for the ...
1 vote
1 answer
111 views
Memory usage keeps increasing when extracting embeddings via sentence-transformers
I have a set of about 100M paragraph-sized strings (multilingual) I am extracting embeddings for, but the memory usage keeps increasing until I start overflowing into disk swap: model = ...
0 votes
0 answers
93 views
Torch example transformer with TransformerDecoder
In the torch example provided here https://github.com/pytorch/examples/tree/main/word_language_model, tansformer only uses torch.TransformerEncoder and torch.TransformerDecoder is overwritten with a ...
0 votes
0 answers
35 views
T5-small generates only padding tokens during validation/test in PyTorch Lightning
I'm fine-tuning T5-small using PyTorch Lightning and encountering a strange issue during validation and test steps. The Problem: During validation_step and test_step, model.generate() consistently ...
0 votes
0 answers
64 views
Utilizing GPU with RNN models which takes it's output as input [torch]
I have a machine-translation model. In this model, I calculate a vector for a given sentence and I take this vector, aggregate with each generated output of RNN and put it into RNN again for ...
0 votes
0 answers
67 views
Streamlit app throwing "NotFittedError: idf vector is not fitted" even though TF-IDF pipeline is fitted and works locally
I trained a sentiment classification model using a scikit-learn Pipeline that includes a TfidfVectorizer and LogisticRegression classifier. Everything works perfectly on my local machine, but when I ...
2 votes
1 answer
67 views
Angle Embedder in Python Messing Up Logging Config
I wrote another question on this earlier, but could not pinpoint the issue on my side, here, I am giving a minimal reproducible code. System Angle version 0.5.6 UV 0.8.22 Python 3.12 Ubuntu 24.04 I ...
0 votes
0 answers
61 views
ONNX Runtime Helsinki-NLP in Java
has anyone managed to translate something using Helsinki-NLP and ONNX Runtime in Java? Using a Python script, I generated these files: ├── encoder_model.onnx ├── decoder_model.onnx ├── ...
-1 votes
1 answer
64 views
How to reconstruct sentences from mean-pooled embeddings (embedding inversion) [closed]
I’m working on a research problem where I want to reconstruct or paraphrase sentences starting from synthetic embeddings. The embeddings are global (mean-pooled), not token-level, so they lose ...
2 votes
1 answer
108 views
How to integrate a lightweight image-to-text model into a React Native app?
I am trying to integrate an image-to-text model into a React Native mobile app. My requirements: The model should support image + text input → text output. It should be lightweight enough to run on ...
-3 votes
1 answer
154 views
I need a Python implementation of my Longest Possible Common Subsequence (LPCS) algorithm [closed]
Please be merciful - I've never asked a question here (I've answered a few) and am a total Python noob. I developed an algorithm in SQL Server to compute the Longest Possible Common Subsequence (LPCS) ...
2 votes
1 answer
77 views
How can I extract symptoms/diseases from a running transcription?
I'm working on a project where I'm attempting to extract medical symptoms from a running transcription. I'm using SocketIO to get mic audio and then using Whisper to transcribe the audio into text ...
2 votes
1 answer
153 views
RuntimeError: Expected all tensors to be on the same device when using local HuggingFace model in LangChain Agent
I'm building a simple agent using LangChain that leverages a locally-hosted HuggingFace model (gpt-oss-20b). I'm using the transformers pipeline and wrapping it in LangChain's HuggingFacePipeline. The ...