File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1811,16 +1811,15 @@ def write_tensors(self):
1811
1811
tensor_map = gguf .get_tensor_name_map (self .model_arch , block_count )
1812
1812
1813
1813
for name , data_torch in self .get_tensors ():
1814
- # ref: https://github.com/huggingface/transformers/blob/fc37f38915372c15992b540dfcbbe00a916d4fc6/src/transformers/models/gemma/modeling_gemma.py#L89
1815
- if name .endswith ("norm.weight" ):
1816
- data_torch = data_torch + 1
1817
-
1818
1814
old_dtype = data_torch .dtype
1819
1815
1820
1816
# convert any unsupported data types to float32
1821
1817
if data_torch .dtype not in (torch .float16 , torch .float32 ):
1822
1818
data_torch = data_torch .to (torch .float32 )
1823
1819
1820
+ # ref: https://github.com/huggingface/transformers/blob/fc37f38915372c15992b540dfcbbe00a916d4fc6/src/transformers/models/gemma/modeling_gemma.py#L89
1821
+ if name .endswith ("norm.weight" ):
1822
+ data_torch = data_torch + 1
1824
1823
data = data_torch .squeeze ().numpy ()
1825
1824
1826
1825
# map tensor names
You can’t perform that action at this time.
0 commit comments