Commit 83f0ec82 authored by jmorganca's avatar jmorganca Committed by Michael Yang
Browse files

all: address linter errors

parent c6b6938b
...@@ -228,7 +228,6 @@ func ConvertModel(fsys fs.FS, ws io.WriteSeeker) error { ...@@ -228,7 +228,6 @@ func ConvertModel(fsys fs.FS, ws io.WriteSeeker) error {
switch { switch {
case vocabSize == 0: case vocabSize == 0:
slog.Warn("vocabulary size was not explicitly set by the model", "default size", len(t.Vocabulary.Tokens)) slog.Warn("vocabulary size was not explicitly set by the model", "default size", len(t.Vocabulary.Tokens))
vocabSize = len(t.Vocabulary.Tokens)
case vocabSize > len(t.Vocabulary.Tokens): case vocabSize > len(t.Vocabulary.Tokens):
slog.Warn("vocabulary is smaller than expected, padding with dummy tokens", "expect", vocabSize, "actual", len(t.Vocabulary.Tokens)) slog.Warn("vocabulary is smaller than expected, padding with dummy tokens", "expect", vocabSize, "actual", len(t.Vocabulary.Tokens))
for i := range vocabSize - len(t.Vocabulary.Tokens) { for i := range vocabSize - len(t.Vocabulary.Tokens) {
......
...@@ -69,7 +69,7 @@ func (e *VisionEncoderLayer) Forward(ctx ml.Context, hiddenState ml.Tensor, opts ...@@ -69,7 +69,7 @@ func (e *VisionEncoderLayer) Forward(ctx ml.Context, hiddenState ml.Tensor, opts
} }
type VisionModelOptions struct { type VisionModelOptions struct {
hiddenSize, numHeads, numTiles int hiddenSize, numHeads int
imageSize, patchSize int imageSize, patchSize int
eps float32 eps float32
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment