TypeError: TextConfig.__init__() missing 1 required positional argument: 'rope_theta'

#1
by bibproj - opened
MLX Community org

Get this error when using mlx-vlm 0.3.9 on the command-line (as per example in the Model card)

same! i was being an idiot trying to solve this over on the official GLM 4.6V thread. transformers update there obviously didnt help lol. would love to figure out how to try this!

MLX Community org

When downloading the latest mlx-vlm from github, it gives

The tokenizer you are loading from 'mlx-community_GLM-4.6V-Flash-4bit' with an incorrect regex pattern: https://huggingface.co/mistralai/Mistral-Small-3.1-24B-Instruct-2503/discussions/84#69121093e8b480e709447d5e. This will lead to incorrect tokenization. You should set the fix_mistral_regex=True flag when loading this tokenizer to fix this issue.

ValueError: Failed to process inputs with error: PreTrainedTokenizerFast._batch_encode_plus() got an unexpected keyword argument 'images'

MLX Community org

Thank you to @Timmy-web

This solved the problem: pip install git+https://github.com/huggingface/transformers.git

bibproj changed discussion status to closed

i tried the same pip install git+https://github.com/huggingface/transformers.git but it doesnt solve it for me, ive got the same error still. =( =(

i thought it might be because i had downloaded through lm studio. but same exact problem when loading it directly with instructions on the model card. could this be because of my python verison? running out of possiblities here.

im on python 3.11.11

MLX Community org

@Noodlz

I first ran pip install -U mlx-vlm, and it provided me version 0.3.9. I see that LM Studio still uses 0.3.7. Then I ran git clone https://github.com/Blaizzy/mlx-vlm.git and used that copy of mlx-vlm. This picks up the latest code changes after version 0.3.9. That's when I got the tokenization error. Then Timmy-web gave the hint to also install the transformers code, which worked.

MLX Community org

I'm also on python 3.11

ah ha! awesome thanks! that solved it. so basically just need the latest latest version of mlx-vlm. the pip version is basically not update yet. the cost of the bleeding edge life haha.

for anyone else reading it. I uninstalled mlx-vlm with pip uninstall mlx-vlm, grabbed the latest with git clone https://github.com/Blaizzy/mlx-vlm.git, then within that mlx-vlm folder, did pip install . which gave me the latest

all that is to say most of this should like resolve itself once all the packages are updated with pip~

Sign up or log in to comment