| # Runtime dependencies for the Gradio SDK / ZeroGPU Hugging Face Space. | |
| # Read by HF Spaces' Gradio runner at build time. | |
| gradio>=6.17.3 | |
| spaces>=0.30.0 | |
| # huggingface_hub: pinned <1.0 because transformers 4.55-4.57 (our pin below | |
| # to match the MiniCPM bundled modeling code) requires huggingface_hub<1.0. | |
| # That window also satisfies gradio's <2.0,>=0.33.5 requirement. | |
| huggingface_hub>=0.34.0,<1.0 | |
| pydantic>=2.7 | |
| websockets>=14.0 | |
| fastapi | |
| uvicorn | |
| # Text LLM backend: HF transformers + PyTorch, MiniCPM4.1-8B is loaded | |
| # CPU-side at import and moved to cuda inside the @spaces.GPU function. | |
| # | |
| # transformers pin: openbmb/MiniCPM4.1-8B's bundled modeling_minicpm.py | |
| # imports CacheLayerMixin/DynamicLayer (added ~4.55) AND | |
| # is_torch_fx_available from utils.import_utils (removed in 5.0). The 4.55- | |
| # 4.57 window is the only range where both symbols coexist; outside it the | |
| # KV-cache path is broken and we have to fall back to O(n^2) decoding. | |
| torch>=2.4.0 | |
| transformers>=4.55.0,<5.0 | |
| accelerate>=1.0.0 | |
| sentencepiece | |