Spaces:
Running on Zero
Running on Zero
Correct Gradio compatibility metadata and requirements
Browse files- README.md +1 -1
- requirements.txt +4 -41
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🧪
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
short_description: Load and test HF causal LLMs on ZeroGPU
|
| 10 |
python_version: "3.10"
|
|
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 5.50.0
|
| 8 |
app_file: app.py
|
| 9 |
short_description: Load and test HF causal LLMs on ZeroGPU
|
| 10 |
python_version: "3.10"
|
requirements.txt
CHANGED
|
@@ -1,41 +1,4 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
colorTo: indigo
|
| 6 |
-
sdk: gradio
|
| 7 |
-
sdk_version: 5.50.0
|
| 8 |
-
app_file: app.py
|
| 9 |
-
short_description: Load and test HF causal LLMs on ZeroGPU
|
| 10 |
-
python_version: "3.10"
|
| 11 |
-
startup_duration_timeout: 1h
|
| 12 |
-
---
|
| 13 |
-
|
| 14 |
-
# Dynamic LLM ZeroGPU Playground
|
| 15 |
-
|
| 16 |
-
A small, general-purpose playground for testing standard Hugging Face causal
|
| 17 |
-
language models by model ID.
|
| 18 |
-
|
| 19 |
-
## How it works
|
| 20 |
-
|
| 21 |
-
1. Enter a model ID such as `Qwen/Qwen2.5-0.5B-Instruct`.
|
| 22 |
-
2. Click **Download** to fetch the snapshot into the Space's CPU-side cache.
|
| 23 |
-
3. Click **Load** to put that model on the ZeroGPU worker.
|
| 24 |
-
4. Chat with the model, or use **Unload** before switching models.
|
| 25 |
-
5. Use **Delete from disk** to unload first, then remove all cached revisions for the selected ID.
|
| 26 |
-
|
| 27 |
-
Only one model is kept active by the runtime. Switching models releases the
|
| 28 |
-
previous model with `del`, `gc.collect()`, and `torch.cuda.empty_cache()` before
|
| 29 |
-
the new model is loaded. Chat templates are used whenever the tokenizer
|
| 30 |
-
provides `apply_chat_template()`.
|
| 31 |
-
|
| 32 |
-
This MVP intentionally targets standard `transformers` +
|
| 33 |
-
`AutoModelForCausalLM` checkpoints. The loader is isolated in
|
| 34 |
-
`TransformersCausalLMRuntime`, so AWQ, GPTQ, or FP8 backends can be added later.
|
| 35 |
-
|
| 36 |
-
## Notes
|
| 37 |
-
|
| 38 |
-
- Model downloads happen on CPU and are never triggered by the chat handler.
|
| 39 |
-
- A model must be downloaded before it can be loaded or used.
|
| 40 |
-
- Large models may exceed ZeroGPU memory or take a long time to load.
|
| 41 |
-
- Remote model code is disabled in this first version for safety and stability.
|
|
|
|
| 1 |
+
transformers==4.57.6
|
| 2 |
+
accelerate>=0.34.0
|
| 3 |
+
safetensors>=0.4.3
|
| 4 |
+
sentencepiece>=0.2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|