8000 Various script cleanups/fixes + convert merges and special token handling by KerfuffleV2 · Pull Request #2842 · ggml-org/llama.cpp · GitHub
[go: up one dir, main page]

Skip to content

Various script cleanups/fixes + convert merges and special token handling #2842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor types cleanups.
  • Loading branch information
KerfuffleV2 committed Aug 29, 2023
commit 795c0c6e9d633b0bf48ee804b6fd90e6a4761208
4 changes: 2 additions & 2 deletions convert-falcon-hf-to-gguf.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def count_model_parts(dir_model: str) -> int:

print("gguf: get tokenizer metadata")

tokens: List[str] = []
tokens: List[bytearray] = []
scores: List[float] = []
toktypes: List[int] = []
merges: List[str] = []
Expand Down Expand Up @@ -199,7 +199,7 @@ def count_model_parts(dir_model: str) -> int:
print("gguf: get tensor metadata")

if num_parts == 0:
part_names = ("pytorch_model.bin",)
part_names = iter(("pytorch_model.bin",))
else:
part_names = (
f"pytorch_model-{n:05}-of-{num_parts:05}.bin" for n in range(1, num_parts + 1)
Expand Down
4 changes: 2 additions & 2 deletions convert-llama-hf-to-gguf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import numpy as np
import torch

from typing import Any, List, Optional
from typing import Any, List, Optional, TypeAlias
from pathlib import Path
from sentencepiece import SentencePieceProcessor

Expand Down Expand Up @@ -254,7 +254,7 @@ def count_model_parts(dir_model: str) -> int:
print("gguf: get tensor metadata")

if num_parts == 0:
part_names = ("pytorch_model.bin",)
part_names = iter(("pytorch_model.bin",))
else:
part_names = (
f"pytorch_model-{n:05}-of-{num_parts:05}.bin" for n in range(1, num_parts + 1)
Expand Down
0