aws / fmeval

Foundation Model Evaluations Library
http://aws.github.io/fmeval
Apache License 2.0
187 stars 42 forks source link

fix: load detoxify model from state dict and upgrade transformers version #180

Closed oyangz closed 7 months ago

oyangz commented 8 months ago

Issue #, if available: https://tiny.amazon.com/f6f228ty/issuamazissuRAI7

We need to update transformers to >= v4.36.0 due to security vulnerabilities, but the latest detoxify v0.5.1 requires transformers v4.22.1. Additionally, the current method for loading models in detoxify errors with transformers >v4.30.0, see issue.

Description of changes:

To resolve the dependency conflict and model loading issue, this PR:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.