mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-11-02 09:12:03 +00:00
simple : minor style changes
This commit is contained in:
@@ -2,17 +2,18 @@
|
||||
|
||||
import gguf
|
||||
import gguf_namemap as tmap
|
||||
|
||||
import os
|
||||
import sys
|
||||
import struct
|
||||
import json
|
||||
import numpy as np
|
||||
import torch
|
||||
|
||||
from typing import Any, List
|
||||
from pathlib import Path
|
||||
import torch
|
||||
from sentencepiece import SentencePieceProcessor
|
||||
|
||||
|
||||
#NDArray = np.ndarray[Any, Any]
|
||||
# compatible with python < 3.9
|
||||
NDArray: 'TypeAlias' = 'np.ndarray[Any, Any]'
|
||||
@@ -225,7 +226,7 @@ for part_name in part_names:
|
||||
sys.exit()
|
||||
|
||||
n_dims = len(data.shape)
|
||||
data_dtype = data.dtype
|
||||
data_dtype = data.dtype
|
||||
|
||||
# if f32 desired, convert any float16 to float32
|
||||
if ftype == 0 and data.dtype == np.float16:
|
||||
@@ -268,7 +269,6 @@ for part_name in part_names:
|
||||
for name in model_part.keys():
|
||||
data = model_part[name]
|
||||
|
||||
|
||||
old_dtype = data.dtype
|
||||
|
||||
# we don't need these
|
||||
@@ -295,7 +295,7 @@ for part_name in part_names:
|
||||
sys.exit()
|
||||
|
||||
n_dims = len(data.shape)
|
||||
data_dtype = data.dtype
|
||||
data_dtype = data.dtype
|
||||
|
||||
# if f32 desired, convert any float16 to float32
|
||||
if ftype == 0 and data.dtype == np.float16:
|
||||
|
||||
Reference in New Issue
Block a user