princeton-nlp / LM-BFF

[ACL 2021] LM-BFF: Better Few-shot Fine-tuning of Language Models https://arxiv.org/abs/2012.15723

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

num_k parameter is not used

dyukha opened this issue · comments

run.py accepts parameter num_k, which should control how many training examples per class we have. However, it's not used anywhere in the code. It seems that num_sample is used instead.

Hi,

You are right that num_k here is a dummy arg. The number of examples is controlled by the dataset you use (for example, our provided preprocessing examples process all the datasets as k=16). Num_sample has a different meaning---it designates how many times of sampling we do for averaging in-context examples for inference.

@gaotianyu1350 , thanks for the reply! Maybe it makes sense to remove num_k? It's also used in examples, which makes it look that the argument actually matters, which can lead to some undesired consequences for a user.

Hi we decide to keep num_k because it is used in logging and searching for a specific run (see our explanation in README about num_k. But thanks for pointing it out!