Hacker News new | past | comments | ask | show | jobs | submit login

GPT is using multi-headed attention, so of course it's not as simple as putting a few texts together, but I was still interested in finding some similar texts (that can be done because the training data is only 1MB).



That's a really interesting idea. Could you go into detail about how you're searching for similar texts using GPT?

It's true that the probability distribution is a sort of "edit distance". And GPT has already been used for text compression: https://bellard.org/nncp/gpt2tc.html so it seems not too far of a stretch to use it for similarity matching.

(Sure, perhaps there are more efficient or more effective techniques than using GPT for this, but I like the idea and am curious how it works.)


I was using Ctrl-F in Chrome for the words on the training data (Shakespeare texts).

With Teansformer models it's quite easy to print out top Query-Key pairs to debug what happened, but that was not my intention.


why don't use TF-IDF and use just elastic search?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: