mirror of
https://github.com/ollama/ollama.git
synced 2026-04-21 16:25:42 +02:00
wip: next ollama runner
implement llama and mllama model architectures in go using ggml (through cgo)
This commit is contained in:
11
ml/nn/convolution.go
Normal file
11
ml/nn/convolution.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user