convert : fix handling of n_experts == None

ggml-ci
This commit is contained in:
Georgi Gerganov 2024-04-03 11:21:01 +03:00
parent 3779b984ac
commit e8108997f6
No known key found for this signature in database
GPG key ID: 449E073F9DC10735

View file

@ -1256,7 +1256,7 @@ def convert_model_names(model: LazyModel, params: Params, skip_unknown: bool) ->
tmp = model
# merge experts into one tensor
if params.n_experts > 0:
if params.n_experts and params.n_experts > 0:
for i_l in range(params.n_layer):
for w in range(1, 4):
experts = []