Instructions to use topeomole/mistral_dlm_2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use topeomole/mistral_dlm_2 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("topeomole/mistral_dlm_2", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Unsloth Studio new
How to use topeomole/mistral_dlm_2 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for topeomole/mistral_dlm_2 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for topeomole/mistral_dlm_2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for topeomole/mistral_dlm_2 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="topeomole/mistral_dlm_2", max_seq_length=2048, )
Upload model trained with Unsloth
Browse filesUpload model trained with Unsloth 2x faster
- chat_template.jinja +15 -0
- special_tokens_map.json +6 -0
- tokenizer.json +0 -0
- tokenizer_config.json +0 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% if 'role' in messages[0] %}{% for message in messages %}{% if message['role'] == 'user' %}{{'<|im_start|>user
|
| 2 |
+
' + message['content'] + '<|im_end|>
|
| 3 |
+
'}}{% elif message['role'] == 'assistant' %}{{'<|im_start|>assistant
|
| 4 |
+
' + message['content'] + '<|im_end|>
|
| 5 |
+
' }}{% else %}{{ '<|im_start|>system
|
| 6 |
+
' + message['content'] + '<|im_end|>
|
| 7 |
+
' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
|
| 8 |
+
' }}{% endif %}{% else %}{% for message in messages %}{% if message['from'] == 'human' %}{{'<|im_start|>user
|
| 9 |
+
' + message['value'] + '<|im_end|>
|
| 10 |
+
'}}{% elif message['from'] == 'gpt' %}{{'<|im_start|>assistant
|
| 11 |
+
' + message['value'] + '<|im_end|>
|
| 12 |
+
' }}{% else %}{{ '<|im_start|>system
|
| 13 |
+
' + message['value'] + '<|im_end|>
|
| 14 |
+
' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
|
| 15 |
+
' }}{% endif %}{% endif %}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<s>",
|
| 3 |
+
"eos_token": "<|im_end|>",
|
| 4 |
+
"pad_token": "[control_768]",
|
| 5 |
+
"unk_token": "<unk>"
|
| 6 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|