mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-30 08:42:00 +00:00 
			
		
		
		
	gguf : write tensors one by one
This commit is contained in:
		
							
								
								
									
										3
									
								
								gguf.py
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								gguf.py
									
									
									
									
									
								
							| @@ -283,6 +283,7 @@ if __name__ == "__main__": | |||||||
|     tensor2 = np.ones((32,), dtype=np.float32) * 101.0 |     tensor2 = np.ones((32,), dtype=np.float32) * 101.0 | ||||||
|     gguf_writer.write_tensor_info("tensor0", tensor1) |     gguf_writer.write_tensor_info("tensor0", tensor1) | ||||||
|     gguf_writer.write_tensor_info("tensor1", tensor2) |     gguf_writer.write_tensor_info("tensor1", tensor2) | ||||||
|     gguf_writer.write_tensors() |     gguf_writer.write_tensor(tensor1) | ||||||
|  |     gguf_writer.write_tensor(tensor2) | ||||||
|  |  | ||||||
|     gguf_writer.close() |     gguf_writer.close() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 M. Yusuf Sarıgöz
					M. Yusuf Sarıgöz