Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
norm
vllm
Commits
e0c6f556
Unverified
Commit
e0c6f556
authored
Nov 23, 2023
by
Yanming W
Committed by
GitHub
Nov 23, 2023
Browse files
[Build] Avoid building too many extensions (#1624)
parent
de23687d
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
vllm/model_executor/layers/rotary_embedding.py
vllm/model_executor/layers/rotary_embedding.py
+4
-5
vllm/utils.py
vllm/utils.py
+1
-1
vllm/worker/cache_engine.py
vllm/worker/cache_engine.py
+1
-1
No files found.
vllm/model_executor/layers/rotary_embedding.py
View file @
e0c6f556
...
...
@@ -27,7 +27,7 @@ from typing import Any, Dict, Optional, Tuple, Union
import
torch
import
torch.nn
as
nn
from
vllm
import
pos_encoding_
ops
from
vllm
._C
import
ops
class
RotaryEmbedding
(
nn
.
Module
):
...
...
@@ -87,11 +87,10 @@ class RotaryEmbedding(nn.Module):
query
:
torch
.
Tensor
,
key
:
torch
.
Tensor
,
)
->
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
]:
#
pos_encoding_
ops.rotary_embedding() is an in-place operation that
# ops.rotary_embedding() is an in-place operation that
# updates the query and key tensors.
pos_encoding_ops
.
rotary_embedding
(
positions
,
query
,
key
,
self
.
head_size
,
self
.
cos_sin_cache
,
self
.
is_neox_style
)
ops
.
rotary_embedding
(
positions
,
query
,
key
,
self
.
head_size
,
self
.
cos_sin_cache
,
self
.
is_neox_style
)
return
query
,
key
...
...
vllm/utils.py
View file @
e0c6f556
...
...
@@ -5,7 +5,7 @@ from platform import uname
import
psutil
import
torch
from
vllm
import
cuda_utils
from
vllm
._C
import
cuda_utils
class
Device
(
enum
.
Enum
):
...
...
vllm/worker/cache_engine.py
View file @
e0c6f556
...
...
@@ -3,7 +3,7 @@ from typing import Dict, List, Tuple
import
torch
from
vllm
import
cache_ops
from
vllm
._C
import
cache_ops
from
vllm.config
import
CacheConfig
,
ModelConfig
,
ParallelConfig
from
vllm.logger
import
init_logger
from
vllm.utils
import
in_wsl
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment