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

Load and predict

sersoage opened this issue · comments

Hi, thanks for the great research and codebase, and sorry for the basic question but how would you recommend to load a trained model and predict on new texts for a given task?
Thanks

Hi,

For predicting on new texts, you can directly use our code (you can load a trained model by --model_name_or_path; there is a --no_train flag which allows you to only perform inference). You may need to modify the code at the end of run.py to save the predicted results.

Thanks!