Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
Fix tests and drift from main
Jesse Gross0e886595bf3d
diff --git a/kvcache/causal_test.go b/kvcache/causal_test.goindex 431a79b53..ed23cad6a 100644--- a/kvcache/causal_test.go+++ b/kvcache/causal_test.go@@ -499,6 +499,10 @@ func (t *testTensor) Contiguous(ctx ml.Context) ml.Tensor {panic("not implemented")}+func (t *testTensor) Set(ctx ml.Context, t2 ml.Tensor, offset int, strides ...int) ml.Tensor {+ panic("not implemented")+}+func (t *testTensor) Pad(ctx ml.Context, shape ...int) ml.Tensor {panic("not implemented")}diff --git a/model/models/gemma2/model.go b/model/models/gemma2/model.goindex a82d68d37..2b8597c42 100644--- a/model/models/gemma2/model.go+++ b/model/models/gemma2/model.go@@ -179,7 +179,7 @@ func (m *Model) Forward(ctx ml.Context, opts input.Options) (ml.Tensor, error) {return nil, err}- outputs, err := ctx.FromIntSlice(opts.Outputs, len(opts.Outputs))+ outputs, err := ctx.Output().FromIntSlice(opts.Outputs, len(opts.Outputs))if err != nil {return nil, err}diff --git a/model/models/mllama/model_text.go b/model/models/mllama/model_text.goindex 40c9a9707..1cf30d89b 100644--- a/model/models/mllama/model_text.go+++ b/model/models/mllama/model_text.go@@ -28,7 +28,7 @@ func (sa *TextSelfAttention) Forward(ctx ml.Context, hiddenState, positions, _ mkey := sa.Key.Forward(ctx, hiddenState)key = key.Reshape(ctx, headDim, opts.numKVHeads, batchSize)- key = key.RoPE(ctx, positions, sa.RopeFactors, opts.ropeDim, ropeType, opts.ropeBase, opts.ropeScale)+ key = key.RoPE(ctx, positions, sa.RopeFactors, opts.ropeDim, ropeType, opts.ropeBase, opts.ropeScale)value := sa.Value.Forward(ctx, hiddenState)value = value.Reshape(ctx, headDim, opts.numKVHeads, batchSize)