Getting the Hugging Face API Key
Last updated
Last updated
Before deploying the LLaMA model, you need to obtain an API key from Hugging Face. Follow these steps to get your API key.
Go to the Hugging Face website and enter the "Username/Email address" and "password" you use. Click the Login button to enter Hugging Face.
After entering the Hugging Face page, press profile at the top right and select Access Token.
On the Access Tokens page press the "+ Create new token" button.
In this guide, the token type used is Write, enter the token name. Click the Create Token button to create a new token for Hugging Face.
Once you have generated the token, save it securely. You will need it to authenticate your requests to Hugging Face models.
To convert your Hugging Face API token into a text format represented by Base64 characters. You can run the following syntax according to the operating system your computer uses.
On computers using the Linux operating system, you can follow the following steps. Open a terminal on your computer. Run the following command to encode your Hugging Face token to base64.
Replace your-hugging-face-token
with your actual Hugging Face token. The command will output the base64-encoded token.
On computers using the Windows operating system, use PowerShell. Open PowerShell on your computer.
Use the following command to encode your token using Base64 in PowerShell.