mirror of
https://github.com/ollama/ollama.git
synced 2025-05-17 23:14:23 +02:00
11 lines
232 B
Go
11 lines
232 B
Go
package nn
|
|
|
|
import "github.com/ollama/ollama/ml"
|
|
|
|
type Embedding struct {
|
|
Weight ml.Tensor `gguf:"weight"`
|
|
}
|
|
|
|
func (m *Embedding) Forward(ctx ml.Context, hiddenState ml.Tensor) ml.Tensor {
|
|
return m.Weight.Rows(ctx, hiddenState)
|
|
}
|