Spaces:
Running
on
Zero
Running
on
Zero
frankaging
commited on
Commit
•
77bd93c
1
Parent(s):
56ab742
initial commit
Browse files
app.py
CHANGED
@@ -79,10 +79,13 @@ def generate(
|
|
79 |
generate_kwargs = {
|
80 |
"base": {"input_ids": prompt["input_ids"], "attention_mask": prompt["attention_mask"]},
|
81 |
"unit_locations": {"sources->base": (None, [[[base_unit_location]]])},
|
|
|
82 |
"intervene_on_prompt": True,
|
83 |
"streamer": streamer,
|
84 |
"eos_token_id": tokenizer.eos_token_id,
|
85 |
"early_stopping": True,
|
|
|
|
|
86 |
}
|
87 |
|
88 |
t = Thread(target=reft_model.generate, kwargs=generate_kwargs)
|
|
|
79 |
generate_kwargs = {
|
80 |
"base": {"input_ids": prompt["input_ids"], "attention_mask": prompt["attention_mask"]},
|
81 |
"unit_locations": {"sources->base": (None, [[[base_unit_location]]])},
|
82 |
+
"max_new_tokens": max_new_tokens,
|
83 |
"intervene_on_prompt": True,
|
84 |
"streamer": streamer,
|
85 |
"eos_token_id": tokenizer.eos_token_id,
|
86 |
"early_stopping": True,
|
87 |
+
"do_sample": False,
|
88 |
+
"repetition_penalty": 1.1,
|
89 |
}
|
90 |
|
91 |
t = Thread(target=reft_model.generate, kwargs=generate_kwargs)
|