model_server: [Bug]: OpenVINO Server does not override the default max_context_length=512 with the value specified in the model.xml file
OpenVINO Version
2024.5
Operating System
Windows 11
Device used for inference
GPU
Framework
None
Model used
BAAI/bge-m3
Issue description
Openvino Server does not override the default max_context_length=512 with the one contained in the model.xml file
Step-by-step reproduction
Convert the embedding model to the OpenVINO IR format using the OpenVINO Toolkit and serve it with the openvino/model_server:latest-gpu Docker image.
When calling the http://localhost:8001/v3/embeddings API, the server throws the following error, even though the model has a max_position_embeddings value of 8194:
calculator_graph.cc:853] INVALID_ARGUMENT: CalculatorGraph::Run() failed in Run: Calculator::Process() for node “EmbeddingsCalculator” failed: Input length 617 longer than allowed 512
Relevant log output
calculator_graph.cc:853] INVALID_ARGUMENT: CalculatorGraph::Run() failed in Run:
Calculator::Process() for node "EmbeddingsCalculator" failed: Input length 617 longer than allowed 512
Issue submission checklist
- I’m reporting an issue. It’s not a question.
- I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found a solution.
- There is reproducer code and related data files such as images, videos, models, etc.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 22
@fedecompa Perhaps this log is not fully intuitive but here the available memory refers to the host or accelerator installed memory. Out of such “available” memory there is reported occupied volume. The difference would represent free memory which is less than the required allocation. As a reference, here is the code which defines this behavior https://github.com/openvinotoolkit/openvino/blob/69d4b3b232065fb416c570ab59d8ffcf29f690b0/src/plugins/intel_gpu/src/runtime/engine.cpp#L83 https://github.com/openvinotoolkit/openvino/blob/69d4b3b232065fb416c570ab59d8ffcf29f690b0/src/plugins/intel_gpu/src/runtime/ocl/ocl_engine.cpp#L164
@fedecompa apparently there is insufficient GPU memory for the allocation with the bigger batch size. The allocation might be quite high with long inputs and big batches. You have also high memory consumption probably from the load other than embedding model. Be aware that WSL is assigning half of the host RAM so the linux OS might see less than the host. Also iGPU is using the OS memory but only half of it. I see the following options:
@fedecompa The windows version of the server was not retrieving correctly the information from the model about the context. It is now corrected on the main branch. Note that generative endpoint on windows server are now under development and testing. Production ready windows version of the server will be published in the coming release.