apple在 MacOS 上安装 Unsloth

要在本地 Apple MacOS 设备上本地安装 Unsloth,请按照以下步骤操作:

安装 Unsloth

curl -fsSL https://unsloth.ai/install.sh | sh

使用相同的命令进行更新。

启动

每次你想再次启动 Unsloth 时:

unsloth studio -H 0.0.0.0 -p 8888

有关 Unsloth Studio 的详细安装说明和要求, 请查看我们的指南.

卸载

你可以通过删除其安装文件夹来卸载 Unsloth Studio,该文件夹通常位于 $HOME/.unsloth/studio 在 Mac/Linux/WSL 上。或者运行:

  • MacOS、WSL、Linux: rm -rf ~/.unsloth/studio

  • 可选: 删除 ~/.unsloth 如果你想删除所有 Unsloth 文件,可在 MacOS/Linux/WSL 上执行

circle-exclamation

如果你仍然在使用 Unsloth 时遇到依赖问题,许多用户通过强制卸载并重新安装 Unsloth 解决了问题:

pip install --upgrade --force-reinstall --no-cache-dir --no-deps unsloth
pip install --upgrade --force-reinstall --no-cache-dir --no-deps unsloth_zoo

删除模型文件

你可以通过模型搜索中的垃圾桶图标删除旧模型文件,或者从默认的 Hugging Face 缓存目录中删除相关的已缓存模型文件夹。默认情况下,Hugging Face 使用 ~/.cache/huggingface/hub/ 在 macOS/Linux/WSL 上。

  • MacOS、Linux、WSL: ~/.cache/huggingface/hub/

在 Linux 和 WSL 上, XDG_CACHE_HOME 也可以更改默认缓存根目录。

最后更新于

这有帮助吗?