2. VS Code Extension¶
The Hugging Face Extension for Visual Studio Code is a great way to interact with the Hub from your development environment. To get started, validate the extension is installed and log into your Hugging Face account.
Validate & Authenticate Extension
- Type this command to verify the extension is installed:
Bash 1
huggingface-cli --help
- Type this command to authenticate with Hugging Face:
Bash 1
huggingface-cli login
- Enter your Hugging Face token when prompted
- Type this command to verify your identity:
Bash 1
huggingface-cli whoami
- You should see: your Hugging Face username and organizations
2.1 Configure Extension¶
We can now configure the extension to work with different backends including:
- Hugging Face Inference API (default)
- Ollama - get up and running locally with LLMs
- openai: any OpenAI compatible API (e.g. llama-cpp-python)
- tgi: Text Generation Inference
TODO → Explore this further
- Read the llm-vscode docs on GitHub.
- Read the Code Llama blog post for an example use case.