Skip to content

Commit a9ce6c8

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents f0b64ab + 24a8755 commit a9ce6c8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/openai_api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ completion = openai.ChatCompletion.create(
6262
print(completion.choices[0].message.content)
6363
```
6464

65-
Streaming is also supported. See [test_openai_api.py](../tests/test_openai_api.py).
65+
Streaming is also supported. See [test_openai_api.py](../tests/test_openai_api.py). If your api server is behind a proxy you'll need to turn off buffering, you can do so in Nginx by setting `proxy_buffering off;` in the location block for the proxy.
6666

6767
### cURL
6868
cURL is another good tool for observing the output of the api.

fastchat/model/model_adapter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,8 @@ def load_model(self, model_path: str, from_pretrained_kwargs: dict):
13391339
model_path,
13401340
trust_remote_code=True,
13411341
)
1342-
config.use_flash_attn = False
1342+
# NOTE: if you use the old version of model file, please remove the comments below
1343+
# config.use_flash_attn = False
13431344
config.fp16 = True
13441345
generation_config = GenerationConfig.from_pretrained(
13451346
model_path, trust_remote_code=True

0 commit comments

Comments
 (0)