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
change
sglang
Commits
ada268fd
Unverified
Commit
ada268fd
authored
May 22, 2025
by
Kyungmin Lee
Committed by
GitHub
May 21, 2025
Browse files
fix: EXAONE when using tie_word_embeddings (#5759)
parent
cfe48c59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
python/sglang/srt/models/exaone.py
python/sglang/srt/models/exaone.py
+8
-3
No files found.
python/sglang/srt/models/exaone.py
View file @
ada268fd
...
@@ -307,9 +307,14 @@ class ExaoneForCausalLM(nn.Module):
...
@@ -307,9 +307,14 @@ class ExaoneForCausalLM(nn.Module):
self
.
transformer
=
ExaoneModel
(
self
.
transformer
=
ExaoneModel
(
config
,
quant_config
=
quant_config
,
prefix
=
add_prefix
(
"transformer"
,
prefix
)
config
,
quant_config
=
quant_config
,
prefix
=
add_prefix
(
"transformer"
,
prefix
)
)
)
self
.
lm_head
=
ParallelLMHead
(
if
self
.
config
.
tie_word_embeddings
:
config
.
vocab_size
,
config
.
hidden_size
,
prefix
=
add_prefix
(
"lm_head"
,
prefix
)
self
.
lm_head
=
self
.
transformer
.
wte
)
else
:
self
.
lm_head
=
ParallelLMHead
(
config
.
vocab_size
,
config
.
hidden_size
,
prefix
=
add_prefix
(
"lm_head"
,
prefix
),
)
self
.
logits_processor
=
LogitsProcessor
(
config
)
self
.
logits_processor
=
LogitsProcessor
(
config
)
@
torch
.
no_grad
()
@
torch
.
no_grad
()
...
...
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