Problem with `mistral3` when loading the model

#14
by r3lativo - opened

ValueError: The checkpoint you are trying to load has model type `mistral3` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.

but:

transformers 4.49.0

what am I doing wrong?

You need 4.50.0.dev0

thanks, solved with

pip install git+https://github.com/huggingface/transformers.git

r3lativo changed discussion status to closed
r3lativo changed discussion status to open

now i get:

ERROR 03-18 16:24:27 [core.py:340] ValueError: Mistral3ForConditionalGeneration has no vLLM implementation and the Transformers implementation is not compatible with vLLM. Try setting VLLM_USE_V1=0.
ERROR 03-18 16:24:27 [core.py:340] 
CRITICAL 03-18 16:24:27 [core_client.py:269] Got fatal signal from worker processes, shutting down. See stack trace above for root cause issue.
Killed

and I really don't understand

yeah I followed the instructions, I'm just trying the script here on a A100:
https://huggingface.co/mistralai/Mistral-Small-3.1-24B-Instruct-2503#offline

edit:
even setting VLLM_USE_V1=0 doesn't solve the issue but gives me the same error plus:

[rank0]:[W318 16:29:26.791873028 ProcessGroupNCCL.cpp:1496] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator())

Using latest vLLM and installing transformers from source, getting the following error:

[dckr]: ERROR 03-18 09:12:51 [core.py:340]     raise ValueError(
[dckr]: ERROR 03-18 09:12:51 [core.py:340] ValueError: Mistral3ForConditionalGeneration has no vLLM implementation and the Transformers implementation is not compatible with vLLM. Try setting VLLM_USE_V1=0.

So, autoconfig isn't working yet. You need to pass the all the command line args they suggest to work.

@r3lativo , try this, had same issue about mistral3.

llm = LLM(
model="mistralai/Mistral-Small-3.1-24B-Instruct-2503",
tokenizer_mode="mistral",
config_format="mistral",
load_format="mistral",
dtype="float16"
)

edit:
dtype is optional, used it to fit VRAM

Your need to confirm your account before you can post a new comment.

Sign up or log in to comment