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
jerrrrry
infinilm
Commits
f59c7bf5
Unverified
Commit
f59c7bf5
authored
Jul 10, 2025
by
PanZezhong1725
Committed by
GitHub
Jul 10, 2025
Browse files
Merge pull request #19 from mxCynic/main
fix: assign scale_* as class members instead of local variables
parents
2f35b2b9
1549eced
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
scripts/jiuge.py
scripts/jiuge.py
+12
-8
No files found.
scripts/jiuge.py
View file @
f59c7bf5
...
...
@@ -91,15 +91,19 @@ class JiugeMetaFromLlama(JiugeMetaCStruct):
else
:
dt_
=
DataType
.
INFINI_DTYPE_F16
scale_input
=
1.0
scale_output
=
1.0
scale_o
=
1.0
scale_down
=
1.0
self
.
scale_input
=
1.0
self
.
scale_output
=
1.0
self
.
scale_o
=
1.0
self
.
scale_down
=
1.0
if
"fm9g"
==
config
[
"model_type"
]:
scale_input
=
config
[
"scale_emb"
]
scale_output
=
config
[
"hidden_size"
]
//
config
[
"dim_model_base"
]
scale_o
=
config
[
"scale_depth"
]
/
math
.
sqrt
(
config
[
"num_hidden_layers"
])
scale_down
=
config
[
"scale_depth"
]
/
math
.
sqrt
(
config
[
"num_hidden_layers"
])
self
.
scale_input
=
config
[
"scale_emb"
]
self
.
scale_output
=
config
[
"hidden_size"
]
//
config
[
"dim_model_base"
]
self
.
scale_o
=
config
[
"scale_depth"
]
/
math
.
sqrt
(
config
[
"num_hidden_layers"
]
)
self
.
scale_down
=
config
[
"scale_depth"
]
/
math
.
sqrt
(
config
[
"num_hidden_layers"
]
)
super
().
__init__
(
dt_logits
=
dt_
,
...
...
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