|
--- |
|
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) |