Views
No views yet
Mistral3ForConditionalGeneration:
Pixtral vision encoder + text decoder). At export time, optimum-intel did not support
the mistral3 vision tower for OpenVINO, so only the text decoder was exported.
This build accepts text input only. Everything else (reasoning, multilingual,
262k context) is unchanged.pip install openvino-genai huggingface_hub.1from huggingface_hub import snapshot_download
2import openvino_genai as ov_genai
3
4model_dir = snapshot_download("ianlav/Ministral-3-8B-Reasoning-INT4-OpenVINO")
5
6pipe = ov_genai.LLMPipeline(model_dir, "GPU") # "GPU" | "CPU" | "NPU"
7
8cfg = ov_genai.GenerationConfig()
9cfg.max_new_tokens = 2048 # reasoning traces are long — give it room
10cfg.temperature = 0.7 # Mistral's recommended sampling
11cfg.top_p = 0.95
12cfg.do_sample = True
13
14pipe.start_chat()
15print(pipe.generate("How many r's are in 'strawberry'? Think it through.", cfg))
16pipe.finish_chat()[THINK] … [/THINK],
followed by the final answer — split on those tags to separate scratch-work from the reply.First generation on"GPU"spends ~30–60 s compiling for the device; subsequent calls are fast.
pip install "optimum[openvino]"1from transformers import AutoTokenizer
2from optimum.intel import OVModelForCausalLM
3
4repo = "ianlav/Ministral-3-8B-Reasoning-INT4-OpenVINO"
5tok = AutoTokenizer.from_pretrained(repo)
6model = OVModelForCausalLM.from_pretrained(repo, device="GPU") # or "CPU"
7
8msgs = [{"role": "user", "content": "What is 17 * 24? Reason step by step."}]
9enc = tok.apply_chat_template(msgs, add_generation_prompt=True,
10 return_tensors="pt", return_dict=True)
11out = model.generate(**enc, max_new_tokens=1024, do_sample=True,
12 temperature=0.7, top_p=0.95)
13print(tok.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True))mistralai/Ministral-3-8B-Reasoning-2512 weights.language_model + lm_head) into a standalone
Ministral3ForCausalLM.sym, group_size=128, ratio=1.0), and convert the tokenizer with
openvino-tokenizers. The unregistered ministral3 type is aliased to mistral's
OpenVINO export config (identical GQA + YARN-rope decoder).