Npugraph_ex#
简介#
如 RFC 中所述,这是一个基于 Fx 图的简单 ACLGraph 图模式加速解决方案。
使用 Npugraph_ex#
Npugraph_ex 将在未来默认启用,以 Qwen 系列模型为例展示如何配置。
离线示例:
from vllm import LLM
model = LLM(
model="path/to/Qwen2-7B-Instruct",
additional_config={
"ascend_compilation_config": {
"enable_npugraph_ex": True,
"enable_static_kernel": False,
}
}
)
outputs = model.generate("Hello, how are you?")
在线示例:
vllm serve Qwen/Qwen2-7B-Instruct
--additional-config '{"ascend_compilation_config":{"enable_npugraph_ex":true, "enable_static_kernel":false}}'
您可以在 npugraph_ex 找到更多详细信息。