---
title: "Quantize Models to NVFP4 with NVIDIA Model Optimizer — Troubleshooting"
canonical: "https://build.nvidia.com/spark/nvfp4-quantization/troubleshooting.md"
---

# Common issues

The **Hardware platform** column shows where an issue is most relevant. "All hardware platforms" applies to every supported platform.

| Symptom | Hardware platform | Cause | Fix |
|---------|-------------------|-------|-----|
| "permission denied" when running docker | All hardware platforms | User not in docker group | Run `sudo usermod -aG docker $USER && newgrp docker` |
| "Permission denied" when accessing Hugging Face | All hardware platforms | Missing or invalid HF token | Export a valid `HF_TOKEN`, or run `huggingface-cli login` |
| Cannot access gated repo for URL | All hardware platforms | Restricted Hugging Face model | Regenerate your [Hugging Face token](https://huggingface.co/docs/hub/en/security-tokens) and request access to the [gated model](https://huggingface.co/docs/hub/en/models-gated) |
| Container exits with CUDA out of memory | All hardware platforms | Insufficient GPU memory | Quantize a smaller model, or free GPU memory and retry |
| Model files not found in output directory | All hardware platforms | Volume mount failed or wrong path | Verify `./output_models` resolves from your working directory and remount |
| Git clone fails inside container | All hardware platforms | Network connectivity issues | Check internet access and retry |
| Quantization process hangs | All hardware platforms | Container resource limits | Increase Docker memory limits or keep `--ulimit` flags from Instructions |
| Log ends with MPI or `ModuleNotFoundError: No module named 'mpi4py'` | DGX Station | Optional MPI runner step after quant | Confirm NVFP4 artifacts exist under `./output_models`; quantization may have succeeded even if the final runner step fails |
| Model runs on wrong GPU | DGX Station | Dual-GPU default selection | Set `GPU_ID` to the GB300 device from `nvidia-smi` and use `--gpus "device=$GPU_ID"` |
| Memory pressure within capacity | DGX Spark | UMA buffer cache not released | See UMA note below |
| Permission denied removing `./output_models` | All hardware platforms | Root-owned files from container | Use `sudo rm -rf ./output_models` |

> [!NOTE]
> **Unified memory (UMA).** On hardware platforms with unified memory, GPU and CPU share memory dynamically. Some applications have not yet been updated for UMA, so you may hit memory issues even within capacity. If that happens, manually flush the buffer cache:
> ```bash
> sudo sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches'
> ```