File size: 2,027 Bytes
4857ab0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
base_model:
- mistralai/Ministral-8B-Instruct-2410
language:
- en
- fr
- de
- es
- it
- pt
- zh
- ja
- ru
- ko
license: other
license_name: mrl
license_link: https://mistral.ai/licenses/MRL-0.1.md
inference: false
---
### exl2 quant (measurement.json in main branch)
---
### check revisions for quants
---


# Ministral-8B-Instruct-2410-HF

## Model Description

Ministral-8B-Instruct-2410-HF is the Hugging Face version of Ministral-8B-Instruct-2410 by Mistral AI. It is a multilingual instruction-tuned language model based on the Mistral architecture, designed for various natural language processing tasks with a focus on chat-based interactions.


## Installation

To use this model, install the required packages:

```bash
pip install -U transformers
```

## Usage Example

Here's a Python script demonstrating how to use the model for chat completion:

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

# Model setup
model_name = "prince-canuma/Ministral-8B-Instruct-2410-HF"
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_name)

# Chat interaction
prompt = "Tell me a short story about a robot learning to paint."
messages = [{"role": "user", "content": prompt}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
input_ids = tokenizer(text, return_tensors="pt").to(model.device)

# Generate response
output = model.generate(**input_ids, max_new_tokens=500, temperature=0.7, do_sample=True)
response = tokenizer.decode(output[0][input_ids.input_ids.shape[1]:])

print("User:", prompt)
print("Model:", response)
```

## Model Details

- **Developed by:** Mistral AI
- **Model type:** Causal Language Model
- **Language(s):** English
- **License:**  [mrl](https://mistral.ai/licenses/MRL-0.1.md)
- **Resources for more information:**
  - [Model Repository](https://huggingface.co/prince-canuma/Ministral-8B-Instruct-2410-HF)
  - [Mistral AI GitHub](https://github.com/mistralai)