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
629db9dc
Commit
629db9dc
authored
Oct 09, 2025
by
Michael Yang
Committed by
Michael Yang
Oct 10, 2025
Browse files
comment split
parent
e0cd5116
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
convert/convert_gptoss.go
convert/convert_gptoss.go
+4
-0
No files found.
convert/convert_gptoss.go
View file @
629db9dc
...
@@ -86,6 +86,8 @@ func (m *gptossModel) Tensors(ts []Tensor) []*ggml.Tensor {
...
@@ -86,6 +86,8 @@ func (m *gptossModel) Tensors(ts []Tensor) []*ggml.Tensor {
mxfp4s
[
name
]
.
scales
=
t
mxfp4s
[
name
]
.
scales
=
t
}
}
}
else
if
strings
.
HasSuffix
(
t
.
Name
(),
"gate_up_exps.bias"
)
{
}
else
if
strings
.
HasSuffix
(
t
.
Name
(),
"gate_up_exps.bias"
)
{
// gate_up_exps is interleaved, need to split into gate_exps and up_exps
// e.g. gate_exps, up_exps = gate_up_exps[:, 0::2, ...], gate_up_exps[:, 1::2, ...]
out
=
append
(
out
,
slices
.
Collect
(
splitDim
(
t
,
1
,
out
=
append
(
out
,
slices
.
Collect
(
splitDim
(
t
,
1
,
split
{
split
{
Replacer
:
strings
.
NewReplacer
(
"gate_up_exps"
,
"gate_exps"
),
Replacer
:
strings
.
NewReplacer
(
"gate_up_exps"
,
"gate_exps"
),
...
@@ -116,6 +118,8 @@ func (m *gptossModel) Tensors(ts []Tensor) []*ggml.Tensor {
...
@@ -116,6 +118,8 @@ func (m *gptossModel) Tensors(ts []Tensor) []*ggml.Tensor {
WriterTo
:
mxfp4
,
WriterTo
:
mxfp4
,
})
})
}
else
if
strings
.
Contains
(
name
,
"ffn_gate_up_exps"
)
{
}
else
if
strings
.
Contains
(
name
,
"ffn_gate_up_exps"
)
{
// gate_up_exps is interleaved, need to split into gate_exps and up_exps
// e.g. gate_exps, up_exps = gate_up_exps[:, 0::2, ...], gate_up_exps[:, 1::2, ...]
out
=
append
(
out
,
&
ggml
.
Tensor
{
out
=
append
(
out
,
&
ggml
.
Tensor
{
Name
:
strings
.
Replace
(
name
,
"gate_up"
,
"gate"
,
1
)
+
".weight"
,
Name
:
strings
.
Replace
(
name
,
"gate_up"
,
"gate"
,
1
)
+
".weight"
,
Kind
:
uint32
(
ggml
.
TensorTypeMXFP4
),
Kind
:
uint32
(
ggml
.
TensorTypeMXFP4
),
...
...
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