Common HF Errors

Common HF Errors

⚠️
ValueError: Provider 'featherless-ai' not supported. Available values: 'auto' or any provider from ['black-forest-labs', 'cerebras', 'cohere', 'fal-ai', 'fireworks-ai', 'hf-inference', 'hyperbolic', 'nebius', 'novita', 'openai', 'replicate', 'sambanova', 'together'].Passing 'auto' (default value) will automatically select the first provider available for the model, sorted by the user's order in https://hf.co/settings/inference-providers.
To fix this error, we specified the 'hf-inference' provider in the InferenceClient initialization like this:
client = InferenceClient( model="HuggingFaceH4/zephyr-7b-beta", provider="hf-inference" )
⚠️
401 Client Error: Unauthorized for url
This is an authentication issue! It means your Hugging Face API token is either missing or invalid. Check that your Hugging Face access token (assigned to a secret variable in your space settings) is saved as HF_TOKEN with all capital letters (not hf_token or HF_Token)! This is a fixed requirement of the Hugging Face Inference API and so we must use that exact variable name.