Instructions to use sanjeevnv/multimodal-pretraining with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sanjeevnv/multimodal-pretraining with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("sanjeevnv/multimodal-pretraining", dtype="auto", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Append </s> in pretraining chat template file
Browse filesUpdate chat_template.jinja, which Transformers prioritizes over tokenizer_config.json, so the pretraining template emits </s> as EOD.
- chat_template.jinja +1 -1
chat_template.jinja
CHANGED
|
@@ -6,6 +6,6 @@
|
|
| 6 |
{%- elif message.role == "user" %}
|
| 7 |
{{- "\nquestion: " + message.content }}
|
| 8 |
{%- elif message.role == "assistant" %}
|
| 9 |
-
{{- "\nanswer: " }}{% generation %}{{- message.content }}{% endgeneration %}
|
| 10 |
{%- endif %}
|
| 11 |
{%- endfor %}
|
|
|
|
| 6 |
{%- elif message.role == "user" %}
|
| 7 |
{{- "\nquestion: " + message.content }}
|
| 8 |
{%- elif message.role == "assistant" %}
|
| 9 |
+
{{- "\nanswer: " }}{% generation %}{{- message.content }}{{- "</s>" }}{% endgeneration %}
|
| 10 |
{%- endif %}
|
| 11 |
{%- endfor %}
|