Text Classification
Transformers
Safetensors
Portuguese
qwen3
chat
filter
quality
classification
instruct
qwen
portuguese
text-embeddings-inference
Instructions to use Polygl0t/portuguese-qwen3-4b-instruct-quality-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Polygl0t/portuguese-qwen3-4b-instruct-quality-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Polygl0t/portuguese-qwen3-4b-instruct-quality-classifier")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Polygl0t/portuguese-qwen3-4b-instruct-quality-classifier") model = AutoModelForSequenceClassification.from_pretrained("Polygl0t/portuguese-qwen3-4b-instruct-quality-classifier") - Notebooks
- Google Colab
- Kaggle
Update chat_template.jinja
Browse files- chat_template.jinja +5 -5
chat_template.jinja
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{%- if tools %}
|
| 2 |
-
{{- '#
|
| 3 |
{%- if messages[0].role == 'system' %}
|
| 4 |
{{- messages[0].content + '\n\n' }}
|
| 5 |
{%- endif %}
|
|
@@ -11,7 +11,7 @@
|
|
| 11 |
{{- "\n</tools>\n\nPara cada chamada de função, retorne um objeto json com o nome da função e os argumentos dentro das tags XML <tool_call></tool_call>:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call>\n" }}
|
| 12 |
{%- else %}
|
| 13 |
{%- if messages[0].role == 'system' %}
|
| 14 |
-
{{- '#
|
| 15 |
{%- endif %}
|
| 16 |
{%- endif %}
|
| 17 |
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
|
@@ -29,7 +29,7 @@
|
|
| 29 |
{%- set content = '' %}
|
| 30 |
{%- endif %}
|
| 31 |
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
|
| 32 |
-
{{- '#
|
| 33 |
{%- elif message.role == "assistant" %}
|
| 34 |
{%- set reasoning_content = '' %}
|
| 35 |
{%- if message.reasoning_content is string %}
|
|
@@ -40,7 +40,7 @@
|
|
| 40 |
{%- endif %}
|
| 41 |
{%- endif %}
|
| 42 |
|
| 43 |
-
{{- '#
|
| 44 |
{%- if loop.index0 > ns.last_query_index %}
|
| 45 |
{%- if not loop.last and reasoning_content %}
|
| 46 |
{{- '<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
|
|
@@ -72,7 +72,7 @@
|
|
| 72 |
{{- '\n' }}
|
| 73 |
{%- elif message.role == "tool" %}
|
| 74 |
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
| 75 |
-
{{- '#
|
| 76 |
{%- endif %}
|
| 77 |
{{- '\n<tool_response>\n' }}
|
| 78 |
{{- content }}
|
|
|
|
| 1 |
{%- if tools %}
|
| 2 |
+
{{- '# Sistema\n' }}
|
| 3 |
{%- if messages[0].role == 'system' %}
|
| 4 |
{{- messages[0].content + '\n\n' }}
|
| 5 |
{%- endif %}
|
|
|
|
| 11 |
{{- "\n</tools>\n\nPara cada chamada de função, retorne um objeto json com o nome da função e os argumentos dentro das tags XML <tool_call></tool_call>:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call>\n" }}
|
| 12 |
{%- else %}
|
| 13 |
{%- if messages[0].role == 'system' %}
|
| 14 |
+
{{- '# Sistema\n' + messages[0].content + '\n' }}
|
| 15 |
{%- endif %}
|
| 16 |
{%- endif %}
|
| 17 |
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
|
|
|
| 29 |
{%- set content = '' %}
|
| 30 |
{%- endif %}
|
| 31 |
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
|
| 32 |
+
{{- '# ' + message.role.replace('user', 'Usuário').replace('assistant', 'Assistente').replace('tool', 'Ferramenta') + '\n' + content + '\n' }}
|
| 33 |
{%- elif message.role == "assistant" %}
|
| 34 |
{%- set reasoning_content = '' %}
|
| 35 |
{%- if message.reasoning_content is string %}
|
|
|
|
| 40 |
{%- endif %}
|
| 41 |
{%- endif %}
|
| 42 |
|
| 43 |
+
{{- '# ' + message.role.replace('user', 'Usuário').replace('assistant', 'Assistente').replace('tool', 'Ferramenta') + '\n'}}
|
| 44 |
{%- if loop.index0 > ns.last_query_index %}
|
| 45 |
{%- if not loop.last and reasoning_content %}
|
| 46 |
{{- '<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
|
|
|
|
| 72 |
{{- '\n' }}
|
| 73 |
{%- elif message.role == "tool" %}
|
| 74 |
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
| 75 |
+
{{- '# Usuário' }}
|
| 76 |
{%- endif %}
|
| 77 |
{{- '\n<tool_response>\n' }}
|
| 78 |
{{- content }}
|