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
eae3af68
Commit
eae3af68
authored
Aug 27, 2024
by
Michael Yang
Browse files
clean up convert tokenizer
parent
3eb08377
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
convert/convert_test.go
convert/convert_test.go
+1
-1
convert/tokenizer.go
convert/tokenizer.go
+1
-2
No files found.
convert/convert_test.go
View file @
eae3af68
...
@@ -89,7 +89,7 @@ func TestMain(m *testing.M) {
...
@@ -89,7 +89,7 @@ func TestMain(m *testing.M) {
os
.
Exit
(
m
.
Run
())
os
.
Exit
(
m
.
Run
())
}
}
func
TestConvert
Ful
l
(
t
*
testing
.
T
)
{
func
TestConvert
Mode
l
(
t
*
testing
.
T
)
{
cases
:=
[]
string
{
cases
:=
[]
string
{
"Meta-Llama-3-8B-Instruct"
,
"Meta-Llama-3-8B-Instruct"
,
"Meta-Llama-3.1-8B-Instruct"
,
"Meta-Llama-3.1-8B-Instruct"
,
...
...
convert/tokenizer.go
View file @
eae3af68
...
@@ -154,7 +154,6 @@ func parseTokenizer(fsys fs.FS, specialTokenTypes []string) (*Tokenizer, error)
...
@@ -154,7 +154,6 @@ func parseTokenizer(fsys fs.FS, specialTokenTypes []string) (*Tokenizer, error)
}
}
type
tokenizer
struct
{
type
tokenizer
struct
{
Version
string
`json:"version"`
AddedTokens
[]
token
`json:"added_tokens"`
AddedTokens
[]
token
`json:"added_tokens"`
Model
struct
{
Model
struct
{
Type
string
`json:"type"`
Type
string
`json:"type"`
...
@@ -252,7 +251,7 @@ func parseVocabulary(fsys fs.FS) (*Vocabulary, error) {
...
@@ -252,7 +251,7 @@ func parseVocabulary(fsys fs.FS) (*Vocabulary, error) {
return
pattern
.
Func
(
fsys
)
return
pattern
.
Func
(
fsys
)
}
}
return
nil
,
errors
.
New
(
"unknown t
enso
r format"
)
return
nil
,
errors
.
New
(
"unknown t
okenize
r format"
)
}
}
type
SpecialVocabulary
struct
{
type
SpecialVocabulary
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