# Hugging Face Hub、XET のデバッグ

#### ダウンロードが90%〜99%で停止する

<figure><img src="https://735611837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FAupnur7cpMvilAleA1Gp%2Fimage.png?alt=media&#x26;token=146a3d2e-6c2c-438e-9bf7-6265bc6d6cb4" alt=""><figcaption></figcaption></figure>

次のコマンドでのダウンロードが見られる場合 `hf download unsloth/*` 進行が90%または99%でかなりの時間止まる場合は、現在の実行をキャンセルして、以下のコマンドを追加してみてください：

```bash
pip install -U huggingface_hub

HF_HOME=".cache_new/huggingface" \
HF_XET_CACHE=".cache_new/huggingface/xet" \
HF_HUB_CACHE=".cache_new/huggingface/hub" \
HF_XET_HIGH_PERFORMANCE=1 \
HF_XET_CHUNK_CACHE_SIZE_BYTES=0 \
HF_XET_RECONSTRUCT_WRITE_SEQUENTIALLY=0 \
HF_XET_NUM_CONCURRENT_RANGE_GETS=64 \
hf download unsloth/Qwen3-Coder-Next-GGUF \
    --local-dir unsloth/Qwen3-Coder-Next-GGUF \
    --include "*UD-Q6_K_XL*"
```

#### レート制限または429 Too Many Requestsですか？

次を試してください `snapshot_download` 代わりに、Unslothをインポートすると正しいHugging Faceの変数が設定されます：

```python
import unsloth
import os

os.environ["HF_HOME"] = ".cache_new/huggingface"
os.environ["HF_XET_CACHE"] = ".cache_new/huggingface/xet"
os.environ["HF_HUB_CACHE"] = ".cache_new/huggingface/hub"
from huggingface_hub import snapshot_download
snapshot_download(
    repo_id = "unsloth/Qwen3-Coder-Next-GGUF",
    local_dir = "unsloth/Qwen3-Coder-Next-GGUF",
    allow_patterns = ["*UD-Q6_K_XL*"],
)
```

あるいはまずHugging Faceトークンを取得してみてください（以下から） <https://huggingface.co/settings/tokens>

```bash
pip install -U huggingface_hub

HF_HOME=".cache_new/huggingface" \
HF_XET_CACHE=".cache_new/huggingface/xet" \
HF_HUB_CACHE=".cache_new/huggingface/hub" \
HF_XET_HIGH_PERFORMANCE=1 \
HF_XET_CHUNK_CACHE_SIZE_BYTES=0 \
HF_XET_RECONSTRUCT_WRITE_SEQUENTIALLY=0 \
HF_XET_NUM_CONCURRENT_RANGE_GETS=64 \
    hf download unsloth/Qwen3-Coder-Next-GGUF \
    --local-dir unsloth/Qwen3-Coder-Next-GGUF \
    --include "*UD-Q6_K_XL*" \
    --token "hf_ADD_YOUR_HUGGING_FACE_TOKEN_HERE"
```
