wip: next ollama runner

implement llama and mllama model architectures in go using ggml (through
cgo)
This commit is contained in:
Michael Yang
2024-12-02 11:45:23 -08:00
parent 8d15a7a964
commit 2c5fb24855
62 changed files with 75107 additions and 2 deletions

11
ml/nn/convolution.go Normal file
View File

@@ -0,0 +1,11 @@
package nn
import "github.com/ollama/ollama/ml"
type Conv2D struct {
Weight ml.Tensor `ggml:"weight"`
}
func (m *Conv2D) Forward(ctx ml.Context, t ml.Tensor, s0, s1, p0, p1, d0, d1 int) ml.Tensor {
return m.Weight.Conv2D(ctx, t, s0, s1, p0, p1, d0, d1)
}