SriRamanaYash commited on
Commit
8319e09
Β·
verified Β·
1 Parent(s): 7992fd3

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -5,7 +5,7 @@ Compatible with transformers==4.51.3 (matches model's transformers_version in co
5
  Generation parameters (from Section A4 of technical review β€” do not change):
6
  do_sample = False (greedy decoding β€” matches SFT + DPO training exactly)
7
  max_new_tokens = 400
8
- repetition_penalty = 1.02 (sole repetition control)
9
  no_repeat_ngram_size = 0 (PERMANENTLY DISABLED β€” hard-coded, not overridable via API)
10
  temperature / top_p (REMOVED β€” inactive under greedy decoding)
11
 
@@ -65,7 +65,7 @@ class EndpointHandler:
65
  # We override it here so model.generate() never reads the repo file.
66
  self.model.generation_config = GenerationConfig(
67
  do_sample=False, # greedy β€” matches SFT+DPO training
68
- repetition_penalty=1.02,
69
  no_repeat_ngram_size=0, # permanently disabled
70
  eos_token_id=32007, # <|end|> only β€” turn terminator
71
  pad_token_id=32000, # <|endoftext|>
 
5
  Generation parameters (from Section A4 of technical review β€” do not change):
6
  do_sample = False (greedy decoding β€” matches SFT + DPO training exactly)
7
  max_new_tokens = 400
8
+ repetition_penalty = 1.01 (sole repetition control)
9
  no_repeat_ngram_size = 0 (PERMANENTLY DISABLED β€” hard-coded, not overridable via API)
10
  temperature / top_p (REMOVED β€” inactive under greedy decoding)
11
 
 
65
  # We override it here so model.generate() never reads the repo file.
66
  self.model.generation_config = GenerationConfig(
67
  do_sample=False, # greedy β€” matches SFT+DPO training
68
+ repetition_penalty=1.01,
69
  no_repeat_ngram_size=0, # permanently disabled
70
  eos_token_id=32007, # <|end|> only β€” turn terminator
71
  pad_token_id=32000, # <|endoftext|>