Spaces:
Sleeping
Sleeping
update
Browse files- app.py +2 -2
- models/vsa_model.py +15 -15
app.py
CHANGED
@@ -100,8 +100,8 @@ with gr.Blocks() as app:
|
|
100 |
|
101 |
|
102 |
vsa = VisionSearchAssistant(
|
103 |
-
ground_device = "cuda",
|
104 |
-
vlm_device="cuda",
|
105 |
vlm_load_4bit=True,
|
106 |
)
|
107 |
# Launch the app
|
|
|
100 |
|
101 |
|
102 |
vsa = VisionSearchAssistant(
|
103 |
+
ground_device = "cuda:1",
|
104 |
+
vlm_device="cuda:1",
|
105 |
vlm_load_4bit=True,
|
106 |
)
|
107 |
# Launch the app
|
models/vsa_model.py
CHANGED
@@ -213,21 +213,7 @@ class WebSearcher:
|
|
213 |
backend_config = PytorchEngineConfig(
|
214 |
max_batch_size = 1,
|
215 |
)
|
216 |
-
|
217 |
-
# path = model_path,
|
218 |
-
# model_name = model_name,
|
219 |
-
# meta_template = INTERNLM2_META,
|
220 |
-
# top_p = top_p,
|
221 |
-
# top_k = top_k,
|
222 |
-
# temperature = temperature,
|
223 |
-
# max_new_tokens = max_new_tokens,
|
224 |
-
# repetition_penalty = repetition_penalty,
|
225 |
-
# stop_words = ['<|im_end|>'],
|
226 |
-
# serve_cfg = dict(
|
227 |
-
# backend_config = backend_config
|
228 |
-
# )
|
229 |
-
# )
|
230 |
-
llm = LMDeployPipeline(
|
231 |
path = model_path,
|
232 |
model_name = model_name,
|
233 |
meta_template = INTERNLM2_META,
|
@@ -237,7 +223,21 @@ class WebSearcher:
|
|
237 |
max_new_tokens = max_new_tokens,
|
238 |
repetition_penalty = repetition_penalty,
|
239 |
stop_words = ['<|im_end|>'],
|
|
|
|
|
|
|
240 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
self.agent = MindSearchAgent(
|
242 |
llm = llm,
|
243 |
protocol = MindSearchProtocol(
|
|
|
213 |
backend_config = PytorchEngineConfig(
|
214 |
max_batch_size = 1,
|
215 |
)
|
216 |
+
llm = LMDeployServer(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
path = model_path,
|
218 |
model_name = model_name,
|
219 |
meta_template = INTERNLM2_META,
|
|
|
223 |
max_new_tokens = max_new_tokens,
|
224 |
repetition_penalty = repetition_penalty,
|
225 |
stop_words = ['<|im_end|>'],
|
226 |
+
serve_cfg = dict(
|
227 |
+
backend_config = backend_config
|
228 |
+
)
|
229 |
)
|
230 |
+
# llm = LMDeployPipeline(
|
231 |
+
# path = model_path,
|
232 |
+
# model_name = model_name,
|
233 |
+
# meta_template = INTERNLM2_META,
|
234 |
+
# top_p = top_p,
|
235 |
+
# top_k = top_k,
|
236 |
+
# temperature = temperature,
|
237 |
+
# max_new_tokens = max_new_tokens,
|
238 |
+
# repetition_penalty = repetition_penalty,
|
239 |
+
# stop_words = ['<|im_end|>'],
|
240 |
+
# )
|
241 |
self.agent = MindSearchAgent(
|
242 |
llm = llm,
|
243 |
protocol = MindSearchProtocol(
|