mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-30 08:42:00 +00:00 
			
		
		
		
	scripts: Use local gguf package when running from repo (#2927)
* scripts: Use local gguf when running from repo
This commit is contained in:
		| @@ -2,13 +2,16 @@ | ||||
| # train-text-from-scratch checkpoint --> gguf conversion | ||||
|  | ||||
| import argparse | ||||
| import gguf | ||||
| import os | ||||
| import struct | ||||
| import sys | ||||
| import numpy as np | ||||
| from pathlib import Path | ||||
|  | ||||
| if 'NO_LOCAL_GGUF' not in os.environ: | ||||
|     sys.path.insert(1, str(Path(__file__).parent / '..' / '..' / 'gguf-py' / 'gguf')) | ||||
| import gguf | ||||
|  | ||||
| # gguf constants | ||||
| LLM_KV_OPTIMIZER_TYPE = "optimizer.type" | ||||
| LLM_KV_OPTIMIZER_TYPE_ADAM  = "adam" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Kerfuffle
					Kerfuffle