MLX
MLX 是一个类似于
NumPy
的数组框架,专为在Apple
芯片上进行高效且灵活的机器学习而设计,由Apple 机器学习研究
团队为您带来。
安装与设置
安装几个 Python 包
pip install mlx-lm transformers huggingface_hub
聊天模型
查看使用示例。
from langchain_community.chat_models.mlx import ChatMLX
API 参考:ChatMLX
LLMs
MLX 本地管道
查看使用示例。
from langchain_community.llms.mlx_pipeline import MLXPipeline
API 参考:MLXPipeline