Closed Bug 1942349 Opened 1 year ago Closed 1 year ago

Add support for model variants

Categories

(Firefox :: Translations, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: gregtatum, Assigned: gregtatum)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

We're doing model architecture experiments, and it would be nice to support different model variants that have the same language pair. It should be good enough to support variants in Nightly, but shouldn't be used for production models.

Blocks: 1943444

I couldn't load in the .sys.mjs into the unprivileged context of the
about:translations page. There was nothing privileged in the current
grab bag of utils, and we can always create a privileged set of utils if
we need some in the future.

The following patch uses language pair as the term, and I want to be
consistent across the rest of the code.

This is a big patch, but it adds the support for model variants by
defining a language pair struct instead of a fromLanguage and
toLanguage. This struct can also include a source variant and target
variant. The code will resolve the pivot models as needed.

This is not going to be release user facing, but can be used in a
Nightly setting. There is nothing enforcing this, but it's the intention
of the code.

This will allow us to test multiple variants of models in Nightly and
gather feedback from users and other engineers.

Rather than fully fix Android to support model variants, I took a
shortcut and removed the variants in the GeckoView wrapper layer. This
retains compatibility and opens up the possibility of adding support to
Android in the future. See Bug 1943444.

I found this JSError being thrown when running tests.

Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/61043c4e3b8f De-privilege TranslationUtils so that it can be used in about:translations; r=translations-reviewers,geckoview-reviewers,ohall,nordzilla https://hg.mozilla.org/integration/autoland/rev/51d6a406b917 Rename translation pair to language pair; r=translations-reviewers,nordzilla https://hg.mozilla.org/integration/autoland/rev/fe82f7593d69 Add support for model variants; r=translations-reviewers,settings-reviewers,mossop,nordzilla https://hg.mozilla.org/integration/autoland/rev/a133d48362a4 Remove models that are variants in Android; r=ohall,translations-reviewers,geckoview-reviewers,nordzilla https://hg.mozilla.org/integration/autoland/rev/21c5afe6e211 Drive by fix for missing removeObserver parameter; r=translations-reviewers,nordzilla
See Also: → 1944597
Regressions: 1944599
Regressions: 1944597
Regressions: 1947822
No longer regressions: 1947822
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: