stanfordnlp / stanza

Stanford NLP Python library for tokenization, sentence segmentation, NER, and parsing of many human languages
https://stanfordnlp.github.io/stanza/
Other
7.14k stars 880 forks source link

Peft cache #1381

Closed AngledLuffa closed 2 months ago

AngledLuffa commented 2 months ago

Rearrange the Pipeline to allow for multiple peft adapters on the same transformer, mostly by using named adapters for conparse and sentiment. (POS, depparse, and NER would require their own names if we use peft for those)

At training time, the easiest solution is to use a separate transformer so that the optimizer is not cluttered up with peft adapters for other annotators, such as if POS is used to retag depparse or conparse