sitatech commited on
Commit
03ba0a4
·
1 Parent(s): c56dbbf

Specify cuda device capability

Browse files
Files changed (1) hide show
  1. llm/app.py +5 -1
llm/app.py CHANGED
@@ -39,6 +39,7 @@ def serve_llm():
39
  import subprocess
40
  import os
41
  import requests
 
42
 
43
  chat_template_path = "/root/chat_template.jinja"
44
  if not os.path.exists(chat_template_path):
@@ -51,8 +52,11 @@ def serve_llm():
51
 
52
  min_pixels = 128 * 28 * 28 # min 128 tokens
53
  max_pixels = 340 * 28 * 28 # max 340 tokens (~512x512 image)
54
-
 
55
  cmd = [
 
 
56
  "vllm",
57
  "serve",
58
  MODEL_NAME,
 
39
  import subprocess
40
  import os
41
  import requests
42
+ import torch
43
 
44
  chat_template_path = "/root/chat_template.jinja"
45
  if not os.path.exists(chat_template_path):
 
52
 
53
  min_pixels = 128 * 28 * 28 # min 128 tokens
54
  max_pixels = 340 * 28 * 28 # max 340 tokens (~512x512 image)
55
+
56
+ major, minor = torch.cuda.get_device_capability()
57
  cmd = [
58
+ "env",
59
+ f"TORCH_CUDA_ARCH_LIST={major}.{minor}",
60
  "vllm",
61
  "serve",
62
  MODEL_NAME,