SetFit 文件

安裝

Hugging Face's logo
加入 Hugging Face 社群

並獲得增強的文件體驗

開始使用

安裝

在開始之前,您需要設定環境並安裝相應的軟體包。🤗 SetFit 經過 Python 3.9+ 測試。

pip

安裝 🤗 SetFit 最直接的方法是使用 pip

pip install setfit

如果您有支援 CUDA 的顯示卡,建議安裝支援 CUDA 的 torch,以便更快地訓練和執行推理。

pip install torch --index-url https://download.pytorch.org/whl/cu118

從原始碼安裝

從原始碼構建 🤗 SetFit 可以讓您更改程式碼庫。要從原始碼安裝,請克隆儲存庫並使用以下命令以可編輯模式安裝 🤗 SetFit

git clone https://github.com/huggingface/setfit.git
cd setfit
pip install -e .

如果您只想使用最新版本而不進行任何更改,請執行以下命令從原始碼安裝

pip install git+https://github.com/huggingface/setfit.git

Conda

如果 Conda 是您首選的包管理系統,那麼您可以這樣安裝 🤗 SetFit

conda install -c conda-forge setfit
< > 在 GitHub 上更新

© . This site is unofficial and not affiliated with Hugging Face, Inc.