Use fast (#38)

* update to latest mlx swift and use fast norms
* gpu usage -> memory usage
This commit is contained in:
Awni Hannun
2024-03-27 16:37:35 -07:00
committed by GitHub
parent 3314e20a24
commit 15b38cd146
4 changed files with 5 additions and 17 deletions

View File

@@ -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