Matthew
@matthew
Can any devs help me find a solution for this? Building a game and when a user guesses word X, I want to see if it's sufficiently similar to word Y. could I deploy some kind of mini, local LLM inside my codebase for this? ideally don't want to wait / pay each time for an openai api call.
7 replies
15 recasts
23 reactions
christopher
@christopher
if you have a Postgres instance you could leverage ILIKE for semantic search unless you need it to be lexically similar.
2 replies
0 recast
5 reactions
dusan.framedl.eth
@ds8
llm is an overkill, i think embeddings are best for this. @nt built a fun game with word similarity as its premise — /guess — so i think he could give you poonters
1 reply
0 recast
1 reaction
osama
@osama
you can run a quantized, smaller model but also ilike, regex and levenshtein distance ma man
1 reply
0 recast
1 reaction
akshaan
@akshaan
An LLM might be overkill here, you could just use word embedding vectors and check the similarity between the guess word and the target. Check out the usages here: https://radimrehurek.com/gensim/models/word2vec.html (grep for model.wv.most_similar)
0 reply
0 recast
5 reactions
Small Brain
@0xsmallbrain
Run an open source embeddings model
0 reply
0 recast
1 reaction
Shashank
@0xshash
you could load a pre-trained BERT model and get cosine similarity of words
0 reply
0 recast
1 reaction
phil
@phil
@0xsmallbrain
0 reply
0 recast
1 reaction