Ill-Ness commited on
Commit
cdfd549
·
verified ·
1 Parent(s): a0f25a6

Delete chat_template.json

Browse files
Files changed (1) hide show
  1. chat_template.json +0 -124
chat_template.json DELETED
@@ -1,124 +0,0 @@
1
- {
2
- "chat_template_version": "1.0.0",
3
- "description": "ChatML-format chat template for Verus-0.8b. Supports multimodal (text + image) interleaving via <|vision_start|>, <|image_pad|>, and <|vision_end|> tokens. Compatible with the Qwen2.5-VL processor pipeline.",
4
- "model": "8F-ai/Verus-0.8b",
5
- "default_system_prompt": "You are Verus, a helpful multimodal coding assistant. You specialize in converting UI mockups, wireframes, and architecture diagrams into production-ready code.",
6
- "special_tokens": {
7
- "turn_start": "<|im_start|>",
8
- "turn_end": "<|im_end|>",
9
- "vision_start": "<|vision_start|>",
10
- "vision_end": "<|vision_end|>",
11
- "image_pad": "<|image_pad|>"
12
- },
13
- "chat_template": "{%- if messages[0]['role'] == 'system' %}{%- set system_message = messages[0]['content'] %}{%- set loop_messages = messages[1:] %}{%- else %}{%- set system_message = 'You are Verus, a helpful multimodal coding assistant. You specialize in converting UI mockups, wireframes, and architecture diagrams into production-ready code.' %}{%- set loop_messages = messages %}{%- endif %}{{- '<|im_start|>system\n' + system_message + '<|im_end|>\n' }}{%- for message in loop_messages %}{%- if message['role'] == 'user' %}{{- '<|im_start|>user\n' }}{%- if message['content'] is iterable and message['content'] is not string %}{%- for item in message['content'] %}{%- if item['type'] == 'image' %}{{- '<|vision_start|><|image_pad|><|vision_end|>' }}{%- elif item['type'] == 'text' %}{{- item['text'] }}{%- endif %}{%- endfor %}{%- else %}{{- message['content'] }}{%- endif %}{{- '<|im_end|>\n' }}{%- elif message['role'] == 'assistant' %}{{- '<|im_start|>assistant\n' }}{%- if message['content'] is not none %}{{- message['content'] }}{%- endif %}{%- if not loop.last or not add_generation_prompt %}{{- '<|im_end|>\n' }}{%- endif %}{%- endif %}{%- endfor %}{%- if add_generation_prompt %}{{- '<|im_start|>assistant\n' }}{%- endif %}",
14
- "chat_template_pretty": [
15
- "NOTE: The 'chat_template' key above is the machine-readable single-line version.",
16
- "The following is an annotated, human-readable representation of the same logic:",
17
- "",
18
- "── SYSTEM TURN ──────────────────────────────────────────────────────────────",
19
- "{%- if messages[0]['role'] == 'system' %}",
20
- " {%- set system_message = messages[0]['content'] %}",
21
- " {%- set loop_messages = messages[1:] %}",
22
- "{%- else %}",
23
- " {%- set system_message = DEFAULT_SYSTEM_PROMPT %}",
24
- " {%- set loop_messages = messages %}",
25
- "{%- endif %}",
26
- "{{- '<|im_start|>system\\n' + system_message + '<|im_end|>\\n' }}",
27
- "",
28
- "── CONVERSATION TURNS ───────────────────────────────────────────────────────",
29
- "{%- for message in loop_messages %}",
30
- "",
31
- " ── USER TURN ─────────────────────────────────────────────────────────",
32
- " {%- if message['role'] == 'user' %}",
33
- " {{- '<|im_start|>user\\n' }}",
34
- "",
35
- " ── MULTIMODAL CONTENT (list of dicts) ──────────────────────────",
36
- " {%- if message['content'] is iterable and message['content'] is not string %}",
37
- " {%- for item in message['content'] %}",
38
- " {%- if item['type'] == 'image' %}",
39
- " {{- '<|vision_start|><|image_pad|><|vision_end|>' }}",
40
- " {%- elif item['type'] == 'text' %}",
41
- " {{- item['text'] }}",
42
- " {%- endif %}",
43
- " {%- endfor %}",
44
- "",
45
- " ── PLAIN TEXT CONTENT (string) ─────────────────────────────────",
46
- " {%- else %}",
47
- " {{- message['content'] }}",
48
- " {%- endif %}",
49
- " {{- '<|im_end|>\\n' }}",
50
- "",
51
- " ── ASSISTANT TURN ────────────────────────────────────────────────────",
52
- " {%- elif message['role'] == 'assistant' %}",
53
- " {{- '<|im_start|>assistant\\n' }}",
54
- " {%- if message['content'] is not none %}",
55
- " {{- message['content'] }}",
56
- " {%- endif %}",
57
- " ── Omit closing <|im_end|> on the final turn when prompting ────",
58
- " {%- if not loop.last or not add_generation_prompt %}",
59
- " {{- '<|im_end|>\\n' }}",
60
- " {%- endif %}",
61
- " {%- endif %}",
62
- "",
63
- "{%- endfor %}",
64
- "",
65
- "── GENERATION PROMPT ───────────���────────────────────────────────────────────",
66
- "{%- if add_generation_prompt %}",
67
- " {{- '<|im_start|>assistant\\n' }}",
68
- "{%- endif %}"
69
- ],
70
- "examples": [
71
- {
72
- "label": "Text-only single turn",
73
- "input": [
74
- {
75
- "role": "user",
76
- "content": "Write a Python function to flatten a nested list."
77
- }
78
- ],
79
- "expected_output": "<|im_start|>system\nYou are Verus, a helpful multimodal coding assistant. You specialize in converting UI mockups, wireframes, and architecture diagrams into production-ready code.<|im_end|>\n<|im_start|>user\nWrite a Python function to flatten a nested list.<|im_end|>\n<|im_start|>assistant\n"
80
- },
81
- {
82
- "label": "Multimodal UI-to-Code single turn",
83
- "input": [
84
- {
85
- "role": "user",
86
- "content": [
87
- {
88
- "type": "image",
89
- "image": "<PIL.Image or URL>"
90
- },
91
- {
92
- "type": "text",
93
- "text": "Convert this UI mockup into a React component with Tailwind CSS."
94
- }
95
- ]
96
- }
97
- ],
98
- "expected_output": "<|im_start|>system\nYou are Verus, a helpful multimodal coding assistant...<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>Convert this UI mockup into a React component with Tailwind CSS.<|im_end|>\n<|im_start|>assistant\n"
99
- },
100
- {
101
- "label": "Custom system prompt with multimodal content",
102
- "input": [
103
- {
104
- "role": "system",
105
- "content": "You are an expert Terraform engineer. Always output valid HCL."
106
- },
107
- {
108
- "role": "user",
109
- "content": [
110
- {
111
- "type": "image",
112
- "image": "<PIL.Image or URL>"
113
- },
114
- {
115
- "type": "text",
116
- "text": "Generate the Terraform config for this AWS architecture diagram."
117
- }
118
- ]
119
- }
120
- ],
121
- "expected_output": "<|im_start|>system\nYou are an expert Terraform engineer. Always output valid HCL.<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>Generate the Terraform config for this AWS architecture diagram.<|im_end|>\n<|im_start|>assistant\n"
122
- }
123
- ]
124
- }