Skip to content

Get Models

This returns information about all the loaded models in "cuda" and "cpu" devices.

The /models endpoint provides necessary information relating to models loaded in your devices (cpu or cuda). You can check the currently loaded models, and eject a loaded model to free memory.


GET /models

Example

curl  -XGET http://localhost:8882/models
mq.index('my-index').get_loaded_models()

Response: 200 OK

{"models": [
    {"model_name": "hf/e5-base-v2", "model_device": "cpu"},
    {"model_name": "hf/e5-base-v2", "model_device": "cuda"},
    {"model_name": "open_clip/ViT-B-32/laion2b_s34b_b79k", "model_device": "cpu"},
    {"model_name": "open_clip/ViT-B-32/laion2b_s34b_b79k", "model_device": "cuda"},
    {"model_name": "ViT-B/16", "model_device": "cpu"}]}