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。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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.jsonor a pipelinemodel_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
评论
- …
同一仓库的更多技能
cli-inference
5.7k帮你的智能体从命令行运行或排查 MLX-VLM 模型推理,支持文本、图像和音频输入,并为每项任务找到正确的参数。
convert-quantize
5.7k帮你的智能体把 Hugging Face 模型转换为 MLX 格式,并通过量化使其变小,同时为本地设备选择位宽、模式和校准方式。
reproducible-github-issues
5.7k帮你的智能体为 MLX-VLM 撰写清晰、可复现的 GitHub 问题报告,附上环境信息、准确命令和一个小示例,用于反馈缺陷或速度变慢的问题。
server-inference
5.7k帮你的智能体运行并调试 MLX-VLM API 服务器,涵盖健康检查、聊天和 responses 请求、流式输出以及常见的请求错误。