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
bd46357a
Unverified
Commit
bd46357a
authored
Nov 09, 2024
by
youkaichao
Committed by
GitHub
Nov 09, 2024
Browse files
[bugfix] fix broken tests of mlp speculator (#10177)
Signed-off-by:
youkaichao
<
youkaichao@gmail.com
>
parent
f192aeba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
vllm/model_executor/models/mlp_speculator.py
vllm/model_executor/models/mlp_speculator.py
+3
-2
No files found.
vllm/model_executor/models/mlp_speculator.py
View file @
bd46357a
...
@@ -4,13 +4,13 @@ from typing import Iterable, List, Tuple
...
@@ -4,13 +4,13 @@ from typing import Iterable, List, Tuple
import
torch
import
torch
import
torch.nn
as
nn
import
torch.nn
as
nn
from
vllm.config
import
VllmConfig
from
vllm.model_executor
import
SamplingMetadata
from
vllm.model_executor
import
SamplingMetadata
from
vllm.model_executor.layers.logits_processor
import
LogitsProcessor
from
vllm.model_executor.layers.logits_processor
import
LogitsProcessor
from
vllm.model_executor.layers.sampler
import
SamplerOutput
,
get_sampler
from
vllm.model_executor.layers.sampler
import
SamplerOutput
,
get_sampler
from
vllm.model_executor.layers.vocab_parallel_embedding
import
(
from
vllm.model_executor.layers.vocab_parallel_embedding
import
(
ParallelLMHead
,
VocabParallelEmbedding
)
ParallelLMHead
,
VocabParallelEmbedding
)
from
vllm.model_executor.model_loader.weight_utils
import
default_weight_loader
from
vllm.model_executor.model_loader.weight_utils
import
default_weight_loader
from
vllm.transformers_utils.configs
import
MLPSpeculatorConfig
SQRT2
=
2
**
0.5
SQRT2
=
2
**
0.5
...
@@ -65,8 +65,9 @@ class MLPSpeculator(nn.Module):
...
@@ -65,8 +65,9 @@ class MLPSpeculator(nn.Module):
https://huggingface.co/ibm-fms and https://huggingface.co/ibm-granite
https://huggingface.co/ibm-fms and https://huggingface.co/ibm-granite
"""
"""
def
__init__
(
self
,
config
:
MLPSpeculatorConfig
,
**
kwargs
)
->
None
:
def
__init__
(
self
,
vllm_
config
:
VllmConfig
,
prefix
:
str
=
""
)
->
None
:
super
().
__init__
()
super
().
__init__
()
config
=
vllm_config
.
model_config
.
hf_config
self
.
n_predict
=
config
.
n_predict
self
.
n_predict
=
config
.
n_predict
self
.
vocab_size
=
config
.
vocab_size
self
.
vocab_size
=
config
.
vocab_size
self
.
emb_dim
=
config
.
emb_dim
self
.
emb_dim
=
config
.
emb_dim
...
...
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