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
c02c0cd4
Commit
c02c0cd4
authored
Oct 02, 2023
by
Michael Yang
Browse files
starcoder
parent
18527551
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
7 deletions
+32
-7
llm/falcon.go
llm/falcon.go
+1
-3
llm/ggml.go
llm/ggml.go
+1
-1
llm/gguf.go
llm/gguf.go
+6
-2
llm/llama.go
llm/llama.go
+1
-1
llm/starcoder.go
llm/starcoder.go
+23
-0
No files found.
llm/falcon.go
View file @
c02c0cd4
package
llm
const
ModelFamilyFalcon
=
"falcon"
const
(
falconModelType7B
=
32
falconModelType40B
=
60
...
...
@@ -17,6 +15,6 @@ func falconModelType(numLayer uint32) string {
case
80
:
return
"180B"
default
:
return
"
U
nknown"
return
"
u
nknown"
}
}
llm/ggml.go
View file @
c02c0cd4
...
...
@@ -69,7 +69,7 @@ func fileType(fileType uint32) string {
case
fileTypeQ6_K
:
return
"Q6_K"
default
:
return
"
U
nknown"
return
"
u
nknown"
}
}
...
...
llm/gguf.go
View file @
c02c0cd4
...
...
@@ -109,9 +109,13 @@ func (llm *ggufModel) ModelType() string {
if
blocks
,
ok
:=
llm
.
kv
[
"falcon.block_count"
]
.
(
uint32
);
ok
{
return
falconModelType
(
blocks
)
}
case
"starcoder"
:
if
blocks
,
ok
:=
llm
.
kv
[
"starcoder.block_count"
]
.
(
uint32
);
ok
{
return
starCoderModelType
(
blocks
)
}
}
return
"
U
nknown"
return
"
u
nknown"
}
func
(
llm
*
ggufModel
)
FileType
()
string
{
...
...
@@ -120,7 +124,7 @@ func (llm *ggufModel) FileType() string {
return
fileType
(
t
)
}
return
"
U
nknown"
return
"
u
nknown"
}
func
(
llm
*
ggufModel
)
Decode
(
r
io
.
Reader
)
error
{
...
...
llm/llama.go
View file @
c02c0cd4
...
...
@@ -143,7 +143,7 @@ func llamaModelType(numLayer uint32) string {
case
80
:
return
"65B"
default
:
return
"
U
nknown"
return
"
u
nknown"
}
}
...
...
llm/starcoder.go
0 → 100644
View file @
c02c0cd4
package
llm
const
(
starCoderModelType1B
=
24
starCoderModelType3B
=
36
starCoderModelType7B
=
42
starCoderModelType15B
=
40
)
func
starCoderModelType
(
numLayer
uint32
)
string
{
switch
numLayer
{
case
24
:
return
"1B"
case
36
:
return
"3B"
case
42
:
return
"7B"
case
40
:
return
"15B"
default
:
return
"unknown"
}
}
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