texttron / tevatron

Tevatron - A flexible toolkit for neural retrieval research and development.
http://tevatron.ai
Apache License 2.0
435 stars 87 forks source link

fix saved adapter.safetensors #123

Closed ArvinZhuang closed 1 month ago

ArvinZhuang commented 1 month ago

this _save follows the original transformers trainer implementation. The previous implementation will case RuntimeError: Error(s) in loading state_dict for PeftModel when loading saved safetensors. This update can fix that.