jxhe / efficient-knnlm

Pytorch implementation of paper "Efficient Nearest Neighbor Language Models" (EMNLP 2021)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question regarding kNN-LM (exact)

jiaqing23 opened this issue · comments

In the Efficient kNN-LM paper, the result of kNN-LM (exact) is included (with ppl = 16.12, and very slow inference speed). I checked the original kNN-LM (Khandelwal, 2020) and the ppl score is matched with it.

image

May I know how to you obtain the score for kNN-LM (ppl = 16.65), which part of the code did you change from their original repo (https://github.com/urvashik/knnlm) and make the inference speed increase? What is the different between kNN-LM and kNN-LM (exact)? Because the original kNN-LM paper doesn't have any result of ppl = 16.65.

Thank you very much!

As their README says, you can set --no-load-keys and --knn-sim-func "do_not_recomp_l2"
Screenshot 2023-02-08 at 5 13 56 PM

Thanks for the response!