# HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/api/models/org/nonexistent-model

- **ID:** `huggingface/model-card-not-found`
- **Domain:** huggingface
- **Category:** network_error
- **Error Code:** `404`
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

The model identifier does not exist on the Hugging Face Hub, either due to a typo, private repository without access, or model deletion.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| huggingface-hub>=0.11.0 | active | — | — |
| transformers>=4.20.0 | active | — | — |

## Workarounds

1. **Verify the exact model identifier on the Hugging Face Hub and correct it: `model_id = 'bert-base-uncased'  # correct identifier`** (95% success)
   ```
   Verify the exact model identifier on the Hugging Face Hub and correct it: `model_id = 'bert-base-uncased'  # correct identifier`
   ```
2. **If the model is private, log in with `huggingface-cli login` and use `token=True` in `from_pretrained()`: `model = AutoModel.from_pretrained('org/private-model', token=True)`** (90% success)
   ```
   If the model is private, log in with `huggingface-cli login` and use `token=True` in `from_pretrained()`: `model = AutoModel.from_pretrained('org/private-model', token=True)`
   ```
3. **Search for the model using the Hub API: `import requests; r = requests.get('https://huggingface.co/api/models?search=bert'); r.json()` to find valid identifiers.** (85% success)
   ```
   Search for the model using the Hub API: `import requests; r = requests.get('https://huggingface.co/api/models?search=bert'); r.json()` to find valid identifiers.
   ```

## Dead Ends

- **Adding `--use_auth_token` or `token=True` without a valid token** — If the model does not exist at all, authentication does not help; 404 persists. (80% fail)
- **Checking the model page manually but not correcting the identifier in code** — The code still uses the wrong identifier; manual verification does not fix the programmatic call. (90% fail)
- **Clearing the cache and retrying** — The error is a server-side 404, not a cache issue; clearing cache has no effect. (70% fail)
