Spaces:
Build error
Build error
Update main.py
Browse files
main.py
CHANGED
@@ -46,13 +46,8 @@ class PDFProcessor:
|
|
46 |
def _initialize_llm(self):
|
47 |
"""Initialize MLC LLM engine with optimized settings"""
|
48 |
try:
|
49 |
-
return MLCEngine(
|
50 |
-
|
51 |
-
mode="server",
|
52 |
-
device="cuda" if os.getenv("USE_CUDA", "0") == "1" else "auto",
|
53 |
-
temperature=0.1,
|
54 |
-
max_tokens=512
|
55 |
-
)
|
56 |
except Exception as e:
|
57 |
logger.error(f"Failed to initialize MLC Engine: {e}")
|
58 |
raise
|
|
|
46 |
def _initialize_llm(self):
|
47 |
"""Initialize MLC LLM engine with optimized settings"""
|
48 |
try:
|
49 |
+
# return MLCEngine(model="HF://mlc-ai/Llama-3-8B-Instruct-q4f16_1-MLC")
|
50 |
+
return MLCEngine(model="HF://mlc-ai/Llama-2-7B-q4f16_1-MLC")
|
|
|
|
|
|
|
|
|
|
|
51 |
except Exception as e:
|
52 |
logger.error(f"Failed to initialize MLC Engine: {e}")
|
53 |
raise
|