Use fast (#38)
* update to latest mlx swift and use fast norms * gpu usage -> memory usage
This commit is contained in:
@@ -7,12 +7,6 @@ import MLXNN
|
||||
|
||||
// https://github.com/ml-explore/mlx-examples/blob/main/llms/mlx_lm/models/phi.py
|
||||
|
||||
private class LayerNorm: MLXNN.LayerNorm {
|
||||
override func callAsFunction(_ x: MLXArray) -> MLXArray {
|
||||
super.callAsFunction(x.asType(Float.self)).asType(x.dtype)
|
||||
}
|
||||
}
|
||||
|
||||
private class PhiAttention: Module {
|
||||
|
||||
let args: PhiConfiguration
|
||||
|
||||
Reference in New Issue
Block a user