Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model:
|
| 4 |
+
- mistralai/Ministral-3-14B-Instruct-2512
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# Ministral-3-14B-Instruct-2512-TextOnly
|
| 8 |
+
|
| 9 |
+
This model is the **text-only component** extracted from the Vision-Language Model [mistralai/Ministral-3-14B-Instruct-2512](https://huggingface.co/mistralai/Ministral-3-14B-Instruct-2512).
|
| 10 |
+
|
| 11 |
+
## Usage
|
| 12 |
+
|
| 13 |
+
You can load this model using `AutoModelForCausalLM` as shown below:
|
| 14 |
+
|
| 15 |
+
```python
|
| 16 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 17 |
+
|
| 18 |
+
model_id = "Aratako/Ministral-3-14B-Instruct-2512-TextOnly"
|
| 19 |
+
|
| 20 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 21 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 22 |
+
model_id,
|
| 23 |
+
device_map="cuda",
|
| 24 |
+
)
|
| 25 |
+
|
| 26 |
+
messages = [
|
| 27 |
+
{
|
| 28 |
+
"role": "user",
|
| 29 |
+
"content": "Tell me a joke about computers.",
|
| 30 |
+
},
|
| 31 |
+
]
|
| 32 |
+
|
| 33 |
+
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt").to("cuda")
|
| 34 |
+
|
| 35 |
+
output = model.generate(
|
| 36 |
+
input_ids, max_new_tokens=512, pad_token_id=tokenizer.eos_token_id
|
| 37 |
+
)
|
| 38 |
+
|
| 39 |
+
decoded_output = tokenizer.decode(
|
| 40 |
+
output[0][len(input_ids[0]) :], skip_special_tokens=True
|
| 41 |
+
)
|
| 42 |
+
print(decoded_output)
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
## Original Model Information
|
| 46 |
+
|
| 47 |
+
This is a weight extraction of the original VLM. For detailed benchmarks, licensing details, and architectural information, please refer to the original model card: **[mistralai/Ministral-3-14B-Instruct-2512](https://huggingface.co/mistralai/Ministral-3-14B-Instruct-2512)**
|