Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def main():
max_ouput_len = 1024

path = os.path.expanduser("~/huggingface/Qwen3-0.6B/")
llm = LLM(path, enforce_eager=False, max_model_len=4096)
llm = LLM(path, enforce_eager=False, max_model_len=4096, gpu_memory_utilization=0.93)

prompt_token_ids = [[randint(0, 10000) for _ in range(randint(100, max_input_len))] for _ in range(num_seqs)]
sampling_params = [SamplingParams(temperature=0.6, ignore_eos=True, max_tokens=randint(100, max_ouput_len)) for _ in range(num_seqs)]
Expand Down
2 changes: 1 addition & 1 deletion example.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
def main():
path = os.path.expanduser("~/huggingface/Qwen3-0.6B/")
tokenizer = AutoTokenizer.from_pretrained(path)
llm = LLM(path, enforce_eager=True, tensor_parallel_size=1)
llm = LLM(path, enforce_eager=True, tensor_parallel_size=1, gpu_memory_utilization=0.93)

sampling_params = SamplingParams(temperature=0.6, max_tokens=256)
prompts = [
Expand Down
2 changes: 1 addition & 1 deletion nanovllm/layers/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import triton
import triton.language as tl

from flash_attn import flash_attn_varlen_func, flash_attn_with_kvcache
from nanovllm.layers.cutile_attention import flash_attn_varlen_func, flash_attn_with_kvcache
from nanovllm.utils.context import get_context


Expand Down
Loading