You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
get_chat_template breaks when using add_prefix_space #305
Error message: TypeError: Couldn't build proto file into descriptor pool: duplicate file name sentencepiece_model.proto
Apart from this issue, there seems to be some quirk with loading a modified tokenizer from a folder with trained lora adapters.
In my case at the end of training I save tokenizer in the same folder as the adapters. When loading lora I give path to the folder with adapters (which also contains saved tokenizer) and it seems that unsloth tries to load the saved tokenizer instead of loading the one from the base model. The most confusing thing is that it thinks I set add_prefix_space=True, since I didn't
Moving tokenizer files into a separate folder fixes things, unsloth loads base tokenizer as expected. But the mystery still remains
@oKatanaaa Possibly fixed hopefully! Your code runs now - it seems like I'm dumb and using from transformers.utils import sentencepiece_model_pb2 solved the issue
Downgrading protobuf to 3.20.1 solved the issue. It should be mentioned in the patch notes in the next release since the issue still persists with newest protobuf versions.
@oKatanaaa You're correct! I updated the pyproject.toml to use < 4.0.0. I'm not sure why its erroring out - it seems like protobuf does not like people creating new sentencepiece tokenizers from scratch
Activity
oKatanaaa commentedon Apr 5, 2024
Related issue #291
This one possibly can be solved by upgrading
sentencepiecelibrary to the latest version.danielhanchen commentedon Apr 5, 2024
@oKatanaaa Possibly fixed hopefully! Your code runs now - it seems like I'm dumb and using
from transformers.utils import sentencepiece_model_pb2solved the issueoKatanaaa commentedon Apr 5, 2024
Sadly, the issue still persists for me. I tried both main and nightly branches. I also tried upgrading
protobufversion to the latest. Nothing helped.In case it helps to identify the issue, here is a list of my python packages:
oKatanaaa commentedon Apr 5, 2024
Downgrading protobuf to 3.20.1 solved the issue. It should be mentioned in the patch notes in the next release since the issue still persists with newest protobuf versions.
danielhanchen commentedon Apr 6, 2024
@oKatanaaa You're correct! I updated the pyproject.toml to use < 4.0.0. I'm not sure why its erroring out - it seems like protobuf does not like people creating new sentencepiece tokenizers from scratch
Merge pull request unslothai#305 from unslothai/fix/dropdown-layout-s…