Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to load these .bin models with word2vec #2

Open
sia-watsonlee opened this issue Dec 22, 2022 · 1 comment
Open

how to load these .bin models with word2vec #2

sia-watsonlee opened this issue Dec 22, 2022 · 1 comment

Comments

@sia-watsonlee
Copy link

i was wondering if we can load these models with gensim or something similar. since the whole file is binary we need to know its format and more information. can you please provide more info on it ?

@Mazochi
Copy link

Mazochi commented Feb 21, 2023

Hi @sia-watsonlee
It can be loaded with this code:

from gensim.models import KeyedVectors
from gensim.test.utils import datapath
model = KeyedVectors.load_word2vec_format(datapath("/content/word2vec.model-skipgram-size=200-window=5.bin"), binary=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants