跳到主要内容

MLX

MLX 是一个类似 NumPy 的数组框架,专为在 Apple 芯片上进行高效灵活的机器学习而设计,由 Apple 机器学习研究 团队推出。

安装和设置

安装几个 Python 包

pip install mlx-lm transformers huggingface_hub

聊天模型

查看使用示例

from langchain_community.chat_models.mlx import ChatMLX
API 参考:ChatMLX

LLM

MLX 本地管道

查看使用示例

from langchain_community.llms.mlx_pipeline import MLXPipeline
API 参考:MLXPipeline

此页面是否对您有帮助?