Instructions to use rikeshVertex/test_upload with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rikeshVertex/test_upload with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("rikeshVertex/test_upload", dtype="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,474 Bytes
889e455 | 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 | {%- if not add_generation_prompt is defined -%}
{%- set add_generation_prompt = true -%}
{%- endif -%}
{%- if not cls_token is defined -%}
{%- set cls_token = "<|begin_of_sentence|>" -%}
{%- endif -%}
{%- if not eos_token is defined -%}
{%- set eos_token = "</s>" -%}
{%- endif -%}
{{- cls_token -}}
{%- for message in messages -%}
{%- if message["role"] == "user" -%}
{{- "User: " -}}
{%- for content in message["content"] -%}
{%- if content["type"] == "image" -%}
{{ "<|IMAGE_START|><|IMAGE_PLACEHOLDER|><|IMAGE_END|>" }}
{%- endif -%}
{%- endfor -%}
{%- for content in message["content"] -%}
{%- if content["type"] == "text" -%}
{{ content["text"] }}
{%- endif -%}
{%- endfor -%}
{{ "\n" -}}
{%- elif message["role"] == "assistant" -%}
{{- "Assistant:\n" -}}
{%- for content in message["content"] -%}
{%- if content["type"] == "text" -%}
{{ content["text"] }}
{%- endif -%}
{%- endfor -%}
{{ eos_token -}}
{%- elif message["role"] == "system" -%}
{%- for content in message["content"] -%}
{%- if content["type"] == "text" -%}
{{ content["text"] + "\n" }}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{- "Assistant:\n" -}}
{%- endif -%}
|