# 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: ```bash export HF_TOKEN="hf_your_token_here" ``` ### For HF Space deployment: In Space Settings, add: ``` 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.