初始化项目,由ModelHub XC社区提供模型

Model: vs4vijay/Llama-3.2-1B-uncensored
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-07-15 14:06:10 +08:00
commit 0db5ade3b9
8 changed files with 631 additions and 0 deletions

41
chat_template.jinja Normal file
View File

@@ -0,0 +1,41 @@
{{- bos_token }}
{%- if custom_tools is defined %}
{%- set tools = custom_tools %}
{%- endif %}
{%- if not tools_in_user_message is defined %}
{%- set tools_in_user_message = true %}
{%- endif %}
{%- if not date_string is defined %}
{%- set date_string = '26 Jul 2024' %}
{%- endif %}
{%- if not tools is defined %}
{%- set tools = none %}
{%- endif %}
{#- This block extracts the system message, so we can slot it into the system message prompt below #}
{%- if messages[0]['role'] == 'system' %}
{%- set system_message = messages[0]['content']|trim %}
{%- set messages = messages[1:] %}
{%- else %}
{%- set system_message = '' %}
{%- endif %}
{#- System message #}
{{- '<|start_header_id|>system<|end_header_id|>\n\n' }}
{%- if tools is not none %}
{{- 'You are a helpful assistant.' }}
{%- else %}
{{- system_message }}
{%- endif %}
{{- '<|eot_id|>' }}
{%- for message in messages %}
{%- if message['role'] == 'user' %}
{{- '<|start_header_id|>user<|end_header_id|>\n\n' + message['content']|trim + '<|eot_id|>' }}
{%- elif message['role'] == 'assistant' %}
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' + message['content']|trim + '<|eot_id|>' }}
{%- endif %}
{%- endfor %}
{%- if add_generation_prompt %}
{{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }}
{%- endif %}