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
evt_fugx1
dcu_megatron
Commits
2862a32a
Commit
2862a32a
authored
May 07, 2025
by
dongcl
Browse files
fix flux import error
parent
23eb9b17
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
7 deletions
+3
-7
dcu_megatron/adaptor/megatron_adaptor.py
dcu_megatron/adaptor/megatron_adaptor.py
+1
-1
dcu_megatron/core/models/gpt/gpt_model.py
dcu_megatron/core/models/gpt/gpt_model.py
+2
-2
dcu_megatron/core/tensor_parallel/__init__.py
dcu_megatron/core/tensor_parallel/__init__.py
+0
-4
No files found.
dcu_megatron/adaptor/megatron_adaptor.py
View file @
2862a32a
...
@@ -165,7 +165,7 @@ class CoreAdaptation(MegatronAdaptationABC):
...
@@ -165,7 +165,7 @@ class CoreAdaptation(MegatronAdaptationABC):
# flux
# flux
if
int
(
os
.
getenv
(
"USE_FLUX_OVERLAP"
,
"0"
)):
if
int
(
os
.
getenv
(
"USE_FLUX_OVERLAP"
,
"0"
)):
from
..core.tensor_parallel
import
(
from
..core.tensor_parallel
.layers
import
(
FluxColumnParallelLinear
,
FluxColumnParallelLinear
,
FluxRowParallelLinear
FluxRowParallelLinear
)
)
...
...
dcu_megatron/core/models/gpt/gpt_model.py
View file @
2862a32a
...
@@ -12,8 +12,6 @@ from megatron.core.inference.contexts import BaseInferenceContext
...
@@ -12,8 +12,6 @@ from megatron.core.inference.contexts import BaseInferenceContext
from
megatron.core.packed_seq_params
import
PackedSeqParams
from
megatron.core.packed_seq_params
import
PackedSeqParams
from
megatron.core.utils
import
WrappedTensor
,
deprecate_inference_params
from
megatron.core.utils
import
WrappedTensor
,
deprecate_inference_params
from
dcu_megatron.core.tensor_parallel
import
FluxColumnParallelLinear
def
gpt_model_init_wrapper
(
fn
):
def
gpt_model_init_wrapper
(
fn
):
@
wraps
(
fn
)
@
wraps
(
fn
)
...
@@ -25,6 +23,8 @@ def gpt_model_init_wrapper(fn):
...
@@ -25,6 +23,8 @@ def gpt_model_init_wrapper(fn):
(
self
.
post_process
or
self
.
mtp_process
)
(
self
.
post_process
or
self
.
mtp_process
)
and
int
(
os
.
getenv
(
"USE_FLUX_OVERLAP"
,
"0"
))
and
int
(
os
.
getenv
(
"USE_FLUX_OVERLAP"
,
"0"
))
):
):
from
dcu_megatron.core.tensor_parallel.layers
import
FluxColumnParallelLinear
self
.
output_layer
=
FluxColumnParallelLinear
(
self
.
output_layer
=
FluxColumnParallelLinear
(
self
.
config
.
hidden_size
,
self
.
config
.
hidden_size
,
self
.
vocab_size
,
self
.
vocab_size
,
...
...
dcu_megatron/core/tensor_parallel/__init__.py
deleted
100644 → 0
View file @
23eb9b17
from
.layers
import
(
FluxColumnParallelLinear
,
FluxRowParallelLinear
,
)
\ No newline at end of file
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