Spaces:
Running
Running
Test stopping criteria effectiveness
Browse files- Temporarily modify CancelStoppingCriteria to always return True
- This will test if stopping criteria are being checked during generation
- If generation stops after first token, stopping criteria work; if not, they are ignored
app.py
CHANGED
|
@@ -28,7 +28,7 @@ cancel_event = threading.Event()
|
|
| 28 |
# ------------------------------
|
| 29 |
class CancelStoppingCriteria(StoppingCriteria):
|
| 30 |
def __call__(self, input_ids, scores, **kwargs):
|
| 31 |
-
return
|
| 32 |
|
| 33 |
# ------------------------------
|
| 34 |
# Torch-Compatible Model Definitions with Adjusted Descriptions
|
|
|
|
| 28 |
# ------------------------------
|
| 29 |
class CancelStoppingCriteria(StoppingCriteria):
|
| 30 |
def __call__(self, input_ids, scores, **kwargs):
|
| 31 |
+
return True
|
| 32 |
|
| 33 |
# ------------------------------
|
| 34 |
# Torch-Compatible Model Definitions with Adjusted Descriptions
|