Giter VIP home page Giter VIP logo

Comments (11)

glample avatar glample commented on July 29, 2024 1

Hi!

Yes, I would suggest looking at the code in the notebook:
https://github.com/facebookresearch/XLM/blob/master/generate-embeddings.ipynb

Then doing something like that should work:

word_id = dico.index('cat')
model.embeddings.weight[word_id]

from xlm.

stygian2a avatar stygian2a commented on July 29, 2024 1

Got it, thx for everything!

from xlm.

stygian2a avatar stygian2a commented on July 29, 2024

Thank you! How can I differentiate words from different languages (ie 'chat' in french means cat)?

from xlm.

glample avatar glample commented on July 29, 2024

You can just replace "cat" by "chat" in the code above. There is only one share vocabulary, that contains the words for all languages. The vocabulary doesn't keep track of which word is used in which language.

from xlm.

vvssttkk avatar vvssttkk commented on July 29, 2024

i want get models for russian language, the mlm_xnli15_1024.pth will do?

from xlm.

glample avatar glample commented on July 29, 2024

Yes, it contains Russian. But these two models will give you a better performance, and also support Russian:

https://dl.fbaipublicfiles.com/XLM/mlm_17_1280.pth
https://dl.fbaipublicfiles.com/XLM/mlm_100_1280.pth

from xlm.

vvssttkk avatar vvssttkk commented on July 29, 2024

plus, for the bpe i should use this tokenization for mlm_17_1280.pth?
image

from xlm.

vvssttkk avatar vvssttkk commented on July 29, 2024

so, when i run to_bpe(sentences) i get next error
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/sentences.bpe'

tmp folder i should create my hands? and where i should take sentences.bpe?

sorry, but your notebook have many errors at path to another users

from xlm.

vvssttkk avatar vvssttkk commented on July 29, 2024

also, what does it mean?
/private/home/aconneau/projects/XLM/data/wiki/17/175k/ i think this path are not available

from xlm.

vvssttkk avatar vvssttkk commented on July 29, 2024

plus, at folder tools i didn't give fastBPE
i should install from here. Is it's true?

from xlm.

vvssttkk avatar vvssttkk commented on July 29, 2024

solved errors and create new pr describing the steps

from xlm.

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.