mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-25 17:29:22 +01:00
Update api-example-stream.py
This commit is contained in:
parent
ee30625cd1
commit
32d47e4bad
@ -28,10 +28,10 @@ async def run(context):
|
|||||||
params = {
|
params = {
|
||||||
'max_new_tokens': 200,
|
'max_new_tokens': 200,
|
||||||
'do_sample': True,
|
'do_sample': True,
|
||||||
'temperature': 0.5,
|
'temperature': 0.72,
|
||||||
'top_p': 0.9,
|
'top_p': 0.73,
|
||||||
'typical_p': 1,
|
'typical_p': 1,
|
||||||
'repetition_penalty': 1.05,
|
'repetition_penalty': 1.1,
|
||||||
'encoder_repetition_penalty': 1.0,
|
'encoder_repetition_penalty': 1.0,
|
||||||
'top_k': 0,
|
'top_k': 0,
|
||||||
'min_length': 0,
|
'min_length': 0,
|
||||||
@ -42,10 +42,10 @@ async def run(context):
|
|||||||
'early_stopping': False,
|
'early_stopping': False,
|
||||||
'seed': -1,
|
'seed': -1,
|
||||||
'add_bos_token': True,
|
'add_bos_token': True,
|
||||||
'custom_stopping_strings': [],
|
|
||||||
'truncation_length': 2048,
|
'truncation_length': 2048,
|
||||||
'ban_eos_token': False,
|
'ban_eos_token': False,
|
||||||
'skip_special_tokens': True,
|
'skip_special_tokens': True,
|
||||||
|
'stopping_strings': [],
|
||||||
}
|
}
|
||||||
payload = json.dumps([context, params])
|
payload = json.dumps([context, params])
|
||||||
session = random_hash()
|
session = random_hash()
|
||||||
|
Loading…
Reference in New Issue
Block a user