跳到正文
Skillpedia
API 与服务器(后端)5.7k · #14750

hf-cache-models

它能做什么

这项技能教智能体如何检查正在运行的 MLX-VLM 服务器上有哪些可用模型。适合想查看缓存或自定义模型、并确认每个模型是否已加载的人。

适用场景

  • ✓当用户想查看正在运行的服务器可以使用哪些模型的时候。
  • ✓当用户需要确认某个模型是否已经加载的时候。
  • ✓当用户有自定义模型文件夹,希望服务器将其列出来的时候。

技能链接

https://github.com/Blaizzy/mlx-vlm/blob/main/skills/skills/hf-cache-models/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/Blaizzy/mlx-vlm/blob/main/skills/skills/hf-cache-models/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我正在运行的 MLX-VLM 服务器现在能看到哪些模型?哪些已经加载了?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会调用服务器的模型列表地址,读取返回的列表,其中显示每个模型的 ID 以及是否已加载。这项检查不会加载模型权重。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

HF Cache Models

Query a running MLX-VLM server to list model candidates and their loaded status. Use its configured URL and authentication; the examples assume the default local address. See Skill("mlx-vlm-skills:server-inference") for server setup.

List Models

curl http://127.0.0.1:8080/v1/models

The JSON response's data array contains model IDs and a loaded boolean. Both /models and /v1/models include loaded models, the shared Hugging Face cache, and configured custom directories by default.

Supported Model Rule

The server checks discovered candidates with mlx_vlm/server/model_discovery.py:

  • repo type is model
  • readable model metadata exists in config.json or a pipeline model_index.json
  • nonempty safetensors weights exist, including every shard referenced by any weight index
  • all cached revisions are checked, preferring main; another revision is returned using its absolute snapshot path
  • tokenizer metadata is not required

Discovery does not load weights, execute checkpoint Python, or prove generation works. Architecture compatibility is checked when loading a model.

Custom Model Directories

Each path can be a model folder or a parent containing model folders as immediate children. Configure the server with repeated --model-dir options, or MLX_VLM_MODEL_PATHS with paths separated by os.pathsep (: on macOS/Linux).

For directories scoped to one API request, use repeated model_dir query parameters on /models or /v1/models. Paths are on the server's filesystem and are added to its configured directories without persisting them:

curl --get http://127.0.0.1:8080/v1/models \
  --data-urlencode 'model_dir=/Volumes/Models' \
  --data-urlencode 'model_dir=/Users/me/my custom model'

Reporting

When reporting the result, include:

  • server URL and any custom directories requested
  • number of model candidates
  • exact model IDs
  • which models have loaded: true

If this becomes part of a bug report, switch to Skill("mlx-vlm-skills:reproducible-github-issues").

常见问题

列出模型会加载它们吗?

不会。这项技能说明,发现模型的过程不会加载权重,也不会运行检查点代码。

列表中包含我的自定义文件夹吗?

包含,前提是服务器已设置自定义模型目录。

列出的模型一定能用吗?

不一定。这项技能说明,列表并不能证明生成功能正常运行。

详情

作者的原始描述

Use this skill when the user wants to list, inspect, or report cached, custom, or loaded MLX-VLM models through the server's model discovery endpoint.

repo: Blaizzy/mlx-vlm

热度

GitHub 星标
5.7k
排名
#14750
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能