pdf-icon

StackFlow AI Platform

Module LLM Applications

CV Vision Application

Vision Language Model (VLM)

Large Language Model (LLM)

Voice Assistant

Model List

This API is used to retrieve the list of models currently installed on the device.

Model Installation and Viewing

  1. Before use, please refer to the software update guide for the corresponding device to complete the addition of M5Stack apt software source information and update the model list.
  1. View the list of available llm deb packages. Packages named in the format llm-model-name are model packages.
apt list | grep llm-model-
  1. Install the required software package using the apt command, for example, installing the llm-model-qwen2.5-0.5b-p256-ax630c package. The specific model package must be selected according to the platform.
    • ModuleLLM / LLM630 Compute Kit platform model suffix: -ax630c
    • AI Pyramid platform model suffix: -ax650
    • LLM8850 platform model suffix: -axcl For details, refer to the Model Introduction section.
apt install llm-model-qwen2.5-0.5b-p256-ax630c

View Available Models

Installed models can be queried directly through the OpenAI API to obtain the list of models available on the current device. Before running the program, modify the IP part of base_url below to the actual IP address of the device.

Note
After installing a new model each time, you need to manually execute systemctl restart llm-openai-api to update the model list.

Curl Call

curl http://127.0.0.1:8000/v1/models \
  -H "Content-Type: application/json"

Python Call

from openai import OpenAI
client = OpenAI(
    api_key="sk-",
    base_url="http://192.168.20.186:8000/v1"
)

client.models.list()
print(client.models.list())

Response Example

SyncPage[Model](data=[
Model(id='melotts_zh-cn', created=0, object='model', owned_by='user', permission=[], root=''),
Model(id='qwen2.5-0.5B-prefill-20e', created=0, object='model', owned_by='user', permission=[], root=''),
Model(id='sherpa-ncnn-streaming-zipformer-20M-2023-02-17', created=0, object='model', owned_by='user', permission=[], root=''),
Model(id='sherpa-ncnn-streaming-zipformer-zh-14M-2023-02-23', created=0, object='model', owned_by='user', permission=[], root=''),
Model(id='single_speaker_english_fast', created=0, object='model', owned_by='user', permission=[], root=''),
Model(id='single_speaker_fast', created=0, object='model', owned_by='user', permission=[], root=''),
Model(id='qwen2.5-0.5B-p256-ax630c', created=0, object='model', owned_by='user', permission=[], root='')
],
object='list')
On This Page