# Hugging Face Hub，XET 调试

#### 下载卡在 90% 到 99%

<figure><img src="https://2657992854-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 请求过多？

尝试使用 `snapshot_download` 代替，然后导入 Unsloth，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"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://unsloth.ai/docs/zh/ji-chu/troubleshooting-and-faqs/hugging-face-hub-xet-debugging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
