WIAWAN/shieldgemma-2-4b-it / chat_template.json
WIAWAN's picture
download
raw
1.33 kB
{
"chat_template": "{{ bos_token }}\n{%- for message in messages -%}\n {%- if message['content'] is iterable -%}\n {%- for item in message['content'] -%}\n {{ '<start_of_turn>user\n' }}\n {%- if item['type'] == 'image' -%}\n {{ '<start_of_image>' }}\n {%- elif item['type'] == 'text' -%}\n {{ 'You are a policy expert trying to help determine whether a generated or real image is in' }}\n {{ ' violation of the safety policy below. Your decision must very clearly follow the specific'}}\n {{ ' language used in the safety policy and should not include any interpretation outside of the' }}\n {{ ' safety policy.\n\n' }}\n {{ '<BEGIN_SAFETY_POLICY>\n' }}\n {{ item['text'] + '\n' }}\n {{ '</END_SAFETY_POLICY>\n\n' }}\n {{ 'Does the image violate the above policy? Your Answer must start with \\'Yes\\' or \\'No\\'.' }}\n {{ '<end_of_turn>\n' }}\n {%- endif -%}\n {%- endfor -%}\n {{'<start_of_turn>model\n'}}\n {%- else -%}\n {{ raise_exception(\"Conversation messages must contain iterable content containing images and policy definitions in text.\") }}\n {%- endif -%}\n{%- endfor -%}\n"
}

Xet Storage Details

Size:
1.33 kB
·
Xet hash:
b875b4cc4665c95cb7a05ca7ef0fb462e4a3e9e48ba2b4eb7d8af1f58805fbe0

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.