Highlights • Overview • Install • Getting Started • Usage • Tutorials • FAQ
GNES [jee-nes] is Generic Neural Elastic Search, a cloud-native semantic search system based on deep neural network.
GNES enables large-scale index and semantic search for text-to-text, image-to-image, video-to-video and possibly any-to-any content form.
- ☁️ Cloud-native: GNES is all-in-microservice: encoder, indexer, preprocessor and router are all running statelessly and independently in their own containers. They communicate via versioned APIs and collaborate under the orchestration of Docker Swarm/Kubernetes etc. Scaling, load-balancing, automated recovering, they come off-the-shelf in GNES.
- 🐣 Easy-to-use on every level: How long would it take to deploy a change that involves just changing the encoder from BERT to ELMO or switching a layer in VGG? In GNES, this is just one line change in a YAML file. We abstract the encoding and indexing logic from the code to a YAML config, so that you can combine or stack encoders and indexers without even touching the codebase.
- 🚀 State-of-the-art: Taking advantage of fast-evolving AI/ML/NLP/CV communities, we learn from best-of-breed deep learning models and plug them into GNES, making sure you always enjoy the state-of-the-art performance.
- 🔩 Generic and compatible: Searching for texts, image or even short-videos? Using Python/C/Java/Go/HTTP as the client? Doesn't matter which content form you have or which language do you use, GNES can handle them all.
- 💯 Best practice: We love to learn the best practice from the community, helping our GNES to achieve the next level of availability, resiliency, performance, and durability. If you have any ideas or suggestions, feel free to contribute.
As a cloud-native application, GNES requires an orchestration engine to coordinate all micro-services. Currently, we support Kubernetes, Docker Swarm and a built-in solution. Click on one of the icons below to get started.
![]() |
![]() |
![]() |
---|
TBA
The easiest and the recommended way to use GNES is via Docker, which uses containers to create virtual environments that isolate a GNES installation from the rest of the system. You don't need to worry about dependencies, they are self-contained in the GNES docker image. Moreover, GNES relies on the Docker Swarm for managing, scaling and conducting orchestration tasks over multiple micro-services.
If you are new to GNES, it is recommended to use the wizard to config and start GNES.
bash <(curl -s https://raw.githubusercontent.com/gnes-ai/wizard/build/wizard.sh)
At the last step, the wizard will generate a random name for the service, say my-gnes-0531
. Keep that name in mind. If you miss that name, you can always use docker stack ls
to checkout the name of your service.
How do I know if GNES is running succesfully? (click to expand...)
To tell whether the service is running successfully or not, you can use docker stack ps my-gnes-0531
. It should give you results as follows:
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
zku2zm9deli9 my-gnes-0531_encoder.1 ccr.ccs.tencentyun.com/gnes/aipd-gnes:86c0a3a VM-0-3-ubuntu Running Running about an hour ago
yc09pst6s7yt my-gnes-0531_grpc_serve.1 ccr.ccs.tencentyun.com/gnes/aipd-gnes:86c0a3a VM-0-3-ubuntu Running Running about an hour ago
Note, the running status under CURRENT STATE
suggests everything is fine.
How can I terminate GNES? (click to expand...)
To stop a running GNES service, you can use docker stack rm my-gnes-0531
.
- Having troubles to start GNES? Checkout our troubleshooting guide.
- For pro-users/developers, you may want to use our
gnes-yaml.sh
tools to generate a YAML config via CLI; or simply handcraft your owndocker-compose.yml
.
TBA
First thing to know, GNES has three independent runtimes: train, index and search. This differs from the classic machine learning system which has two runtimes i.e. train and inference; also differs from the classic search system that has two runtimes i.e. index and search. Depending on the runtime of GNES, the microservices may be composed, work and communicate with others in different ways. In other word, the runtime determines which service doing what logic at when. In the sequel, we will demonstrate how to use GNES under different runtimes.
Note, to switch between runtimee you need to shutdown the current runtime and start a new GNES.
TBA
TBA
TBA
The official documentation of GNES is hosted on doc.gnes.ai. It is automatically built, updated and archived on every new release.
TBA
Thanks for your interest in contributing! There are many ways to get involved; start with our contributor guidelines and then check these open issues for specific tasks.
For contributors looking to get deeper into the API we suggest cloning the repository and checking out the unit tests for examples of how to call methods.
TBA
@misc{tencent2019GNES,
title={GNES: Generic Neural Elastic Search},
author={Xiao, Han and Yan, Jianfeng and Wang, Feng and Fu, Jie},
howpublished={\url{https://github.com/gnes-ai}},
year={2019}
}
Tencent is pleased to support the open source community by making GNES available.
Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
If you have downloaded a copy of the GNES binary or source code, please note that the GNES binary and source code are both licensed under the Apache License, Version 2.0.