Spaces:
Running
on
Zero
Running
on
Zero
debug: output ids
Browse files- utils/interface.py +3 -0
utils/interface.py
CHANGED
|
@@ -91,6 +91,7 @@ class Inference:
|
|
| 91 |
|
| 92 |
@spaces.GPU(duration = 120)
|
| 93 |
def gen_spaces():
|
|
|
|
| 94 |
token_ids = self.model.generate(
|
| 95 |
input_ids=inputs["input_ids"].to(self.device),
|
| 96 |
attention_mask=inputs["attention_mask"].to(self.device),
|
|
@@ -98,6 +99,8 @@ class Inference:
|
|
| 98 |
stopping_criteria=stopping_criteria
|
| 99 |
)
|
| 100 |
|
|
|
|
|
|
|
| 101 |
results = self.processor.decode(
|
| 102 |
token_ids.to(self.device),
|
| 103 |
output_modalities,
|
|
|
|
| 91 |
|
| 92 |
@spaces.GPU(duration = 120)
|
| 93 |
def gen_spaces():
|
| 94 |
+
print(f"{inputs["input_ids"].tolist()=}")
|
| 95 |
token_ids = self.model.generate(
|
| 96 |
input_ids=inputs["input_ids"].to(self.device),
|
| 97 |
attention_mask=inputs["attention_mask"].to(self.device),
|
|
|
|
| 99 |
stopping_criteria=stopping_criteria
|
| 100 |
)
|
| 101 |
|
| 102 |
+
print(f"{token_ids.tolist()=}")
|
| 103 |
+
|
| 104 |
results = self.processor.decode(
|
| 105 |
token_ids.to(self.device),
|
| 106 |
output_modalities,
|