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
d2454603
"git@developer.sourcefind.cn:modelzoo/crnn_migraphx.git" did not exist on "441457e79ffa1678ff3c1570b317bdb6214a67fc"
Commit
d2454603
authored
Apr 25, 2024
by
Michael Yang
Browse files
only quantize language models
parent
4d0d0fa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
server/images.go
server/images.go
+4
-2
No files found.
server/images.go
View file @
d2454603
...
...
@@ -377,7 +377,10 @@ func CreateModel(ctx context.Context, name, modelFileDir, quantization string, m
}
for
_
,
baseLayer
:=
range
baseLayers
{
if
quantization
!=
""
&&
baseLayer
.
GGML
!=
nil
&&
baseLayer
.
GGML
.
Name
()
==
"gguf"
{
if
quantization
!=
""
&&
baseLayer
.
MediaType
==
"application/vnd.ollama.image.model"
&&
baseLayer
.
GGML
!=
nil
&&
baseLayer
.
GGML
.
Name
()
==
"gguf"
{
ftype
,
err
:=
llm
.
ParseFileType
(
quantization
)
if
err
!=
nil
{
return
err
...
...
@@ -582,7 +585,6 @@ func CreateModel(ctx context.Context, name, modelFileDir, quantization string, m
return
nil
}
func
CopyModel
(
src
,
dst
model
.
Name
)
error
{
if
!
dst
.
IsFullyQualified
()
{
return
model
.
Unqualified
(
dst
)
...
...
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