Skip to content

feat(nlp): add translation task (Opus-MT, EuroLLM, Hy-MT2) - #1572

Open
msluszniak wants to merge 7 commits into
mainfrom
@ms/translation
Open

msluszniak wants to merge 7 commits into
mainfrom
@ms/translation

Conversation

@msluszniak

@msluszniak msluszniak commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Description

  • New translation task behind one Translator API (useTranslator, translate(text, { sourceLanguage, targetLanguage }, onToken?)).
  • Opus-MT: six pairs (en↔de, en↔es, en↔fr), XNNPACK int8 only (fastest on S26 Ultra and iPhone 16; Core ML, MLX and Vulkan were slower).
  • EuroLLM-1.7B-Instruct: any pair of its 35 languages with one model (XNNPACK 8da8w, MLX int8 on iOS); switching pairs does not reload it.
  • Hy-MT2-1.8B: same API, 38 languages (XNNPACK 8da4w default / 8da8w; MLX int8 default / int4 on iOS). Verified on S26 Ultra and iPhone 16.
  • Fix: LLM streaming dropped word breaks for tokenizers whose decoder strips a leading space (EuroLLM).
  • NLP demo gets a Translation screen.
  • Bumps nativeLibsVersion to 0.10.7 (v0.10.7-libs).

Introduces a breaking change?

  • Yes
  • No

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

  • iOS
  • Android

Testing instructions

  • Run apps/nlp, open Translation, pick Opus-MT or EuroLLM and a pair, tap Translate.

Screenshots

Related issues

#1113

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

Export scripts: export-scripts MR !43.

@msluszniak msluszniak self-assigned this Oct 22, 2026
@msluszniak msluszniak added the feature PRs that implement a new feature label Oct 22, 2026
@msluszniak msluszniak changed the title feat(nlp): add Opus-MT translation task feat(nlp): add translation task (Opus-MT, EuroLLM) Oct 23, 2026
@msluszniak msluszniak linked an issue Oct 28, 2026 that may be closed by this pull request
@msluszniak
msluszniak marked this pull request as draft October 29, 2026 13:44
@msluszniak msluszniak changed the title feat(nlp): add translation task (Opus-MT, EuroLLM) feat(nlp): add translation task (Opus-MT, EuroLLM, Hy-MT2) Oct 29, 2026
@msluszniak
msluszniak marked this pull request as ready for review October 29, 2026 16:58
@msluszniak
msluszniak requested a review from barhanc October 29, 2026 17:04

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature PRs that implement a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support translation models

1 participant