跳到主要内容
Open on GitHub

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
© . This site is unofficial and not affiliated with LangChain, Inc.
这些文档随着 LangChain v1.0 在 2025 年 10 月的发布而弃用,并且不再维护。 请访问 v1.0 文档