Mr-Gondal commited on
Commit
1124e00
·
1 Parent(s): f813ac4

Fix Modal inference startup for Scholar Lens

Browse files

- Deploy Modal backend under a clean v2 app name
- Pin transformers to 4.51.3 to fix Qwen2 tokenizer startup crash in vLLM
- Keep CUDA devel image for reliable vLLM/flashinfer GPU startup
- Restore working AI summarize and synthesis endpoints for the Gradio Space

Files changed (1) hide show
  1. modal_inference.py +2 -1
modal_inference.py CHANGED
@@ -8,7 +8,7 @@ from typing import Annotated
8
  import modal
9
  from fastapi import Header, HTTPException
10
 
11
- app = modal.App("scholar-lens-summarizer")
12
 
13
  MODEL_NAME = os.getenv("SCHOLAR_LENS_MODEL", "Qwen/Qwen2.5-3B-Instruct")
14
  GPU_TYPE = os.getenv("SCHOLAR_LENS_GPU", "L4")
@@ -40,6 +40,7 @@ image = (
40
  .env({"CUDA_HOME": "/usr/local/cuda"})
41
  .pip_install(
42
  "vllm==0.8.5.post1",
 
43
  "fastapi[standard]",
44
  )
45
  )
 
8
  import modal
9
  from fastapi import Header, HTTPException
10
 
11
+ app = modal.App("scholar-lens-summarizer-v2")
12
 
13
  MODEL_NAME = os.getenv("SCHOLAR_LENS_MODEL", "Qwen/Qwen2.5-3B-Instruct")
14
  GPU_TYPE = os.getenv("SCHOLAR_LENS_GPU", "L4")
 
40
  .env({"CUDA_HOME": "/usr/local/cuda"})
41
  .pip_install(
42
  "vllm==0.8.5.post1",
43
+ "transformers==4.51.3",
44
  "fastapi[standard]",
45
  )
46
  )