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

Model: EphAsad/Atem-Wisdom-1.5B
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-07-07 17:55:17 +08:00
commit 6019e00063
12 changed files with 792 additions and 0 deletions

43
.gitattributes vendored Normal file
View File

@@ -0,0 +1,43 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
tokenizer.json filter=lfs diff=lfs merge=lfs -text
Atem-v1-1.5B.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
Atem-v1-1.5B.Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
Atem-v1-1.5B.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
Atem-Wisdom-1.5B.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
Atem-Wisdom-1.5B.Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
Atem-Wisdom-1.5B.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
Logo.png filter=lfs diff=lfs merge=lfs -text

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ae56ab5444f200ecbf435809965b3b9358c9a00c83eeeaf0cc4bd99a7bb29d43
size 986048544

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:79c3eaab5bcebbd5d4cc3fe49996315d1534d6b9942e580bd5fe5849d0f214fa
size 1125050400

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bcdd7efb0a907b822383d659c9d5a3b5c19732470922cbf4fac7230af6b718a2
size 1646573088

3
Logo.png Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:036d268ac79d1a5355a5ea602fc02ba312f4938c3506ddfa148ec7de44b69607
size 981796

399
README.md Normal file
View File

@@ -0,0 +1,399 @@
---
language:
- en
license: apache-2.0
base_model:
- EphAsad/Atem-v1-1.5B
tags:
- text-generation
- qwen2
- unsloth
- lora
- gguf
- llama.cpp
- reasoning
- chain-of-thought
- thinking
- distillation
pipeline_tag: text-generation
library_name: transformers
datasets:
- open-r1/OpenThoughts-114k-math
- Jackrong/Kimi-K2.5-Reasoning-1M-Cleaned
- Modotte/CodeX-2M-Thinking
- FreedomIntelligence/medical-o1-reasoning-SFT
- WithinUsAI/MiniMax_M2.7_Distilled_5k
- nvidia/OpenCodeReasoning
model-index:
- name: Atem-Wisdom v1.5B
results:
- task:
type: text-generation
name: Text Generation
dataset:
name: ARC-Challenge
type: ai2_arc
config: ARC-Challenge
split: test
metrics:
- type: acc_norm
value: 0.447
name: Accuracy (normalised)
verified: false
- task:
type: text-generation
name: Text Generation
dataset:
name: GSM8K
type: gsm8k
split: test
metrics:
- type: exact_match
value: 0.519
name: Exact Match (strict, 5-shot)
verified: false
- task:
type: text-generation
name: Text Generation
dataset:
name: HellaSwag
type: hellaswag
split: validation
metrics:
- type: acc_norm
value: 0.651
name: Accuracy (normalised)
verified: false
---
<p align="center">
<img src="Logo.png" width="300" alt="Atem Logo"/>
</p>
<h1 align="center">Atem-Wisdom</h1>
<p align="center">
<em>Ancient logic. Modern intelligence.</em>
</p>
<p align="center">
The reasoning variant of Atem — a 1.5B model that thinks before it answers.
</p>
<p align="center">
<img src="https://img.shields.io/badge/Base-Atem--v1--1.5B-blue" alt="Base Model"/>
<img src="https://img.shields.io/badge/Stage-2%20CoT%20Training-purple" alt="Stage"/>
<img src="https://img.shields.io/badge/Parameters-1.5B-orange" alt="Parameters"/>
<img src="https://img.shields.io/badge/License-Apache%202.0-green" alt="License"/>
</p>
---
## Overview
Atem-Wisdom is the second release in the Atem model series — the reasoning variant of [Atem v1](https://huggingface.co/EphAsad/Atem-v1-1.5B). Where Atem v1 provides fast, direct answers, Atem-Wisdom reasons through problems step by step before responding, making its thinking process visible and auditable.
The defining feature is the `<think>` tag: before producing a final answer, the model works through the problem internally, considering approaches, catching intermediate errors, and arriving at a considered conclusion. This reasoning trace is shown in full, not hidden.
**When to choose Atem-Wisdom over Atem v1:**
- Problems that benefit from explicit reasoning steps — mathematics, logic, analytical questions
- Situations where seeing the working matters as much as the answer
- Complex multi-part problems where intermediate reasoning affects the conclusion
- Tasks where you want to audit the model's reasoning, not just its output
**When to choose Atem v1:**
- Routine tasks where speed matters more than depth
- Simple factual questions and direct coding tasks
- Constrained environments where output length is a concern
---
## The Atem Series
| Model | Stage | Capability |
|-------|-------|-----------|
| [Atem v1](https://huggingface.co/EphAsad/Atem-v1-1.5B) | Stage 1 — SFT | Fast, direct reasoning |
| **Atem-Wisdom** | Stage 2 — CoT | Explicit thinking traces |
| Atem-Pharaoh *(planned)* | Stage 3 — DPO/IPO | Preference-aligned reasoning |
---
## Model Details
| Property | Value |
|----------|-------|
| **Base model** | EphAsad/Atem-v1-1.5B |
| **Training method** | LoRA SFT — Stage 2 (Chain-of-Thought) |
| **LoRA config** | r=32, alpha=64, dropout=0.05 |
| **Parameters** | ~1.54B |
| **Training records** | ~38,000 (after token length filtering) |
| **Think / no-think split** | 75% / 25% |
| **Epochs** | 2 |
| **Final val loss** | 1.057 |
| **Hardware** | NVIDIA A100-SXM4 80GB |
| **Max sequence length** | 4,096 tokens |
| **Precision** | bfloat16 |
| **License** | Apache 2.0 |
---
## Output Format
Atem-Wisdom produces responses in one of two formats depending on problem complexity:
**With reasoning trace (majority of responses):**
```
<think>
[Extended reasoning — working through the problem, identifying
approaches, checking intermediate steps, considering edge cases]
</think>
[Final answer — clear, direct, informed by the reasoning above]
```
**Direct answer (simple questions):**
```
[Concise direct response — no reasoning trace needed]
```
The model calibrated this behaviour during training, with 75% of training examples including explicit think traces and 25% formatted as direct answers. In qualitative evaluation, 25 of 30 test questions produced think traces, with the 5 direct answers all being appropriately simple questions.
---
## Training Data
Stage 2 training used a corpus of approximately 38,000 chain-of-thought examples drawn from eight sources, assembled on top of Atem v1's Stage 1 foundation. All records were formatted to the `<think>...</think>` structure where applicable, with records exceeding 4,096 tokens removed rather than truncated.
| Dataset | Focus |
|---------|-------|
| open-r1/OpenThoughts-114k-math | Mathematical reasoning |
| Jackrong/Kimi-K2.5-Reasoning-1M-Cleaned | General reasoning (3 configs) |
| Modotte/CodeX-2M-Thinking | Coding with thinking traces |
| FreedomIntelligence/medical-o1-reasoning-SFT | Medical reasoning |
| WithinUsAI/MiniMax_M2.7_Distilled_5k | Mixed reasoning |
| nvidia/OpenCodeReasoning | Code reasoning |
| Private dataset | Inverted reasoning traces |
Chinese-language reasoning traces from Kimi K2.5 were filtered using an ASCII character ratio threshold before inclusion.
**Loss curve:**
| Step | Train Loss | Val Loss |
|------|-----------|----------|
| 250 | 1.110 | 1.107 |
| 500 | 1.120 | 1.077 |
| 750 | 1.041 | 1.064 |
| 1000 | 1.045 | 1.058 |
| 1190 (final) | **1.039** | **1.057** |
Two epochs were run after the single-epoch run showed val loss still declining at completion, indicating further improvement available. The final val loss of 1.057 represents meaningful improvement over the single-epoch result of 1.085.
---
## Evaluation
### Benchmark Results
Evaluated using lm-evaluation-harness under identical conditions to Atem v1. ARC-Challenge and HellaSwag use zero-shot; GSM8K uses 5-shot.
| Task | Base (1.5B) | Atem v1 | **Atem-Wisdom** | v1→Wisdom |
|------|------------|---------|-----------------|-----------|
| ARC-Challenge | 43.7% | 45.5% | **44.7%** | -0.8% |
| GSM8K (strict) | 23.0% | 53.0% | **51.9%** | -1.1% |
| GSM8K (flexible) | — | — | **53.6%** | +0.6% |
| HellaSwag | 66.8% | 64.4% | **65.1%** | +0.7% |
**Note on GSM8K:** The strict match parser expects answers in `#### number` format. Atem-Wisdom's think traces cause answers to appear in a different structural position, which the strict parser occasionally misidentifies. The flexible extract score of 53.6% — which accepts any final numeric value — better reflects actual mathematical reasoning capability and slightly exceeds Atem v1's 53.0% strict score. HellaSwag shows marginal improvement from v1. ARC regression of 0.8% is within normal benchmark variance.
### Qualitative Evaluation
Atem-Wisdom was evaluated across 30 domain-representative questions using a matched system prompt (identical to the base model comparison), ensuring output differences reflect trained capability rather than prompt engineering.
| Metric | Atem v1 | Atem-Wisdom |
|--------|---------|-------------|
| Avg response length | 349 words | 654 words |
| Think tags present | 0/30 | 25/30 |
| Min response | 10 words | 117 words |
**Qualitative improvements over Atem v1:**
- **Monty Hall problem:** Atem v1 incorrectly set up the problem with 2 doors. Atem-Wisdom correctly reasons through the 3-door setup and arrives at the correct 2/3 switching probability.
- **Differentiation:** Correctly derives f'(x) = x²(3ln(x)+1) and stationary point at x = e^(-1/3) with second-derivative confirmation, consistent across all versions from v1.1 onward.
- **Sky colour:** Atem-Wisdom correctly explains Rayleigh scattering for both daytime blue and sunset red/orange, where previous versions produced partially incorrect explanations.
- **Logical fallacy identification:** Correctly identifies argumentum ad populum (appeal to popularity) in a test argument. Prior versions were inconsistent on this question.
- **Calibrated reasoning traces:** The model correctly suppresses think traces on simple questions (geometric series, basic decorator implementation, colour physics) while applying extended reasoning to complex ones.
**Known limitations:**
- Specific arithmetic errors persist on a subset of mathematical problems (harmonic mean of speeds, circular permutations). These are targeted for Stage 3 preference training.
- Inference is significantly slower than Atem v1 due to longer outputs including reasoning traces. This is a fundamental property of reasoning models, not a fixable defect.
---
## Usage
### Transformers
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_name = "EphAsad/Atem-Wisdom-1.5B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="auto"
)
messages = [
{
"role": "user",
"content": "A train travels from A to B at 60 km/h and returns "
"at 90 km/h. What is the average speed for the whole journey?"
}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
with torch.no_grad():
output = model.generate(
input_ids=inputs,
max_new_tokens=1500,
temperature=0.7,
top_p=0.9,
repetition_penalty=1.1,
do_sample=True,
)
response = tokenizer.decode(
output[0][inputs.shape[1]:],
skip_special_tokens=True
)
print(response)
```
### Unsloth (faster inference)
```python
from unsloth import FastLanguageModel
import torch
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="EphAsad/Atem-Wisdom-1.5B",
max_seq_length=4096,
dtype=torch.bfloat16,
load_in_4bit=True,
)
FastLanguageModel.for_inference(model)
messages = [
{
"role": "user",
"content": "Explain the intuition behind the Monty Hall problem."
}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
).to("cuda")
with torch.no_grad():
output = model.generate(
input_ids=inputs,
max_new_tokens=1500,
temperature=0.7,
top_p=0.9,
do_sample=True,
)
print(tokenizer.decode(output[0][inputs.shape[1]:], skip_special_tokens=True))
```
### Ollama
```bash
# Recommended — best speed/quality balance
ollama run hf.co/EphAsad/Atem-Wisdom-1.5B:Q4_K_M
# Higher quality
ollama run hf.co/EphAsad/Atem-Wisdom-1.5B:Q5_K_M
# Near-lossless
ollama run hf.co/EphAsad/Atem-Wisdom-1.5B:Q8_0
```
### llama.cpp
```bash
llama-server -hf EphAsad/Atem-Wisdom-1.5B:Q4_K_M
```
### Available Files
| File | Size | Description |
|------|------|-------------|
| `model.safetensors` | ~3.1 GB | Full bfloat16 weights |
| `Atem-Wisdom-1.5B.Q4_K_M.gguf` | ~986 MB | 4-bit — recommended |
| `Atem-Wisdom-1.5B.Q5_K_M.gguf` | ~1.1 GB | 5-bit |
| `Atem-Wisdom-1.5B.Q8_0.gguf` | ~1.6 GB | 8-bit — near-lossless |
### System Prompt
Atem-Wisdom's identity and reasoning style are baked into the chat template and activate automatically without a system message. To override manually:
```
You are Atem, a precise and analytical reasoning assistant. You approach
every problem methodically — identifying core concepts, reasoning step by
step, and arriving at well-supported conclusions. You show your thinking
clearly and are thorough, direct, and intellectually honest.
```
---
## Roadmap
| Stage | Status | Description |
|-------|--------|-------------|
| Stage 1 — SFT | ✅ Complete | Atem v1 — direct reasoning foundation |
| Stage 1.1 — Targeted SFT | ✅ Complete | Atem v1.1 — correctness improvements |
| Stage 2 — CoT SFT | ✅ Complete | **Atem-Wisdom — this model** |
| Stage 3 — DPO/IPO | 🔄 Planned | Atem-Pharaoh — preference-aligned reasoning |
Stage 3 will apply Direct Preference Optimization and Identity Preference Optimization to further refine reasoning quality, specifically targeting the remaining mathematical precision errors identified in Stage 2 evaluation.
---
## Citation
```bibtex
@misc{atem_wisdom_2026,
author = {Asad, Zain},
title = {Atem-Wisdom: A 1.5B Reasoning Model with
Explicit Chain-of-Thought Traces},
year = {2026},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/EphAsad/Atem-Wisdom-1.5B}},
}
```
---
## License
Released under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0), consistent with the base model chain (Qwen2.5-1.5B-Instruct → Atem v1 → Atem-Wisdom).
---
<p align="center">
Built independently by <a href="https://huggingface.co/EphAsad">EphAsad</a>
</p>

54
chat_template.jinja Normal file
View File

@@ -0,0 +1,54 @@
{%- if tools %}
{{- '<|im_start|>system\n' }}
{%- if messages[0]['role'] == 'system' %}
{{- messages[0]['content'] }}
{%- else %}
{{- 'You are Atem, a precise and analytical reasoning assistant. You approach every problem methodically — identifying core concepts, reasoning step by step, and arriving at well-supported conclusions. You show your thinking clearly and are thorough, direct, and intellectually honest.' }}
{%- endif %}
{{- "\n\n# 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>" }}
{%- for tool in tools %}
{{- "\n" }}
{{- tool | tojson }}
{%- endfor %}
{{- "\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" }}
{%- else %}
{%- if messages[0]['role'] == 'system' %}
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
{%- else %}
{{- '<|im_start|>system\nYou are Atem, a precise and analytical reasoning assistant. You approach every problem methodically — identifying core concepts, reasoning step by step, and arriving at well-supported conclusions. You show your thinking clearly and are thorough, direct, and intellectually honest.<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- for message in messages %}
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
{%- elif message.role == "assistant" %}
{{- '<|im_start|>' + message.role }}
{%- if message.content %}
{{- '\n' + message.content }}
{%- endif %}
{%- for tool_call in message.tool_calls %}
{%- if tool_call.function is defined %}
{%- set tool_call = tool_call.function %}
{%- endif %}
{{- '\n<tool_call>\n{"name": "' }}
{{- tool_call.name }}
{{- '", "arguments": ' }}
{{- tool_call.arguments | tojson }}
{{- '}\n</tool_call>' }}
{%- endfor %}
{{- '<|im_end|>\n' }}
{%- elif message.role == "tool" %}
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
{{- '<|im_start|>user' }}
{%- endif %}
{{- '\n<tool_response>\n' }}
{{- message.content }}
{{- '\n</tool_response>' }}
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
{{- '<|im_end|>\n' }}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- if add_generation_prompt %}
{{- '<|im_start|>assistant\n' }}
{%- endif %}

62
config.json Normal file
View File

@@ -0,0 +1,62 @@
{
"architectures": [
"Qwen2ForCausalLM"
],
"attention_dropout": 0.0,
"bos_token_id": null,
"torch_dtype": "bfloat16",
"eos_token_id": 151645,
"hidden_act": "silu",
"hidden_size": 1536,
"initializer_range": 0.02,
"intermediate_size": 8960,
"layer_types": [
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention"
],
"max_position_embeddings": 32768,
"max_window_layers": 21,
"model_type": "qwen2",
"num_attention_heads": 12,
"num_hidden_layers": 28,
"num_key_value_heads": 2,
"pad_token_id": 151665,
"rms_norm_eps": 1e-06,
"rope_parameters": {
"rope_theta": 1000000.0,
"rope_type": "default"
},
"sliding_window": null,
"tie_word_embeddings": true,
"unsloth_fixed": true,
"unsloth_version": "2026.5.10",
"use_cache": false,
"use_sliding_window": false,
"vocab_size": 151936
}

14
generation_config.json Normal file
View File

@@ -0,0 +1,14 @@
{
"do_sample": true,
"eos_token_id": [
151645,
151643
],
"max_length": 32768,
"pad_token_id": 151665,
"repetition_penalty": 1.1,
"temperature": 0.7,
"top_k": 20,
"top_p": 0.8,
"transformers_version": "5.5.0"
}

3
model.safetensors Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:27938f9119020363cabcd140e5bb45f8d7e4a454d6b7af4a19b14fecbe6a13d2
size 3087467144

3
tokenizer.json Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bd5948af71b4f56cf697f7580814c7ce8b80595ef985544efcacf716126a2e31
size 11422356

202
tokenizer_config.json Normal file
View File

@@ -0,0 +1,202 @@
{
"add_prefix_space": false,
"backend": "tokenizers",
"bos_token": null,
"clean_up_tokenization_spaces": false,
"eos_token": "<|im_end|>",
"errors": "replace",
"is_local": false,
"model_max_length": 32768,
"pad_token": "<|PAD_TOKEN|>",
"padding_side": "left",
"split_special_tokens": false,
"tokenizer_class": "Qwen2Tokenizer",
"unk_token": null,
"added_tokens_decoder": {
"151643": {
"content": "<|endoftext|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151644": {
"content": "<|im_start|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151645": {
"content": "<|im_end|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151646": {
"content": "<|object_ref_start|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151647": {
"content": "<|object_ref_end|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151648": {
"content": "<|box_start|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151649": {
"content": "<|box_end|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151650": {
"content": "<|quad_start|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151651": {
"content": "<|quad_end|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151652": {
"content": "<|vision_start|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151653": {
"content": "<|vision_end|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151654": {
"content": "<|vision_pad|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151655": {
"content": "<|image_pad|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151656": {
"content": "<|video_pad|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
},
"151657": {
"content": "<tool_call>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": false
},
"151658": {
"content": "</tool_call>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": false
},
"151659": {
"content": "<|fim_prefix|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": false
},
"151660": {
"content": "<|fim_middle|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": false
},
"151661": {
"content": "<|fim_suffix|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": false
},
"151662": {
"content": "<|fim_pad|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": false
},
"151663": {
"content": "<|repo_name|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": false
},
"151664": {
"content": "<|file_sep|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": false
},
"151665": {
"content": "<|PAD_TOKEN|>",
"single_word": false,
"lstrip": false,
"rstrip": false,
"normalized": false,
"special": true
}
},
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Atem, a precise and analytical reasoning assistant. You approach every problem methodically — identifying core concepts, reasoning step by step, and arriving at well-supported conclusions. You show your thinking clearly and are thorough, direct, and intellectually honest.' }}\n {%- endif %}\n {{- \"\\n\\n# 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>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\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\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Atem, a precise and analytical reasoning assistant. You approach every problem methodically — identifying core concepts, reasoning step by step, and arriving at well-supported conclusions. You show your thinking clearly and are thorough, direct, and intellectually honest.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n"
}