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/all_datasets_v4_MiniLM-L6", "model_device": "cpu"},
    {"model_name": "hf/all_datasets_v4_MiniLM-L6", "model_device": "cuda"},
    {"model_name": "ViT-L/14", "model_device": "cpu"},
    {"model_name": "ViT-L/14", "model_device": "cuda"},
    {"model_name": "ViT-B/16", "model_device": "cpu"}]}