-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Models fail to load with keyNotFound error #218
Comments
I will take a look -- probably a variation on the same issue. |
- do not fail parameter update validation for "invalid" keys (e.g. _freqs)
Phi-3.5-MoE-instruct-4bit is interesting -- it has a
and that is because: public func parameters() -> ModuleParameters {
filterMap(filter: Self.filterValidParameters, map: Self.mapParameters())
} filters out parameters with leading That will be fixed with ml-explore/mlx-swift#200 |
OpenELM-270M-Instruct has a couple of cases where layers should be optional but are not: var out = transformer(inputs, cache: cache)
if shareInputOutputLayers {
out = matmul(out, transformer.embedTokens.weight.T)
} else {
out = lmHead(out)
}
var out = transformer(inputs, cache: cache)
if let lmHead {
out = lmHead(out)
} else {
out = matmul(out, transformer.embedTokens.weight.T)
} there are some other layers in the model set up the same way. |
I inspected the rest of the models for similar patterns but didn't see any. |
Related to #214, I believe.
Some models fail with
keyNotFound
errors. The Qwen1.5 and 2.5 errors were solved in #210. Some errors still remain, though.keyNotFound(base: "SuScaledRotaryEmbedding", key: "_freqs")
keyNotFound(base: "Linear", key: "weight")
The text was updated successfully, but these errors were encountered: