Skip to content

Commit

Permalink
fix quant (modelscope#1573)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jintao-Huang committed Aug 1, 2024
1 parent dfe467a commit 811f370
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/source/LLM/命令行参数.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,15 +392,15 @@ app-ui参数继承了infer参数, 除此之外增加了以下参数:
deploy参数继承了infer参数, 除此之外增加了以下参数:
- `--host`: 默认为`'127.0.0.1`.
- `--host`: 默认为`'127.0.0.1`. 要使其在非本机上可访问, 可设置为'0.0.0.0'.
- `--port`: 默认为`8000`.
- `--api_key`: 默认为`None`, 即不对请求进行api_key验证.
- `--ssl_keyfile`: 默认为`None`.
- `--ssl_certfile`: 默认为`None`.
## web-ui 参数
- `--host`: 默认为`'127.0.0.1'`.
- `--host`: 默认为`'127.0.0.1'`. 要使其在非本机上可访问, 可设置为'0.0.0.0'.
- `--port`: 默认为`None`.
- `--lang`: 默认为`'zh'`.
- `--share`: 默认为`False`.
4 changes: 2 additions & 2 deletions docs/source_en/LLM/Command-line-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,15 +393,15 @@ app-ui parameters inherit from infer parameters, with the following added parame
deploy parameters inherit from infer parameters, with the following added parameters:
- `--host`: Default is `'127.0.0.1`.
- `--host`: Default is `'127.0.0.1`. To make it accessible on the local network, you can set it to '0.0.0.0'.
- `--port`: Default is `8000`.
- `--api_key`: The default is `None`, meaning that the request will not be subjected to api_key verification.
- `--ssl_keyfile`: Default is `None`.
- `--ssl_certfile`: Default is `None`.
## web-ui Parameters
- `--host`: Default `'127.0.0.1'`.
- `--host`: Default `'127.0.0.1'`. To make it accessible on the local network, you can set it to '0.0.0.0'.
- `--port`: Default `None`.
- `--lang`: Default `'zh'`.
- `--share`: Default `False`.
1 change: 1 addition & 0 deletions swift/llm/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def _module_forward(self, x: torch.Tensor, module: torch.nn.Module, module_kwarg

return module_output

import awq
from awq.quantize import quantizer
from transformers import AwqConfig
if version.parse(awq.__version__) >= version.parse('0.2.6'):
Expand Down

0 comments on commit 811f370

Please sign in to comment.