Downloads · 30 days
195
1% of all-time downloads
Qiskit/mistral-small-3.2-24b-qiskit
mistral-small-3.2-24b-qiskit is a text generation model from Qiskit. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
195
1% of all-time downloads
All-time downloads
13.2K
Public
Parameters
24B
96.1 GB on disk
Likes
9
Public
Click a slice to open those files.
.safetensors48 GB · 100%
From the Hugging Face model README

Mistral-Small-3.2-24B-Qiskit is a model specialized in Qiskit coding and based on the Mistral-Small-3.2-24B-Instruct-2506 model. With 24 billion parameters, this model achieves top-tier capabilities in both text and vision tasks. Using Qiskit code and instruction tuning data, we improve it's capabilities at writing high-quality and non-deprecated Qiskit code. We used only data with the following licenses: Apache 2.0, MIT, the Unlicense, Mulan PSL Version 2, BSD-2, BSD-3, and Creative Commons Attribution 4.0.
Main features compared to previous models specialized on Qiskit code:
Mistral-Small-3.2-24B-Qiskit is compatible with the latest HuggingFace transformers and we advise you to use the latest version of transformers.
Here we provide a code snippet with apply_chat_template to show you how to load the tokenizer and model and how to generate content.
from transformers import Mistral3ForConditionalGeneration, AutoTokenizer
model_name = "Qiskit/mistral-small-3.2-24b-qiskit"
model = Mistral3ForConditionalGeneration.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Generate a random quantum circuit with 5 qubits."
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
| Model | QiskitHumanEval-Hard | QiskitHumanEval | HumanEval | ASDiv | MathQA | SciQ | MBPP | IFEval | CrowsPairs (English) | TruthfulQA (MC1 acc) |
|---|---|---|---|---|---|---|---|---|---|---|
| qwen2.5-coder-14b-qiskit | 25.17 | 49.01 | 91.46 | 4.21 | 53.90 | 97.00 | 77.60 | 49.64 | 65.18 | 37.82 |
| mistral-small-3.2-24b-qiskit | 32.45 | 47.02 | 77.49 | 3.77 | 49.68 | 97.50 | 64.00 | 48.44 | 67.08 | 39.41 |
| granite-3.3-8b-qiskit | 14.57 | 27.15 | 62.80 | 0.48 | 38.66 | 93.30 | 52.40 | 59.71 | 59.75 | 39.05 |
| granite-3.2-8b-qiskit | 9.93 | 24.50 | 57.32 | 0.09 | 41.41 | 96.30 | 51.80 | 60.79 | 66.79 | 40.51 |
Note: All models listed in the benchmark table were evaluated using their respective system prompt, defined in their Hugging Face model.
We train Mistral-Small-3.2-24B-Qiskit using IBM's super computing cluster (Vela) using NVIDIA A100 GPUs. The cluster provides a scalable and efficient infrastructure for training.
The use of Large Language Models involves risks and ethical considerations people must be aware of. Regarding code generation, caution is urged against complete reliance on specific code models for crucial decisions or impactful information as the generated code is not guaranteed to work as intended. Mistral-Small-3.2-24B-Qiskit model is not the exception in this regard. Even though this model is suited for multiple code-related tasks, it has not undergone any safety alignment, there it may produce problematic outputs. Additionally, it remains uncertain whether smaller models might exhibit increased susceptibility to hallucination in generation scenarios by copying source code verbatim from the training dataset due to their reduced sizes and memorization capacities. This aspect is currently an active area of research, and we anticipate more rigorous exploration, comprehension, and mitigations in this domain. Regarding ethics, a latent risk associated with all Large Language Models is their malicious utilization. We urge the community to use Mistral-Small-3.2-24B-Qiskit model with ethical intentions and in a responsible way.