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
3920e153
Unverified
Commit
3920e153
authored
Sep 09, 2023
by
Jeffrey Morgan
Committed by
GitHub
Sep 09, 2023
Browse files
add model format to config layer (#497)
parent
41e976ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
server/images.go
server/images.go
+3
-0
No files found.
server/images.go
View file @
3920e153
...
@@ -116,6 +116,7 @@ type LayerReader struct {
...
@@ -116,6 +116,7 @@ type LayerReader struct {
type
ConfigV2
struct
{
type
ConfigV2
struct
{
ModelFamily
llm
.
ModelFamily
`json:"model_family"`
ModelFamily
llm
.
ModelFamily
`json:"model_family"`
ModelType
string
`json:"model_type"`
ModelType
string
`json:"model_type"`
ModelFormat
string
`json:"model_format"`
FileType
string
`json:"file_type"`
FileType
string
`json:"file_type"`
RootFS
RootFS
`json:"rootfs"`
RootFS
RootFS
`json:"rootfs"`
...
@@ -335,6 +336,7 @@ func CreateModel(ctx context.Context, name string, path string, fn func(resp api
...
@@ -335,6 +336,7 @@ func CreateModel(ctx context.Context, name string, path string, fn func(resp api
config
.
ModelFamily
=
ggml
.
ModelFamily
()
config
.
ModelFamily
=
ggml
.
ModelFamily
()
config
.
ModelType
=
ggml
.
ModelType
()
.
String
()
config
.
ModelType
=
ggml
.
ModelType
()
.
String
()
config
.
ModelFormat
=
ggml
.
Name
()
config
.
FileType
=
ggml
.
FileType
()
.
String
()
config
.
FileType
=
ggml
.
FileType
()
.
String
()
// reset the file
// reset the file
...
@@ -369,6 +371,7 @@ func CreateModel(ctx context.Context, name string, path string, fn func(resp api
...
@@ -369,6 +371,7 @@ func CreateModel(ctx context.Context, name string, path string, fn func(resp api
// copie the model metadata
// copie the model metadata
config
.
ModelFamily
=
source
.
ModelFamily
config
.
ModelFamily
=
source
.
ModelFamily
config
.
ModelType
=
source
.
ModelType
config
.
ModelType
=
source
.
ModelType
config
.
ModelFormat
=
source
.
ModelFormat
config
.
FileType
=
source
.
FileType
config
.
FileType
=
source
.
FileType
for
_
,
l
:=
range
mf
.
Layers
{
for
_
,
l
:=
range
mf
.
Layers
{
...
...
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