Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
83f0ec82
Commit
83f0ec82
authored
Mar 11, 2025
by
jmorganca
Committed by
Michael Yang
Mar 11, 2025
Browse files
all: address linter errors
parent
c6b6938b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
convert/convert.go
convert/convert.go
+0
-1
model/models/gemma3/model_vision.go
model/models/gemma3/model_vision.go
+3
-3
No files found.
convert/convert.go
View file @
83f0ec82
...
@@ -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
)
{
...
...
model/models/gemma3/model_vision.go
View file @
83f0ec82
...
@@ -69,9 +69,9 @@ func (e *VisionEncoderLayer) Forward(ctx ml.Context, hiddenState ml.Tensor, opts
...
@@ -69,9 +69,9 @@ 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
}
}
type
VisionModel
struct
{
type
VisionModel
struct
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment