Quantization unavailability

#2
by sapbot - opened
INFO:hf-to-gguf:Loading model: tempmodel
INFO:hf-to-gguf:Model architecture: LlamaForCausalLM
INFO:hf-to-gguf:gguf: indexing model part 'model.safetensors'
INFO:gguf.gguf_writer:gguf: This GGUF file is for Little Endian only
INFO:hf-to-gguf:Exporting model...
INFO:hf-to-gguf:token_embd.weight,          torch.float32 --> Q8_0, shape = {64, 4096}
INFO:hf-to-gguf:blk.0.attn_norm.weight,     torch.float32 --> F32, shape = {64}
INFO:hf-to-gguf:blk.0.ffn_down.weight,      torch.float32 --> Q8_0, shape = {128, 64}
INFO:hf-to-gguf:blk.0.ffn_gate.weight,      torch.float32 --> Q8_0, shape = {64, 128}
INFO:hf-to-gguf:blk.0.ffn_up.weight,        torch.float32 --> Q8_0, shape = {64, 128}
INFO:hf-to-gguf:blk.0.ffn_norm.weight,      torch.float32 --> F32, shape = {64}
INFO:hf-to-gguf:blk.0.attn_k.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.0.attn_output.weight,   torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.0.attn_q.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.0.attn_v.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.1.attn_norm.weight,     torch.float32 --> F32, shape = {64}
INFO:hf-to-gguf:blk.1.ffn_down.weight,      torch.float32 --> Q8_0, shape = {128, 64}
INFO:hf-to-gguf:blk.1.ffn_gate.weight,      torch.float32 --> Q8_0, shape = {64, 128}
INFO:hf-to-gguf:blk.1.ffn_up.weight,        torch.float32 --> Q8_0, shape = {64, 128}
INFO:hf-to-gguf:blk.1.ffn_norm.weight,      torch.float32 --> F32, shape = {64}
INFO:hf-to-gguf:blk.1.attn_k.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.1.attn_output.weight,   torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.1.attn_q.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.1.attn_v.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.2.attn_norm.weight,     torch.float32 --> F32, shape = {64}
INFO:hf-to-gguf:blk.2.ffn_down.weight,      torch.float32 --> Q8_0, shape = {128, 64}
INFO:hf-to-gguf:blk.2.ffn_gate.weight,      torch.float32 --> Q8_0, shape = {64, 128}
INFO:hf-to-gguf:blk.2.ffn_up.weight,        torch.float32 --> Q8_0, shape = {64, 128}
INFO:hf-to-gguf:blk.2.ffn_norm.weight,      torch.float32 --> F32, shape = {64}
INFO:hf-to-gguf:blk.2.attn_k.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.2.attn_output.weight,   torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.2.attn_q.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.2.attn_v.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.3.attn_norm.weight,     torch.float32 --> F32, shape = {64}
INFO:hf-to-gguf:blk.3.ffn_down.weight,      torch.float32 --> Q8_0, shape = {128, 64}
INFO:hf-to-gguf:blk.3.ffn_gate.weight,      torch.float32 --> Q8_0, shape = {64, 128}
INFO:hf-to-gguf:blk.3.ffn_up.weight,        torch.float32 --> Q8_0, shape = {64, 128}
INFO:hf-to-gguf:blk.3.ffn_norm.weight,      torch.float32 --> F32, shape = {64}
INFO:hf-to-gguf:blk.3.attn_k.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.3.attn_output.weight,   torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.3.attn_q.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.3.attn_v.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.4.attn_norm.weight,     torch.float32 --> F32, shape = {64}
INFO:hf-to-gguf:blk.4.ffn_down.weight,      torch.float32 --> Q8_0, shape = {128, 64}
INFO:hf-to-gguf:blk.4.ffn_gate.weight,      torch.float32 --> Q8_0, shape = {64, 128}
INFO:hf-to-gguf:blk.4.ffn_up.weight,        torch.float32 --> Q8_0, shape = {64, 128}
INFO:hf-to-gguf:blk.4.ffn_norm.weight,      torch.float32 --> F32, shape = {64}
INFO:hf-to-gguf:blk.4.attn_k.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.4.attn_output.weight,   torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.4.attn_q.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:blk.4.attn_v.weight,        torch.float32 --> Q8_0, shape = {64, 64}
INFO:hf-to-gguf:output_norm.weight,         torch.float32 --> F32, shape = {64}
INFO:hf-to-gguf:Set meta model
INFO:hf-to-gguf:Set model parameters
INFO:hf-to-gguf:gguf: context length = 512
INFO:hf-to-gguf:gguf: embedding length = 64
INFO:hf-to-gguf:gguf: feed forward length = 128
INFO:hf-to-gguf:gguf: head count = 8
INFO:hf-to-gguf:gguf: key-value head count = 8
WARNING:hf-to-gguf:Unknown RoPE type: default
INFO:hf-to-gguf:gguf: rope scaling type = NONE
INFO:hf-to-gguf:gguf: rope theta = 10000.0
INFO:hf-to-gguf:gguf: rms norm epsilon = 1e-06
INFO:hf-to-gguf:gguf: file type = 7
INFO:hf-to-gguf:Set model quantization version
INFO:hf-to-gguf:Set model tokenizer
Traceback (most recent call last):
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/llama.py", line 55, in set_vocab
    self._set_vocab_sentencepiece()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 1664, in _set_vocab_sentencepiece
    tokens, scores, toktypes = self._create_vocab_sentencepiece()
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 1681, in _create_vocab_sentencepiece
    raise FileNotFoundError(f"File not found: {tokenizer_path}")
