Skip to content

Commit c6d9ad1

Browse files
committed
fix megatron load
1 parent 74b5922 commit c6d9ad1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/twinkle/server/tinker/common/megatron_model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
if TYPE_CHECKING:
1414
from twinkle.model.megatron import MultiLoraMegatronModel as _MegatronBase
1515
elif exists('megatron_core'):
16-
from twinkle.model.megatron import MultiLoraMegatronModel as _MegatronBase
16+
# Use module-level import to trigger LazyModule's __getattr__ correctly
17+
import twinkle.model.megatron as megatron_module
18+
_MegatronBase = megatron_module.MultiLoraMegatronModel
1719
else:
1820
class _MegatronBase:
1921
def __init__(self, *args, **kwargs):

0 commit comments

Comments
 (0)