MindLabUnimib commited on
Commit
43721f0
·
verified ·
1 Parent(s): c58078e

Update app_nobatching.py

Browse files
Files changed (1) hide show
  1. app_nobatching.py +3 -3
app_nobatching.py CHANGED
@@ -28,9 +28,9 @@ CLASSIFIER_MODEL_NAME = "saiteki-kai/QA-DeBERTa-v3-large-binary-3"
28
 
29
  # Generation parameters
30
  MAX_NEW_TOKENS = 256
31
- REPETITION_PENALTY = 1.1
32
  MAX_INPUT_LENGTH = 512
33
- MAX_CLASSIFIER_LENGTH = 512
34
 
35
  # ============================================================================
36
  # Model Loading
@@ -68,7 +68,7 @@ print("✓ Classifier loaded")
68
  # ============================================================================
69
 
70
 
71
- @spaces.GPU(duration=60)
72
  def generate(submission: list[dict[str, str]], team_id: str) -> list[dict[str, str | float]]:
73
  """
74
  Generate responses for prompts and classify their safety.
 
28
 
29
  # Generation parameters
30
  MAX_NEW_TOKENS = 256
31
+ REPETITION_PENALTY = 1.15
32
  MAX_INPUT_LENGTH = 512
33
+ MAX_CLASSIFIER_LENGTH = 512 + 256
34
 
35
  # ============================================================================
36
  # Model Loading
 
68
  # ============================================================================
69
 
70
 
71
+ @spaces.GPU(duration=120)
72
  def generate(submission: list[dict[str, str]], team_id: str) -> list[dict[str, str | float]]:
73
  """
74
  Generate responses for prompts and classify their safety.