Skip to content

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
  1. Type this command to verify the extension is installed:
    Bash
    1
    huggingface-cli --help
    
  2. Type this command to authenticate with Hugging Face:
    Bash
    1
    huggingface-cli login
    
  3. Enter your Hugging Face token when prompted
  4. Type this command to verify your identity:
    Bash
    1
    huggingface-cli whoami
    
  5. 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:

  1. Hugging Face Inference API (default)
  2. Ollama - get up and running locally with LLMs
  3. openai: any OpenAI compatible API (e.g. llama-cpp-python)
  4. tgi: Text Generation Inference
TODO → Explore this further