Skip to content

Commit 111d234

Browse files
committed
whitespace correction and captialise quantization to match common naming convention
1 parent 8c9b3cb commit 111d234

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

convert.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def load(metadata_path: Path) -> "Metadata":
409409
metadata.url = data.get("general.url")
410410
metadata.description = data.get("general.description")
411411
metadata.license = data.get("general.license")
412-
412+
413413
return metadata
414414

415415

@@ -1327,7 +1327,7 @@ def model_parameter_count_rounded_notation(model_params_count: int) -> str:
13271327
# Millions Of Parameters
13281328
scaled_model_params = model_params_count * 1e-6
13291329
scale_suffix = "M"
1330-
else:
1330+
else:
13311331
# Thousands Of Parameters
13321332
scaled_model_params = model_params_count * 1e-3
13331333
scale_suffix = "K"
@@ -1523,9 +1523,9 @@ def load_vocab(
15231523

15241524
def default_outfile(model_paths: list[Path], file_type: GGMLFileType, params: Params, model_params_count: int, metadata: Metadata) -> Path:
15251525
quantization = {
1526-
GGMLFileType.AllF32: "f32",
1527-
GGMLFileType.MostlyF16: "f16",
1528-
GGMLFileType.MostlyQ8_0: "q8_0",
1526+
GGMLFileType.AllF32: "F32",
1527+
GGMLFileType.MostlyF16: "F16",
1528+
GGMLFileType.MostlyQ8_0: "Q8_0",
15291529
}[file_type]
15301530

15311531
parameters = model_parameter_count_rounded_notation(model_params_count)

llama.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ enum llm_kv {
226226
LLM_KV_GENERAL_ALIGNMENT,
227227
LLM_KV_GENERAL_NAME,
228228
LLM_KV_GENERAL_AUTHOR,
229+
LLM_KV_GENERAL_VERSION,
229230
LLM_KV_GENERAL_URL,
230231
LLM_KV_GENERAL_DESCRIPTION,
231232
LLM_KV_GENERAL_LICENSE,
@@ -280,6 +281,7 @@ static std::map<llm_kv, std::string> LLM_KV_NAMES = {
280281
{ LLM_KV_GENERAL_ALIGNMENT, "general.alignment" },
281282
{ LLM_KV_GENERAL_NAME, "general.name" },
282283
{ LLM_KV_GENERAL_AUTHOR, "general.author" },
284+
{ LLM_KV_GENERAL_VERSION, "general.version" },
283285
{ LLM_KV_GENERAL_URL, "general.url" },
284286
{ LLM_KV_GENERAL_DESCRIPTION, "general.description" },
285287
{ LLM_KV_GENERAL_LICENSE, "general.license" },

requirements/requirements-convert.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ sentencepiece~=0.1.98
33
transformers>=4.35.2,<5.0.0
44
gguf>=0.1.0
55
protobuf>=4.21.0,<5.0.0
6-
python-frontmatter>=1.0.1

0 commit comments

Comments
 (0)