Update modeling_minicpmv.py
Browse files- modeling_minicpmv.py +1 -1
modeling_minicpmv.py
CHANGED
|
@@ -335,7 +335,7 @@ class MiniCPMV(MiniCPMVPreTrainedModel):
|
|
| 335 |
prompt = processor.tokenizer.apply_chat_template(batchM, tokenize=False, add_generation_prompt=True)
|
| 336 |
inputs = processor(prompt, batchI, return_tensors="pt", max_length=max_inp_length)
|
| 337 |
for input in inputs:
|
| 338 |
-
input = input.to(
|
| 339 |
|
| 340 |
if sampling:
|
| 341 |
generation_config = {
|
|
|
|
| 335 |
prompt = processor.tokenizer.apply_chat_template(batchM, tokenize=False, add_generation_prompt=True)
|
| 336 |
inputs = processor(prompt, batchI, return_tensors="pt", max_length=max_inp_length)
|
| 337 |
for input in inputs:
|
| 338 |
+
input = input.to(self.device)
|
| 339 |
|
| 340 |
if sampling:
|
| 341 |
generation_config = {
|