Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -26,10 +26,11 @@ llm = HuggingFaceHub(#starchat_repo_id=starchat_repo_id,
|
|
| 26 |
model_kwargs={#"min_length":512, #for StarChat
|
| 27 |
"min_length":1024, #for Llama2
|
| 28 |
#"max_new_tokens":3072, "do_sample":True, #for StarChat
|
| 29 |
-
"max_new_tokens":
|
| 30 |
"temperature":0.1,
|
| 31 |
"top_k":50,
|
| 32 |
"top_p":0.95, "eos_token_id":49155})
|
|
|
|
| 33 |
|
| 34 |
prompt_template = """
|
| 35 |
You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
|
|
|
|
| 26 |
model_kwargs={#"min_length":512, #for StarChat
|
| 27 |
"min_length":1024, #for Llama2
|
| 28 |
#"max_new_tokens":3072, "do_sample":True, #for StarChat
|
| 29 |
+
"max_new_tokens":3072, "do_sample":True, #for Llama2
|
| 30 |
"temperature":0.1,
|
| 31 |
"top_k":50,
|
| 32 |
"top_p":0.95, "eos_token_id":49155})
|
| 33 |
+
#似乎是因为iShare不是HF的Pro账户,所以会遇到Runtime error: Scheduling failure: not enough hardware capacity(设置为llama2_repo_id时)???
|
| 34 |
|
| 35 |
prompt_template = """
|
| 36 |
You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
|