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
631fecc6
You need to sign in or sign up before continuing.
Commit
631fecc6
authored
Mar 07, 2025
by
Patrick Devine
Committed by
Michael Yang
Mar 11, 2025
Browse files
temporary work around for converting spm
parent
4346c240
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
convert/tokenizer_spm.go
convert/tokenizer_spm.go
+6
-0
No files found.
convert/tokenizer_spm.go
View file @
631fecc6
...
...
@@ -47,6 +47,12 @@ func parseSentencePiece(fsys fs.FS) (*Vocabulary, error) {
v
.
Types
=
append
(
v
.
Types
,
int32
(
t
))
default
:
tt
:=
int32
(
sentencepiece
.
ModelProto_SentencePiece_NORMAL
)
// temporary fix to handle gemma3 broken configs
if
slices
.
Contains
([]
string
{
"<end_of_turn>"
,
"<start_of_turn>"
},
piece
.
GetPiece
())
{
tt
=
int32
(
sentencepiece
.
ModelProto_SentencePiece_CONTROL
)
}
for
_
,
t
:=
range
ast
{
if
t
.
Content
==
piece
.
GetPiece
()
{
tt
=
int32
(
sentencepiece
.
ModelProto_SentencePiece_CONTROL
)
...
...
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