fixes after rebase

This commit is contained in:
Bruce MacDonald 2025-05-08 09:30:18 -07:00
parent 32948ec952
commit 2521a55ae6
2 changed files with 6 additions and 6 deletions

View File

@ -56,8 +56,8 @@ func (q *qwen25VLModel) KV(t *Tokenizer) ggml.KV {
return kv
}
func (q *qwen25VLModel) Tensors(ts []Tensor) []ggml.Tensor {
var out []ggml.Tensor
func (q *qwen25VLModel) Tensors(ts []Tensor) []*ggml.Tensor {
var out []*ggml.Tensor
for _, t := range ts {
if strings.Contains(t.Name(), "patch_embed.proj") {
@ -75,7 +75,7 @@ func (q *qwen25VLModel) Tensors(ts []Tensor) []ggml.Tensor {
strings.NewReplacer("attn.qkv", "attn_v"),
))...)
} else {
out = append(out, ggml.Tensor{
out = append(out, &ggml.Tensor{
Name: t.Name(),
Kind: t.Kind(),
Shape: t.Shape(),

View File

@ -12,8 +12,8 @@ import (
// splitDim splits a tensor along a specified dimension into multiple tensors. The dimension
// is split evenly based on the number of replacers provided.
func splitDim(t Tensor, dim int, replacers ...*strings.Replacer) iter.Seq[ggml.Tensor] {
return func(yield func(ggml.Tensor) bool) {
func splitDim(t Tensor, dim int, replacers ...*strings.Replacer) iter.Seq[*ggml.Tensor] {
return func(yield func(*ggml.Tensor) bool) {
for i, replacer := range replacers {
shape := slices.Clone(t.Shape())
shape[dim] = shape[dim] / uint64(len(replacers))
@ -43,7 +43,7 @@ func splitDim(t Tensor, dim int, replacers ...*strings.Replacer) iter.Seq[ggml.T
return native.VectorF32(t.(*tensor.Dense))
})
if !yield(ggml.Tensor{
if !yield(&ggml.Tensor{
Name: replacer.Replace(t.Name()),
Kind: t.Kind(),
Shape: shape,