地平線まで行ってくる。

記録あるいは忘備録。時には検討事項。

Metaが公開したNLLBモデルを試してみる。

No Language Left Behind: NLLBでのモデルが公開された。どんな言語でもWeb上の情報を母国語でコミュニケーションできるようにという翻訳AIプロジェクト。

No Language Left Behind: A model from NLLB is released. A translation AI project that allows any language to communicate information on the Web in its native language.

 

詳しくは:本家本元を参照。

For more information, see the original.

ai.facebook.com

 

Huggin Faceにモデルがアップロードされている。お気軽に試すことができる。ライセンスは、「CC By NC 5.0」。
The model has been uploaded to Huggin Face. Feel free to try it out. Licensed CC By NC 5.0.

huggingface.co

そこで、実際にGoogle Colabを使って翻訳の状況を確認してみることにした。モデルもいくつかあり、distilledのモデルもある。お試しだけならさくっと実行できた。ただし、3.3Bのモデルは大きいので標準GPUだと実行できないので、プラミアムGPUじゃないと実行できなかった。どの程度のGPUで実行できるんだろうというのも興味あったので標準GPUで実行させて、Hugging Faceにあるモデルのお試しを実施した。

So, I actually decided to try to check the translation status with Google Colab. There are several models, some distilled models. I could do it just for the sake of experimenting. However, the 3.3B model is too big to run with a standard GPU, so I couldn't run it without a premium GPU.

 

結果:

github.com

最後の方にセルにGoogle翻訳した結果も比較のために記載した。素人の先入観として、多言語対応なので過大な期待はできないかも・・・と思っていた。しかし、十分助けになりそうな品質だと感じた。NLLB-200のモデルは固有名詞に弱い印象はある。詳細は不明だが、Fine TuningされたモデルもTuningで翻訳にも変化が出ている。

The last one also included the results of Google translating the cell for comparison. As a preliminary amateur, I thought that I could not expect too much because of multilingual support ... . But I felt that it was a quality that would be helpful enough. The model of NLLB-200 has a weak impression of proper nouns. Details are unknown, but the fine tuned model also changes in the translation in the tuning.

 

自分でFine Tuningできたら、分野を絞ったモデルにしたい。固有名詞あたりを追加学習するだけでも結構改善するのではないだろうか。

If I could fine tune myself, I would like to make it a more specialized model. Wouldn't it be a lot better to learn more about each proper noun?

 

そこそこのGPUでFine Tuningできると嬉しい。どうやったらいいのだろう。

I'm glad I can fine tune with the GPU. How can I do that?

 

*翻訳は「nllb-200-3.3B」のモデルを使って実施しました。