Git Product home page Git Product logo

Comments (4)

hoschwenk avatar hoschwenk commented on August 21, 2024 1

I assume that fairseq (and Sockeye) use Sennrich's BPE in python.
In principle, one should be able to replace fastBPE with another BPE implementation. There are minor differences, but it may be worth trying what is the impact, without retraining the models.
The long term solution I favor is to switch to an unified tokenzation and segmentation approach like sentencepiece. This would make the whole pipeline language agnostic.
I hope to update the models and code in the near future ...

from laser.

bittlingmayer avatar bittlingmayer commented on August 21, 2024 1

fastBPE now supports this.

See glample/fastBPE#10 (comment)

@glample @loretoparisi

from laser.

hoschwenk avatar hoschwenk commented on August 21, 2024

This is already the case for the LSTM encoder itself.
The more tricky part is Moses tokenization and fastBPE.
Preloading the model and keeping it in memory would require some (substantial ?) changes of this 3rd party code. An option could be to use named pipes ?
If you can provide a pull request for this option, I'm happy to integrate it.

from laser.

bittlingmayer avatar bittlingmayer commented on August 21, 2024

Thanks for the suggestions

Logically, facebookresearch/UnsupervisedMT has the exact same issue

For tokenisation, my instinct would be to just use a different tokeniser, because LASER is basically agnostic to the tokenisation scheme, as long as it is applied consistently at train time and run time. But that would break compatibility with the current pre-trained models.

For fastBPE, I don't have a great answer, Fairseq (and Sockeye) supports interactive mode and BPE, but the BPE story is not something I would emulate, it's by far the biggest problem with the lib. fastBPE is a small and new lib, so there is some hope that it could evolve from just research to eng. In any case, I opened an issue, maybe you can add something there: glample/fastBPE#10

from laser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.