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
b910fa90
Unverified
Commit
b910fa90
authored
Jun 28, 2024
by
royjhan
Committed by
GitHub
Jun 28, 2024
Browse files
Ollama Show: Check for Projector Type (#5307)
* Check exists projtype * Maintain Ordering
parent
6d421908
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
cmd/cmd.go
cmd/cmd.go
+9
-3
No files found.
cmd/cmd.go
View file @
b910fa90
...
@@ -672,11 +672,17 @@ func ShowHandler(cmd *cobra.Command, args []string) error {
...
@@ -672,11 +672,17 @@ func ShowHandler(cmd *cobra.Command, args []string) error {
projectorData
:=
[][]
string
{
projectorData
:=
[][]
string
{
{
"arch"
,
"clip"
},
{
"arch"
,
"clip"
},
{
"parameters"
,
format
.
HumanNumber
(
uint64
(
resp
.
ProjectorInfo
[
"general.parameter_count"
]
.
(
float64
)))},
{
"parameters"
,
format
.
HumanNumber
(
uint64
(
resp
.
ProjectorInfo
[
"general.parameter_count"
]
.
(
float64
)))},
{
"projector type"
,
resp
.
ProjectorInfo
[
"clip.projector_type"
]
.
(
string
)},
{
"embedding length"
,
fmt
.
Sprintf
(
"%v"
,
resp
.
ProjectorInfo
[
"clip.vision.embedding_length"
]
.
(
float64
))},
{
"projection dimensionality"
,
fmt
.
Sprintf
(
"%v"
,
resp
.
ProjectorInfo
[
"clip.vision.projection_dim"
]
.
(
float64
))},
}
}
if
projectorType
,
ok
:=
resp
.
ProjectorInfo
[
"clip.projector_type"
];
ok
{
projectorData
=
append
(
projectorData
,
[]
string
{
"projector type"
,
projectorType
.
(
string
)})
}
projectorData
=
append
(
projectorData
,
[]
string
{
"embedding length"
,
fmt
.
Sprintf
(
"%v"
,
resp
.
ProjectorInfo
[
"clip.vision.embedding_length"
]
.
(
float64
))},
[]
string
{
"projection dimensionality"
,
fmt
.
Sprintf
(
"%v"
,
resp
.
ProjectorInfo
[
"clip.vision.projection_dim"
]
.
(
float64
))},
)
mainTableData
=
append
(
mainTableData
,
mainTableData
=
append
(
mainTableData
,
[]
string
{
"Projector"
},
[]
string
{
"Projector"
},
[]
string
{
renderSubTable
(
projectorData
,
false
)},
[]
string
{
renderSubTable
(
projectorData
,
false
)},
...
...
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