ndc8
commited on
Commit
·
97bafdb
1
Parent(s):
c6f7b75
Fix model dependencies and warnings
Browse files- Add protobuf>=3.20.0 to requirements.txt (required for DeepSeek tokenizer)
- Add warning suppression for FutureWarning and rope_scaling messages
- Suppress slow image processor warnings
- These changes address the tokenizer loading issues with the new DeepSeek model
- backend_service.py +7 -0
- requirements.txt +1 -0
backend_service.py
CHANGED
@@ -4,6 +4,13 @@ Provides OpenAI-compatible chat completion endpoints
|
|
4 |
"""
|
5 |
|
6 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# Direct Hugging Face caches to a writable folder under /tmp (use only HF_HOME, TRANSFORMERS_CACHE is deprecated)
|
8 |
os.environ.setdefault("HF_HOME", "/tmp/.cache/huggingface")
|
9 |
# Suppress advisory warnings from transformers (including deprecation warnings)
|
|
|
4 |
"""
|
5 |
|
6 |
import os
|
7 |
+
import warnings
|
8 |
+
|
9 |
+
# Suppress warnings before any other imports
|
10 |
+
warnings.filterwarnings("ignore", category=FutureWarning, module="transformers")
|
11 |
+
warnings.filterwarnings("ignore", message=".*slow image processor.*")
|
12 |
+
warnings.filterwarnings("ignore", message=".*rope_scaling.*")
|
13 |
+
|
14 |
# Direct Hugging Face caches to a writable folder under /tmp (use only HF_HOME, TRANSFORMERS_CACHE is deprecated)
|
15 |
os.environ.setdefault("HF_HOME", "/tmp/.cache/huggingface")
|
16 |
# Suppress advisory warnings from transformers (including deprecation warnings)
|
requirements.txt
CHANGED
@@ -5,6 +5,7 @@ torch>=2.0.0
|
|
5 |
Pillow>=10.0.0
|
6 |
accelerate>=0.24.0
|
7 |
requests>=2.31.0
|
|
|
8 |
# NOTE: GGUF models like 'unsloth/DeepSeek-R1-0528-Qwen3-8B-GGUF' must be downloaded manually or referenced from HuggingFace, not pip-installed.
|
9 |
fastapi>=0.100.0
|
10 |
uvicorn[standard]>=0.23.0
|
|
|
5 |
Pillow>=10.0.0
|
6 |
accelerate>=0.24.0
|
7 |
requests>=2.31.0
|
8 |
+
protobuf>=3.20.0
|
9 |
# NOTE: GGUF models like 'unsloth/DeepSeek-R1-0528-Qwen3-8B-GGUF' must be downloaded manually or referenced from HuggingFace, not pip-installed.
|
10 |
fastapi>=0.100.0
|
11 |
uvicorn[standard]>=0.23.0
|