mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-03 09:22:01 +00:00 
			
		
		
		
	gguf : write tensors one by one
This commit is contained in:
		
							
								
								
									
										2
									
								
								gguf.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								gguf.py
									
									
									
									
									
								
							@@ -175,8 +175,6 @@ class GGUFWriter:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        self.flush()
 | 
					        self.flush()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.tensors.append(tensor)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def write_tensor(self, tensor: np.ndarray):
 | 
					    def write_tensor(self, tensor: np.ndarray):
 | 
				
			||||||
        pad = GGUFWriter.ggml_pad(self.fout.tell(), constants.GGUF_DEFAULT_ALIGNMENT) - self.fout.tell()
 | 
					        pad = GGUFWriter.ggml_pad(self.fout.tell(), constants.GGUF_DEFAULT_ALIGNMENT) - self.fout.tell()
 | 
				
			||||||
        if pad != 0:
 | 
					        if pad != 0:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user