Unverified Commit 4b5bcf89 authored by Robert Irvine's avatar Robert Irvine Committed by GitHub
Browse files

faster startup of vLLM (#982)



* update

---------
Co-authored-by: default avatarRobert Irvine <robert@seamlessml.com>
parent 852ef5b4
......@@ -259,8 +259,9 @@ class PagedAttentionWithRoPE(PagedAttention):
self.is_neox_style = is_neox_style
# Create the cos and sin cache.
inv_freq = 1.0 / (base**(torch.arange(0, rotary_dim, 2) / rotary_dim))
t = torch.arange(max_position).float()
inv_freq = 1.0 / (base**(
torch.arange(0, rotary_dim, 2, device="cuda") / rotary_dim))
t = torch.arange(max_position, device="cuda").float()
freqs = torch.einsum("i,j -> ij", t, inv_freq.float())
cos = freqs.cos()
sin = freqs.sin()
......
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