FileNotFoundError: File not found: tempmodel/tokenizer.model

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/llama.py", line 58, in set_vocab
    self._set_vocab_llama_hf()
    ~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 1766, in _set_vocab_llama_hf
    vocab = gguf.LlamaHfVocab(self.dir_model)
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/gguf-py/gguf/vocab.py", line 529, in __init__
    raise FileNotFoundError('Cannot find Llama BPE tokenizer')
FileNotFoundError: Cannot find Llama BPE tokenizer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/convert_hf_to_gguf.py", line 260, in <module>
    main()
    ~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/convert_hf_to_gguf.py", line 254, in main
    model_instance.write()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 942, in write
    self.prepare_metadata(vocab_only=False)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 1103, in prepare_metadata
    self.set_vocab()
    ~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/llama.py", line 61, in set_vocab
    self._set_vocab_gpt2()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 1598, in _set_vocab_gpt2
    tokens, toktypes, tokpre = self.get_vocab_base()
                               ~~~~~~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 1255, in get_vocab_base
    tokenizer = AutoTokenizer.from_pretrained(self.dir_model)
  File "/media/sapbot/steam/conda/base/lib/python3.13/site-packages/transformers/models/auto/tokenization_auto.py", line 1137, in from_pretrained
    raise ValueError(
        f"Tokenizer class {tokenizer_class_candidate} does not exist or is not currently imported."
    )
ValueError: Tokenizer class TokenizersBackend does not exist or is not currently imported.
Unbundle Objects Error: Failed to decompress input: Could not decompress embedded file contents: Data corruption detected

While quantizing with standart llama.cpp. Tried ANY of SupraLabs's models

Im currently trying to correct that. It seems it's a tokenizer uncompatibility

SupraLabs org

Can you try to quantize again?

yeah, 1s

New error

Traceback (most recent call last):
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/llama.py", line 55, in set_vocab
    self._set_vocab_sentencepiece()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 1664, in _set_vocab_sentencepiece
    tokens, scores, toktypes = self._create_vocab_sentencepiece()
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 1681, in _create_vocab_sentencepiece
    raise FileNotFoundError(f"File not found: {tokenizer_path}")
FileNotFoundError: File not found: tempmodel/tokenizer.model

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/llama.py", line 58, in set_vocab
    self._set_vocab_llama_hf()
    ~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 1766, in _set_vocab_llama_hf
    vocab = gguf.LlamaHfVocab(self.dir_model)
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/gguf-py/gguf/vocab.py", line 529, in __init__
    raise FileNotFoundError('Cannot find Llama BPE tokenizer')
FileNotFoundError: Cannot find Llama BPE tokenizer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/convert_hf_to_gguf.py", line 260, in <module>
    main()
    ~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/convert_hf_to_gguf.py", line 254, in main
    model_instance.write()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 942, in write
    self.prepare_metadata(vocab_only=False)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 1103, in prepare_metadata
    self.set_vocab()
    ~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/llama.py", line 61, in set_vocab
    self._set_vocab_gpt2()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 1598, in _set_vocab_gpt2
    tokens, toktypes, tokpre = self.get_vocab_base()
                               ~~~~~~~~~~~~~~~~~~~^^
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 1259, in get_vocab_base
    tokpre = self.get_vocab_base_pre(tokenizer)
  File "/media/sapbot/steam/expirements/quantizing/llama.cpp/conversion/base.py", line 1586, in get_vocab_base_pre
    raise NotImplementedError("BPE pre-tokenizer was not recognized - update get_vocab_base_pre()")
NotImplementedError: BPE pre-tokenizer was not recognized - update get_vocab_base_pre()
SupraLabs org

Okay let me see

SupraLabs org

Sorry, this is a tokenizer uncompatibility, i can't do anything for this model, because the parser only recognize other types of tokenizer, this is a BPE custom, but for v5 and v6, we are going to use HF Compatible tokenizers. But thanks for the feedback, we are going to use compatible tokenizers for the next Supra's!

sapbot changed discussion status to closed

Sign up or log in to comment