@@ -47,7 +47,7 @@ class Model:
47
47
_model_classes : dict [str , type [Model ]] = {}
48
48
49
49
dir_model : Path
50
- ftype : int
50
+ ftype : gguf . LlamaFileType
51
51
is_big_endian : bool
52
52
endianess : gguf .GGUFEndian
53
53
use_temp_file : bool
@@ -94,7 +94,7 @@ def __init__(self, dir_model: Path, ftype: gguf.LlamaFileType, fname_out: Path,
94
94
ftype_lw : str = ftype_up .lower ()
95
95
# allow templating the file name with the output ftype, useful with the "auto" ftype
96
96
self .fname_out = fname_out .parent / fname_out .name .format (ftype_lw , outtype = ftype_lw , ftype = ftype_lw , OUTTYPE = ftype_up , FTYPE = ftype_up )
97
- self .gguf_writer = gguf .GGUFWriter (self . fname_out , gguf .MODEL_ARCH_NAMES [self .model_arch ], endianess = self .endianess , use_temp_file = self .use_temp_file )
97
+ self .gguf_writer = gguf .GGUFWriter (path = None , arch = gguf .MODEL_ARCH_NAMES [self .model_arch ], endianess = self .endianess , use_temp_file = self .use_temp_file )
98
98
99
99
@classmethod
100
100
def __init_subclass__ (cls ):
@@ -324,13 +324,13 @@ def write_tensors(self):
324
324
325
325
def write (self ):
326
326
self .write_tensors ()
327
- self .gguf_writer .write_header_to_file ()
327
+ self .gguf_writer .write_header_to_file (self . fname_out )
328
328
self .gguf_writer .write_kv_data_to_file ()
329
329
self .gguf_writer .write_tensors_to_file (progress = True )
330
330
self .gguf_writer .close ()
331
331
332
332
def write_vocab (self ):
333
- self .gguf_writer .write_header_to_file ()
333
+ self .gguf_writer .write_header_to_file (self . fname_out )
334
334
self .gguf_writer .write_kv_data_to_file ()
335
335
self .gguf_writer .close ()
336
336
0 commit comments