Comments (4)
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.
fastBPE now supports this.
See glample/fastBPE#10 (comment)
from laser.
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.
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)
- Containerized Application, Corrupted file for bilstm.93langs.2018-12-26.pt HOT 2
- Change default tokenizer for sentence embeddings HOT 1
- The included Dockerfile and associated Flask app is out of date in multiple ways. HOT 2
- LASER3 encoders for English? (and other high res langs) HOT 2
- SPM models not available HOT 2
- Downloading models and tokenizers does not work on Windows HOT 1
- An error initializing English pipeline (on the MLH-dev branch)
- Suggestion: allow turning off punctuation normalization
- Suggestion: add normalization option in the
- Try decreasing the minimal versions of numpy and torch required by laser-encoders
- Reorganize the lists of languages
- Publish the performance of LASER2 and LASER3 encoders on each of the FLORES-200 languages
- Create a tutorial showing how LASER can be applied for downstream practical tasks (e.g. multilingual sentiment analysis) HOT 1
- Support for saving embeddings bin file in laser_encoder HOT 4
- Add 2-letter codes to the `laser_encoders` language list
- do it support qwen model? HOT 1
- How can I parallelize LASER embeddings? HOT 3
- Can't download: 403 error on some CC segments. HOT 1
- Unable to import LaserEncoderPipeline HOT 10
- Similarity calculation takes too long with LASER3 model, compared to XLM-R/LaBSE HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laser.