Skip to content

Commit 92c4a81

Browse files
committed
Apply isort and black reformatting
Signed-off-by: akoumpa <akoumpa@users.noreply.github.com>
1 parent 87db846 commit 92c4a81

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nemo/collections/llm/gpt/model/mixtral.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
from pathlib import Path
33
from typing import TYPE_CHECKING, Callable, Optional
44

5-
import torch.nn.functional as F
65
import torch
6+
import torch.nn.functional as F
77

88
from nemo.collections.llm.gpt.model.base import GPTConfig, GPTModel
99
from nemo.lightning import io, teardown
@@ -121,7 +121,6 @@ def config(self) -> MixtralConfig:
121121
)
122122

123123

124-
125124
@io.state_transform(
126125
source_key=(
127126
"model.layers.*.self_attn.q_proj.weight",
@@ -166,9 +165,10 @@ def _import_qkv(ctx: io.TransformCTX, q, k, v):
166165

167166
@io.state_transform(
168167
source_key=(
169-
"model.layers.*.block_sparse_moe.experts.*.w1.weight",
170-
"model.layers.*.block_sparse_moe.experts.*.w3.weight"),
168+
"model.layers.*.block_sparse_moe.experts.*.w1.weight",
169+
"model.layers.*.block_sparse_moe.experts.*.w3.weight",
170+
),
171171
target_key="decoder.layers.*.mlp.experts.local_experts.*.linear_fc1.weight",
172172
)
173173
def _import_moe_w1_w3(gate_proj, up_proj):
174-
return torch.cat((gate_proj, up_proj), axis=0)
174+
return torch.cat((gate_proj, up_proj), axis=0)

0 commit comments

Comments
 (0)