lmcache-demo / docs /setup_guide.md
Estone's picture
Upload docs/setup_guide.md with huggingface_hub
db0ada2 verified
|
Raw
History Blame Contribute Delete
967 Bytes

A newer version of the Gradio SDK is available: 6.20.0

Upgrade

HF Zero GPU Setup Guide

Prerequisites

  • Hugging Face account
  • HF Token (for gated models)
  • Basic understanding of LMCache

Step 1: Create HF Space

  1. Go to https://huggingface.co/new-space
  2. Configure:
    • SDK: Docker
    • Hardware: ZeroGPU (free T4)
    • Python: 3.12

Step 2: Upload Files

Upload all files from this repository to your Space.

Step 3: Set Environment Variables

For local testing:

export HF_TOKEN="hf_your_token_here"

For HF Space deployment:

In Space Settings, add:

HF_TOKEN=<your_hf_token>

Step 4: Test

  1. Enter a prompt
  2. Select a model
  3. Click Submit

Troubleshooting

Model Download Slow

First startup downloads models. Use smaller models like facebook/opt-125m for faster testing.

OOM Errors

Reduce gpu_memory_utilization in app.py if you encounter out-of-memory errors.

Zero GPU Quota

Zero GPU has usage limits. Monitor your usage in HF dashboard.