google-research / bert

TensorFlow code and pre-trained models for BERT
https://arxiv.org/abs/1810.04805
Apache License 2.0
37.51k stars 9.54k forks source link

BERT feature extraction as a service #123

Open hanxiao opened 5 years ago

hanxiao commented 5 years ago

Thanks for providing those pretrained models. I use them as the sentence encoder and hosts them as a standalone service via ZeroMQ, allowing one to map sentences into fixed-length representations in just two lines of code. It supports both GPU/CPU, single(/multi)-server-single(/multi)-client. Please refer to this repo and check it out: https://github.com/hanxiao/bert-as-service

demo

hanxiao commented 5 years ago

As a encoding service (which often used as a part of dev/prod infrastructure), scalability and efficiency are top priorities. Below I attached some benchmark results. More can be found on https://github.com/hanxiao/bert-as-service#benchmark

client_batch_size max_batch_size max_seq_len num_clients

vikaschib7 commented 5 years ago

Is it possible to see similar words in BERT like if I search for "radar sensor companies", so I can get the similar words related to above query