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
f4fd390f
Unverified
Commit
f4fd390f
authored
Aug 01, 2024
by
Michael Goin
Committed by
GitHub
Aug 01, 2024
Browse files
[Bugfix] Lower gemma's unloaded_params exception to warning (#7002)
parent
fb3db616
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
vllm/model_executor/models/gemma.py
vllm/model_executor/models/gemma.py
+3
-3
vllm/model_executor/models/gemma2.py
vllm/model_executor/models/gemma2.py
+6
-3
vllm/model_executor/models/paligemma.py
vllm/model_executor/models/paligemma.py
+3
-3
No files found.
vllm/model_executor/models/gemma.py
View file @
f4fd390f
...
@@ -404,6 +404,6 @@ class GemmaForCausalLM(nn.Module, SupportsLoRA):
...
@@ -404,6 +404,6 @@ class GemmaForCausalLM(nn.Module, SupportsLoRA):
loaded_params
.
add
(
name
)
loaded_params
.
add
(
name
)
unloaded_params
=
params_dict
.
keys
()
-
loaded_params
unloaded_params
=
params_dict
.
keys
()
-
loaded_params
if
unloaded_params
:
if
unloaded_params
:
raise
RuntimeError
(
logger
.
warning
(
"Some weights are not initialized from checkpoints:
"
"Some weights are not initialized from checkpoints:
%s"
,
f
"
{
unloaded_params
}
"
)
unloaded_params
)
vllm/model_executor/models/gemma2.py
View file @
f4fd390f
...
@@ -23,6 +23,7 @@ from transformers import Gemma2Config
...
@@ -23,6 +23,7 @@ from transformers import Gemma2Config
from
vllm.attention
import
Attention
,
AttentionMetadata
from
vllm.attention
import
Attention
,
AttentionMetadata
from
vllm.config
import
CacheConfig
,
LoRAConfig
from
vllm.config
import
CacheConfig
,
LoRAConfig
from
vllm.distributed
import
get_tensor_model_parallel_world_size
from
vllm.distributed
import
get_tensor_model_parallel_world_size
from
vllm.logger
import
init_logger
from
vllm.model_executor.layers.activation
import
GeluAndMul
from
vllm.model_executor.layers.activation
import
GeluAndMul
from
vllm.model_executor.layers.layernorm
import
GemmaRMSNorm
from
vllm.model_executor.layers.layernorm
import
GemmaRMSNorm
from
vllm.model_executor.layers.linear
import
(
MergedColumnParallelLinear
,
from
vllm.model_executor.layers.linear
import
(
MergedColumnParallelLinear
,
...
@@ -41,6 +42,8 @@ from vllm.sequence import IntermediateTensors, SamplerOutput
...
@@ -41,6 +42,8 @@ from vllm.sequence import IntermediateTensors, SamplerOutput
from
.interfaces
import
SupportsLoRA
from
.interfaces
import
SupportsLoRA
logger
=
init_logger
(
__name__
)
class
Gemma2MLP
(
nn
.
Module
):
class
Gemma2MLP
(
nn
.
Module
):
...
@@ -390,6 +393,6 @@ class Gemma2ForCausalLM(nn.Module, SupportsLoRA):
...
@@ -390,6 +393,6 @@ class Gemma2ForCausalLM(nn.Module, SupportsLoRA):
unloaded_params
=
params_dict
.
keys
()
-
loaded_params
unloaded_params
=
params_dict
.
keys
()
-
loaded_params
if
unloaded_params
:
if
unloaded_params
:
raise
RuntimeError
(
logger
.
warning
(
"Some weights are not initialized from checkpoints:
"
"Some weights are not initialized from checkpoints:
%s"
,
f
"
{
unloaded_params
}
"
)
unloaded_params
)
vllm/model_executor/models/paligemma.py
View file @
f4fd390f
...
@@ -342,6 +342,6 @@ class PaliGemmaForConditionalGeneration(nn.Module, SupportsVision):
...
@@ -342,6 +342,6 @@ class PaliGemmaForConditionalGeneration(nn.Module, SupportsVision):
unloaded_params
=
params_dict
.
keys
()
-
loaded_params
unloaded_params
=
params_dict
.
keys
()
-
loaded_params
if
unloaded_params
:
if
unloaded_params
:
raise
RuntimeError
(
logger
.
warning
(
"Some weights are not initialized from checkpoints:
"
"Some weights are not initialized from checkpoints:
%s"
,
f
"
{
unloaded_params
}
"
)
unloaded_params
)
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