Open Itime-ren opened 1 month ago
https://github.com/openai/tiktoken/issues/136 - I think it could be related to the issue described here.
@yanxi0830
I tracked the caching issue mentioned in this issue and confirmed that it is not the problem. Instead, it's that the line.split() in the following code: for line in contents.splitlines() if line
only produces a list with a length of 1 or 0. I'm puzzled as to why I can open tokenizer.model normally with vim, as the code seems fine, yet it produces an error when running.
a list with a length of 1 or 0 ,so:ValueError: not enough values to unpack (expected 2, got 1)
/usr/local/lib/python3.10/site-packages/tiktoken/load.py:
def load_tiktoken_bpe(tiktoken_bpe_file: str, expected_hash: str | None = None) -> dict[bytes, int]:
# NB: do not add caching to this function
contents = read_file_cached(tiktoken_bpe_file, expected_hash)
return {
base64.b64decode(token): int(rank)
for token, rank in (line.split() for line in contents.splitlines() if line)
I used the official Docker image and downloaded the weight file from Meta. The md5sum test proved that the file was fine, but it still failed to run, which left me confused,I confirm that CUDA can be used from within Docker