"vscode:/vscode.git/clone" did not exist on "9b23e3cc7677643f6adaf6c327275d0a7cdff02c"
Commit 5dc85bf4 authored by wooway777's avatar wooway777
Browse files

issue/248 - change default attn backend to classic impl

parent 84fbe5b1
......@@ -176,5 +176,5 @@ python scripts/test_ppl.py --model-path MODEL_PATH [--ndev NDEV] [--max-batch MA
```
- 选择attention后端 (使用flash attention后端需要先在InfiniCore完成相关配置和编译)
```bash
python examples/bench.py --nvidia --model=<model-path> --enable-paged-attn [--attn=flash-attn | --attn=default]
python examples/bench.py --nvidia --model=<model-path> --enable-paged-attn [--attn=default | --attn=flash-attn]
```
......@@ -255,7 +255,7 @@ def get_args():
parser.add_argument(
"--attn",
type=str,
default="flash-attn",
default="default",
choices=["default", "flash-attn"],
help="attention backend to use: 'default' or 'flash-attn'",
)
......@@ -285,7 +285,7 @@ class TestModel:
skip_load=False,
cache_config=None,
enable_graph=False,
attn_backend="flash-attn",
attn_backend="default",
) -> None:
model_path = os.path.expanduser(model_path)
# ---------------------------------------------------------------------------- #
......
......@@ -145,7 +145,7 @@ def get_args():
parser.add_argument(
"--attn",
type=str,
default="flash-attn",
default="default",
choices=["default", "flash-attn"],
help="attention backend to use: 'default' or 'flash-attn'",
)
......@@ -164,7 +164,7 @@ def test(
top_k=1,
top_p=1.0,
temperature=1.0,
attn_backend="flash-attn",
attn_backend="default",
):
model_path = os.path.expanduser(model_path)
# ---------------------------------------------------------------------------- #
......
......@@ -29,7 +29,7 @@ class InferEngine(_infinilm.InferEngine):
distributed_config=DistConfig(1),
cache_config=None,
enable_graph_compiling=False,
attention_backend="flash-attn",
attention_backend="default",
):
self.config = AutoConfig.from_pretrained(model_path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment