Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
f9b4a2d4
Unverified
Commit
f9b4a2d4
authored
Sep 09, 2024
by
Vladislav Kruglikov
Committed by
GitHub
Sep 09, 2024
Browse files
[Bugfix] Correct adapter usage for cohere and jamba (#8292)
parent
58fcc854
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
vllm/model_executor/models/commandr.py
vllm/model_executor/models/commandr.py
+3
-2
vllm/model_executor/models/jamba.py
vllm/model_executor/models/jamba.py
+3
-1
No files found.
vllm/model_executor/models/commandr.py
View file @
f9b4a2d4
...
@@ -47,6 +47,8 @@ from vllm.model_executor.sampling_metadata import SamplingMetadata
...
@@ -47,6 +47,8 @@ from vllm.model_executor.sampling_metadata import SamplingMetadata
from
vllm.model_executor.utils
import
set_weight_attrs
from
vllm.model_executor.utils
import
set_weight_attrs
from
vllm.sequence
import
IntermediateTensors
from
vllm.sequence
import
IntermediateTensors
from
.interfaces
import
SupportsLoRA
@
torch
.
compile
@
torch
.
compile
def
layer_norm_func
(
hidden_states
,
weight
,
variance_epsilon
):
def
layer_norm_func
(
hidden_states
,
weight
,
variance_epsilon
):
...
@@ -292,8 +294,7 @@ class CohereModel(nn.Module):
...
@@ -292,8 +294,7 @@ class CohereModel(nn.Module):
return
hidden_states
return
hidden_states
class
CohereForCausalLM
(
nn
.
Module
):
class
CohereForCausalLM
(
nn
.
Module
,
SupportsLoRA
):
packed_modules_mapping
=
{
packed_modules_mapping
=
{
"qkv_proj"
:
[
"qkv_proj"
:
[
"q_proj"
,
"q_proj"
,
...
...
vllm/model_executor/models/jamba.py
View file @
f9b4a2d4
...
@@ -38,6 +38,8 @@ from vllm.sequence import IntermediateTensors
...
@@ -38,6 +38,8 @@ from vllm.sequence import IntermediateTensors
from
vllm.worker.model_runner
import
(
_BATCH_SIZES_TO_CAPTURE
,
from
vllm.worker.model_runner
import
(
_BATCH_SIZES_TO_CAPTURE
,
_get_graph_batch_size
)
_get_graph_batch_size
)
from
.interfaces
import
SupportsLoRA
KVCache
=
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
]
KVCache
=
Tuple
[
torch
.
Tensor
,
torch
.
Tensor
]
...
@@ -539,7 +541,7 @@ class JambaModel(nn.Module):
...
@@ -539,7 +541,7 @@ class JambaModel(nn.Module):
return
hidden_states
return
hidden_states
class
JambaForCausalLM
(
nn
.
Module
,
HasInnerState
):
class
JambaForCausalLM
(
nn
.
Module
,
HasInnerState
,
SupportsLoRA
):
packed_modules_mapping
=
{
packed_modules_mapping
=
{
"qkv_proj"
:
[
"qkv_proj"
:
[
"q_proj"
,
"q_proj"
,
...
...
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