LibreTranslate / LibreTranslate

Free and Open Source Machine Translation API. Self-hosted, offline capable and easy to setup.
https://libretranslate.com
GNU Affero General Public License v3.0
7.13k stars 682 forks source link

Downloaded models are not compatible with installed version of libretranslate #600

Closed deadbeef84 closed 3 months ago

deadbeef84 commented 3 months ago

I have a docker service based on libretranslate/libretranslate:v1.3.8, and it used to work fine. However, if I launch a new instance (or manually update models) some models are no longer compatible:

500: Internal Server Error

Cannot translate text: Unsupported model binary version. This executable supports models with binary version v5 or below, but the model has binary version v6. This usually means that the model was generated by a later version of CTranslate2. (Forward compatibility is not guaranteed.)

This was when translating from Swedish to French.

Is there any way to make sure compatible models are downloaded, or do I need to manually cache models to make sure they are not automatically updated to an incompatible version?

deadbeef84 commented 3 months ago

I think I found a workaround. Setting environment variable ARGOS_PACKAGE_INDEX to the argos index to https://raw.githubusercontent.com/argosopentech/argospm-index/802ad83594e3244e3f908ab0fefc56eef146a5da, the correct models will be downloaded.

pierotofy commented 3 months ago

Awesome you found a workaround; models are not backward compatible, I'd recommend to upgrade if you want to use the latest models. 👍

AytoMaximo commented 1 month ago

Hi! I've just installed LibtreTranslate today and have the same error, so I have no idea how can I "upgrade" anything in this situation?