jdesiree commited on
Commit
0d36e61
·
verified ·
1 Parent(s): a9808fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -8,7 +8,12 @@ import os
8
  llm = HuggingFaceEndpoint(
9
  repo_id="HuggingFaceH4/zephyr-7b-beta",
10
  temperature=0.7,
11
- model_kwargs={"max_length": 512},
 
 
 
 
 
12
  huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN")
13
  )
14
 
 
8
  llm = HuggingFaceEndpoint(
9
  repo_id="HuggingFaceH4/zephyr-7b-beta",
10
  temperature=0.7,
11
+ model_kwargs={
12
+ "max_length": 256, # Reduced from 512
13
+ "max_new_tokens": 256, # Add explicit limit
14
+ "do_sample": True,
15
+ "top_p": 0.9
16
+ },
17
  huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN")
18
  )
19