embedding-service:
dockerfile-embedding.embedding-service.py.splade-doc-service:
dockerfile-splade.splade-doc-service.py.splade-query-service:
reranking-service:
dockerfile-reranking.
-- Exposes port 8000.CUDA_VISIBLE_DEVICES=0).pytorch/pytorch:2.3.1-cuda11.8-cudnn8-runtime) for neural network operations.The deployment setup ensures that each component can be scaled independently while being robust against failures thanks to restart policies set in the Docker Compose file.
This structured overview provides insights into how various components interact within this microservices architecture using modern tools such as Docker, FastAPI, PyTorch, Transformers library for handling complex NLP tasks efficiently within an API framework accessible over standard HTTP methods.
You can run via:
docker compose up -d
or without docker:
tail -f logs.txt & python3 embedding-service.py >> logs.txt & python3 reranking-service.py >> logs.txt & python3 splade-doc-service.py >> logs.txt & python3 splade-query-service.py >> logs.txt
Multiple model is available only in embedding-service, you can refer to the API in several different ways for embedding-service:
curl -s http://127.0.0.1:6000/embeddings -X POST -H "Content-Type: application/json" -d '{"input": "What is Deep Learning?", "model": "jina-embeddings-v2-base-en"}'
If your application additionally adds "api-version" to the endpoint, embedding-service will also return the result correctly (this value is ignored)
curl -s http://127.0.0.1:6000/embeddings?api-version=2023-05-15 -X POST -H "Content-Type: application/json" -d '{"input": "What is Deep Learning?", "model": "jina-embeddings-v2-base-en"}'
Also, embeddings will be returned correctly if you add the organisation name before the model name.
curl -s http://127.0.0.1:6000/embeddings -X POST -H "Content-Type: application/json" -d '{"input": "What is Deep Learning?", "model": "jinaai/jina-embeddings-v2-base-en"}'
curl -s http://127.0.0.1:8000/rerank -X POST -H 'Content-Type: application/json' -d '{"query":"What is Deep Learning?", "texts": ["Deep Learning is not...", "Deep learning is..."], "truncate": true}'
curl -s http://127.0.0.1:4000/embed_sparse -X POST -H "Content-Type: application/json" -d '{"inputs": "What is Deep Learning?"}'
curl -s http://127.0.0.1:5000/embed_sparse -X POST -H "Content-Type: application/json" -d '{"inputs": "What is Deep Learning?"}'
10 commits
Python
100.0%
embedding-service:
dockerfile-embedding.embedding-service.py.splade-doc-service:
dockerfile-splade.splade-doc-service.py.splade-query-service:
reranking-service:
dockerfile-reranking.
-- Exposes port 8000.CUDA_VISIBLE_DEVICES=0).pytorch/pytorch:2.3.1-cuda11.8-cudnn8-runtime) for neural network operations.The deployment setup ensures that each component can be scaled independently while being robust against failures thanks to restart policies set in the Docker Compose file.
This structured overview provides insights into how various components interact within this microservices architecture using modern tools such as Docker, FastAPI, PyTorch, Transformers library for handling complex NLP tasks efficiently within an API framework accessible over standard HTTP methods.
You can run via:
docker compose up -d
or without docker:
tail -f logs.txt & python3 embedding-service.py >> logs.txt & python3 reranking-service.py >> logs.txt & python3 splade-doc-service.py >> logs.txt & python3 splade-query-service.py >> logs.txt
Multiple model is available only in embedding-service, you can refer to the API in several different ways for embedding-service:
curl -s http://127.0.0.1:6000/embeddings -X POST -H "Content-Type: application/json" -d '{"input": "What is Deep Learning?", "model": "jina-embeddings-v2-base-en"}'
If your application additionally adds "api-version" to the endpoint, embedding-service will also return the result correctly (this value is ignored)
curl -s http://127.0.0.1:6000/embeddings?api-version=2023-05-15 -X POST -H "Content-Type: application/json" -d '{"input": "What is Deep Learning?", "model": "jina-embeddings-v2-base-en"}'
Also, embeddings will be returned correctly if you add the organisation name before the model name.
curl -s http://127.0.0.1:6000/embeddings -X POST -H "Content-Type: application/json" -d '{"input": "What is Deep Learning?", "model": "jinaai/jina-embeddings-v2-base-en"}'
curl -s http://127.0.0.1:8000/rerank -X POST -H 'Content-Type: application/json' -d '{"query":"What is Deep Learning?", "texts": ["Deep Learning is not...", "Deep learning is..."], "truncate": true}'
curl -s http://127.0.0.1:4000/embed_sparse -X POST -H "Content-Type: application/json" -d '{"inputs": "What is Deep Learning?"}'
curl -s http://127.0.0.1:5000/embed_sparse -X POST -H "Content-Type: application/json" -d '{"inputs": "What is Deep Learning?"}'
10 commits
Python
100.0%