Misaka27260 commited on
Commit
ed8791d
·
verified ·
1 Parent(s): f461bbf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +118 -3
README.md CHANGED
@@ -1,3 +1,118 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - zh
5
+ - en
6
+ base_model:
7
+ - huihui-ai/Qwen3-14B-abliterated
8
+ pipeline_tag: text-generation
9
+ tags:
10
+ - gguf
11
+ - qwen3
12
+ - chat
13
+ - abliterated
14
+ - uncensored
15
+ - conversational
16
+ ---
17
+ Quantized gguf file of huihui-ai/Qwen3-14B-abliterated
18
+
19
+ to use it in lm studio, please set chat template manually as follows:
20
+
21
+ ```jinja
22
+ {%- if tools %}
23
+ {{- '<|im_start|>system\n' }}
24
+ {%- if messages[0].role == 'system' %}
25
+ {{- messages[0].content + '\n\n' }}
26
+ {%- endif %};
27
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
28
+ {%- for tool in tools %}
29
+ {{- "\n" }}
30
+ {{- tool | tojson }}
31
+ {%- endfor %}
32
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
33
+ {%- else %}
34
+ {%- if messages[0].role == 'system' %}
35
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
36
+ {%- endif %}
37
+ {%- endif %}
38
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
39
+ {%- for message in messages[::-1] %}
40
+ {%- set index = (messages|length - 1) - loop.index0 %}
41
+ {%- set tool_start = "<tool_response>" %}
42
+ {%- set tool_start_length = tool_start|length %}
43
+ {%- set start_of_message = message.content[:tool_start_length] %}
44
+ {%- set tool_end = "</tool_response>" %}
45
+ {%- set tool_end_length = tool_end|length %}
46
+ {%- set start_pos = (message.content|length) - tool_end_length %}
47
+ {%- if start_pos < 0 %}
48
+ {%- set start_pos = 0 %}
49
+ {%- endif %}
50
+ {%- set end_of_message = message.content[start_pos:] %}
51
+ {%- if ns.multi_step_tool and message.role == "user" and not(start_of_message == tool_start and end_of_message == tool_end) %}
52
+ {%- set ns.multi_step_tool = false %}
53
+ {%- set ns.last_query_index = index %}
54
+ {%- endif %}
55
+ {%- endfor %}
56
+ {%- for message in messages %}
57
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
58
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
59
+ {%- elif message.role == "assistant" %}
60
+ {%- set content = message.content %}
61
+ {%- set reasoning_content = '' %}
62
+ {%- if message.reasoning_content is defined and message.reasoning_content is not none %}
63
+ {%- set reasoning_content = message.reasoning_content %}
64
+ {%- else %}
65
+ {%- if '</think>' in message.content %}
66
+ {%- set content = (message.content.split('</think>')|last).lstrip('\n') %}
67
+ {%- set reasoning_content = (message.content.split('</think>')|first).rstrip('\n') %}
68
+ {%- set reasoning_content = (reasoning_content.split('<think>')|last).lstrip('\n') %}
69
+ {%- endif %}
70
+ {%- endif %}
71
+ {%- if loop.index0 > ns.last_query_index %}
72
+ {%- if loop.last or (not loop.last and reasoning_content) %}
73
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
74
+ {%- else %}
75
+ {{- '<|im_start|>' + message.role + '\n' + content }}
76
+ {%- endif %}
77
+ {%- else %}
78
+ {{- '<|im_start|>' + message.role + '\n' + content }}
79
+ {%- endif %}
80
+ {%- if message.tool_calls %}
81
+ {%- for tool_call in message.tool_calls %}
82
+ {%- if (loop.first and content) or (not loop.first) %}
83
+ {{- '\n' }}
84
+ {%- endif %}
85
+ {%- if tool_call.function %}
86
+ {%- set tool_call = tool_call.function %}
87
+ {%- endif %}
88
+ {{- '<tool_call>\n{"name": "' }}
89
+ {{- tool_call.name }}
90
+ {{- '", "arguments": ' }}
91
+ {%- if tool_call.arguments is string %}
92
+ {{- tool_call.arguments }}
93
+ {%- else %}
94
+ {{- tool_call.arguments | tojson }}
95
+ {%- endif %}
96
+ {{- '}\n</tool_call>' }}
97
+ {%- endfor %}
98
+ {%- endif %}
99
+ {{- '<|im_end|>\n' }}
100
+ {%- elif message.role == "tool" %}
101
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
102
+ {{- '<|im_start|>user' }}
103
+ {%- endif %}
104
+ {{- '\n<tool_response>\n' }}
105
+ {{- message.content }}
106
+ {{- '\n</tool_response>' }}
107
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
108
+ {{- '<|im_end|>\n' }}
109
+ {%- endif %}
110
+ {%- endif %}
111
+ {%- endfor %}
112
+ {%- if add_generation_prompt %}
113
+ {{- '<|im_start|>assistant\n' }}
114
+ {%- if enable_thinking is defined and enable_thinking is false %}
115
+ {{- '<think>\n\n</think>\n\n' }}
116
+ {%- endif %}
117
+ {%- endif %}
118
+ ```