forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
register custom op for flash attn and use from torch.ops (vllm-projec…
- Loading branch information
1 parent
8bfc927
commit 5e5e825
Showing
5 changed files
with
220 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import os | ||
|
||
import pytest | ||
|
||
|
||
@pytest.mark.parametrize("model", ["meta-llama/Meta-Llama-3-8B"]) | ||
def test_full_graph(model): | ||
# make sure these models can be captured in full graph mode | ||
os.environ["VLLM_TEST_DYNAMO_GRAPH_CAPTURE"] = "1" | ||
|
||
from vllm import LLM, SamplingParams | ||
prompts = [ | ||
"Hello, my name is", | ||
"The president of the United States is", | ||
"The capital of France is", | ||
"The future of AI is", | ||
] | ||
sampling_params = SamplingParams(temperature=0) | ||
llm = LLM(model="meta-llama/Meta-Llama-3-8B") | ||
llm.generate(prompts, sampling_params) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.