# Word2Vec performance getting synonyms

**URL:** <https://community.konduit.ai/t/word2vec-performance-getting-synonyms/1764>\
**Category:** DL4J\
**Created:** [February 1, 2022, 3:49pm UTC](https://community.konduit.ai/t/word2vec-performance-getting-synonyms/1764 "2022-02-01T15:49:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dantuzi](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/dantuzi/32/709_2.png) [@dantuzi](https://community.konduit.ai/u/dantuzi)\
**Post date:** [February 1, 2022, 3:49pm UTC](https://community.konduit.ai/t/word2vec-performance-getting-synonyms/1764/1 "2022-02-01T15:49:39Z")

</div>

Hello everybody,  
I’m a new user of the Word2Vec model to retrieve the list of synonyms of a term.

I executed some benchmarks with a model with about 800k vectors of dimension 100 and I noticed that researching the top 10 nearest words takes more than 80ms using the `wordsNearest(word, 10)` method.  
I ran a similar benchmark using a [library](https://github.com/jelmerk/hnswlib) that implements HNSW. Despite a bigger dataset than the previous benchmark (2 M vectors of size 300), each research took about 5ms.

The difference is impressive so I was wondering if there is a reason for DL4J not implementing HNSW for searching the nearest vectors… or maybe I’m using the wrong method to get the word synonyms.

Thanks in advance
