Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,10 @@ model1 = AutoModelForCausalLM.from_pretrained(model_name).to("cuda")
|
|
20 |
model2 = AutoModelForCausalLM.from_pretrained(model_name)
|
21 |
|
22 |
provider = TransformersProvider(model2, tokenizer, device)
|
23 |
-
strategy = CreativeWritingStrategy(provider
|
|
|
|
|
|
|
24 |
creative_sampler = BacktrackSampler(strategy, provider)
|
25 |
|
26 |
def create_chat_template_messages(history, prompt):
|
|
|
20 |
model2 = AutoModelForCausalLM.from_pretrained(model_name)
|
21 |
|
22 |
provider = TransformersProvider(model2, tokenizer, device)
|
23 |
+
strategy = CreativeWritingStrategy(provider,
|
24 |
+
top_p_flat = 0.65,
|
25 |
+
top_k_threshold_flat = 9,
|
26 |
+
eos_penalty = 0.8)
|
27 |
creative_sampler = BacktrackSampler(strategy, provider)
|
28 |
|
29 |
def create_chat_template_messages(history, prompt):
|