commit 4e86890edab62672f55581c7251d41fc27f3f2a5 Author: ModelHub XC Date: Sun Jul 19 01:19:10 2026 +0800 初始化项目,由ModelHub XC社区提供模型 Model: EphAsad/Atem-SageMaths-1.5B Source: Original Platform diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..09c3761 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,42 @@ +*.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-Wisdom-1.5B.Q8_0.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.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text +Atem-SageMaths-1.5B[[:space:]].Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text +Atem-SageMaths-1.5B[[:space:]].Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text +Atem-SageMaths-1.5B[[:space:]].Q8_0.gguf filter=lfs diff=lfs merge=lfs -text diff --git a/Atem-SageMaths-1.5B .Q4_K_M.gguf b/Atem-SageMaths-1.5B .Q4_K_M.gguf new file mode 100644 index 0000000..9a73edb --- /dev/null +++ b/Atem-SageMaths-1.5B .Q4_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b03b3549027e1528d2b8df26f9f1eb6c4dd2bb03f69df43cffbd69d7e7b75b3 +size 986048544 diff --git a/Atem-SageMaths-1.5B .Q5_K_M.gguf b/Atem-SageMaths-1.5B .Q5_K_M.gguf new file mode 100644 index 0000000..be0f0c3 --- /dev/null +++ b/Atem-SageMaths-1.5B .Q5_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:203a88e77051e99566132c0c084d3757fe67005a3a5790056092dd182c05725d +size 1125050400 diff --git a/Atem-SageMaths-1.5B .Q8_0.gguf b/Atem-SageMaths-1.5B .Q8_0.gguf new file mode 100644 index 0000000..46d34e5 --- /dev/null +++ b/Atem-SageMaths-1.5B .Q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94d473d53294847ab441db680c855c39d8e6a389071934ddf2c94d8990b06660 +size 1646573088 diff --git a/README.md b/README.md new file mode 100644 index 0000000..609a247 --- /dev/null +++ b/README.md @@ -0,0 +1,344 @@ +--- +base_model: EphAsad/Atem-Wisdom-1.5B +language: +- en +license: apache-2.0 +tags: +- qwen2 +- unsloth +- lora +- llama.cpp +- reasoning +- chain-of-thought +- thinking +- mathematics +- math +- distillation +- conversational +- text-generation-inference +datasets: +- HuggingFaceH4/MATH-500 +- EleutherAI/hendrycks_math +- qwedsacf/competition_math +pipeline_tag: text-generation +--- + +![Atem Logo](https://huggingface.co/EphAsad/Atem-v1-1.5B/resolve/main/Logo.png) + +# Atem-SageMaths + +*Ancient logic. Modern intelligence. Applied to mathematics.* + +A 1.5B mathematics model trained on competition-grade problems — covering algebra, geometry, number theory, combinatorics, and more. + +![Base Model](https://img.shields.io/badge/Base-Atem--Wisdom--1.5B-blue) +![Stage](https://img.shields.io/badge/Stage-Maths%20Specialisation-purple) +![Parameters](https://img.shields.io/badge/Parameters-1.5B-orange) +![License](https://img.shields.io/badge/License-Apache%202.0-green) + +--- + +## Overview + +Atem-SageMaths is a mathematics-specialised variant of [Atem-Wisdom-1.5B](https://huggingface.co/EphAsad/Atem-Wisdom-1.5B), fine-tuned on a curated corpus of competition and curriculum mathematics problems drawn from three complementary sources. It inherits Atem-Wisdom's reasoning capability and applies it to mathematical problem solving — working through problems step by step before arriving at a final answer. + +The training corpus spans the full difficulty range from pre-algebra through competition-level mathematics, with structured solution traces from MATH-500 providing the think-then-answer format on harder problems. + +**When to choose Atem-SageMaths over Atem-Wisdom:** + +- Mathematical problem solving across a broad difficulty range +- Competition mathematics — algebra, geometry, number theory, combinatorics, probability +- Situations where step-by-step mathematical working is required +- Curriculum mathematics tasks at pre-algebra through precalculus level + +**When to choose Atem-Wisdom instead:** + +- General reasoning, analytical, and logic tasks outside mathematics +- Mixed-domain workloads where maths is one of many task types +- Coding and algorithm tasks + +--- + +## The Atem Series + +| Model | Stage | Capability | Status | +|---|---|---|---| +| [Atem v1](https://huggingface.co/EphAsad/Atem-v1-1.5B) | Stage 1 — SFT | Fast, direct reasoning | ✅ | +| [Atem-Wisdom](https://huggingface.co/EphAsad/Atem-Wisdom-1.5B) | Stage 2 — CoT | Explicit thinking traces | ✅ | +| [Atem-SageCoder](https://huggingface.co/EphAsad/Atem-SageCoder-1.5B) | Specialisation — Code | Think-then-code on algorithms | ✅ | +| **Atem-SageMaths** | Specialisation — Maths | Structured mathematical problem solving | ✅ | +| Atem-Pharaoh *(planned)* | Stage 3 — DPO/IPO | Preference-aligned reasoning | 🔄 | + +Atem-SageMaths is a domain-specialised branch off Atem-Wisdom, parallel to Atem-SageCoder. Both share the same base and training framework; only the dataset domain differs. + +--- + +## Model Details + +| Property | Value | +|---|---| +| **Base model** | EphAsad/Atem-Wisdom-1.5B | +| **Root architecture** | Qwen/Qwen2.5-1.5B-Instruct | +| **Training method** | LoRA SFT — Mathematics Specialisation | +| **LoRA config** | r=32, alpha=64, dropout=0.05 | +| **Parameters** | ~1.54B | +| **Training records** | 16,940 (after filtering) | +| **Think / no-think split** | ~3% / ~97% | +| **Epochs** | 2 | +| **Total steps** | 266 | +| **Final train loss** | 0.5602 | +| **Final val loss** | 0.6044 | +| **Hardware** | NVIDIA A100-SXM4 80GB | +| **Max sequence length** | 8,192 tokens | +| **Precision** | bfloat16 | +| **License** | Apache 2.0 | + +--- + +## Output Format + +Atem-SageMaths produces responses in one of two formats: + +**With reasoning trace (MATH-500 derived examples):** + +``` + +[Step-by-step mathematical working — problem analysis, intermediate +calculations, verification of results] + + +[Final answer] +``` + +**Direct answer (majority of responses):** + +``` +[Structured solution with working shown inline] +``` + +The think-then-answer format activates on harder problems where the training data included explicit reasoning traces. The majority of training data (97%) used direct solution format without a separate think block, reflecting the natural composition of the training corpus. + +--- + +## Training Data + +Atem-SageMaths was trained on 16,940 examples assembled from three sources after token length filtering. camel-ai/math was initially included but removed due to streaming instability during data loading. + +| Dataset | Records | CoT | Domain | +|---|---|---|---| +| HuggingFaceH4/MATH-500 | 500 | ✅ solution→think, answer→final | Competition maths, full curriculum | +| EleutherAI/hendrycks_math | ~10,500 (1,500 × 7 subsets) | ❌ | Algebra, geometry, number theory, counting & probability, intermediate algebra, prealgebra, precalculus | +| qwedsacf/competition_math | 10,000 | ❌ | Competition mathematics | + +**MATH-500 handling:** The `solution` field contains full worked solutions and was used as the CoT trace (placed between `` tags). The `answer` field (boxed final answer) was used as the response. This is the only source of think-trace training examples. + +**hendrycks_math subsets loaded:** algebra, counting_and_probability, geometry, intermediate_algebra, number_theory, prealgebra, precalculus — 1,500 records from the train split of each. + +**Token length filter:** Examples exceeding 8,192 tokens after chat template application were removed rather than truncated. This is the primary source of attrition from the ~31,000 raw records loaded to 16,940 retained. + +**Loss curve:** + +| Step | Train Loss | Val Loss | +|---|---|---| +| 100 | 0.6201 | 0.6310 | +| 200 | 0.5362 | 0.6077 | +| 266 (final) | **0.5602** | **0.6044** | + +Loss values are substantially lower than Atem-SageCoder (0.604 vs 0.859), consistent with mathematics Q&A being more formulaic and predictable than code+CoT reasoning traces. Train/val gap of ~0.04 throughout — no overfitting signal. Sharp improvement from steps 100→200 followed by stabilisation. + +--- + +## Training Configuration + +```python +# Key hyperparameters +lora_r = 32 +lora_alpha = 64 +lora_dropout = 0.05 +max_seq_length = 8192 +learning_rate = 1e-4 +lr_scheduler = 'cosine' +warmup_ratio = 0.05 +batch_size = 8 # auto-scaled by Unsloth from config 4; + # shorter math examples left VRAM headroom +grad_accumulation = 16 # effective batch size: 128 +num_epochs = 2 +dtype = bfloat16 +load_in_4bit = True +nothink_ratio = 0.97 # reflects natural dataset composition +``` + +Training used Unsloth (`unsloth==2026.5.5`, `unsloth_zoo==2026.5.5`) with `train_on_responses_only` masking. Loss was computed exclusively on assistant response tokens. Pre-training validation confirmed identity, think tag format, and mask correctness before training was confirmed. + +--- + +## Usage + +### Transformers + +```python +from transformers import AutoModelForCausalLM, AutoTokenizer +import torch + +model_name = "EphAsad/Atem-SageMaths-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": "Find all integer solutions to x² - 7x + 12 = 0." + } +] + +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=1024, + temperature=0.7, + top_p=0.9, + repetition_penalty=1.1, + do_sample=True, + ) + +print(tokenizer.decode(output[0][inputs.shape[1]:], skip_special_tokens=True)) +``` + +### Unsloth (faster inference) + +```python +from unsloth import FastLanguageModel +import torch + +model, tokenizer = FastLanguageModel.from_pretrained( + model_name="EphAsad/Atem-SageMaths-1.5B", + max_seq_length=8192, + dtype=torch.bfloat16, + load_in_4bit=True, +) +FastLanguageModel.for_inference(model) + +messages = [ + { + "role": "user", + "content": "In how many ways can 8 people be seated around a circular table?" + } +] + +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=1024, + 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-SageMaths-1.5B:Q4_K_M + +# Higher quality +ollama run hf.co/EphAsad/Atem-SageMaths-1.5B:Q5_K_M + +# Near-lossless +ollama run hf.co/EphAsad/Atem-SageMaths-1.5B:Q8_0 +``` + +### llama.cpp + +```bash +llama-server -hf EphAsad/Atem-SageMaths-1.5B:Q4_K_M +``` + +### System Prompt + +Atem-SageMaths's identity and mathematical focus are baked into the chat template. To override manually: + +``` +You are Atem-SageMaths, a precise mathematical reasoning assistant built +on the Atem foundation. You approach problems methodically — working through +each step carefully, verifying intermediate results, and arriving at +well-supported solutions. Your answers are rigorous, clearly structured, +and mathematically correct. +``` + +### Available Files + +| File | Size | Description | +|---|---|---| +| `model.safetensors` | ~3.1 GB | Full bfloat16 merged weights | +| `Atem-SageMaths-1.5B.Q4_K_M.gguf` | ~986 MB | 4-bit quantised — recommended | +| `Atem-SageMaths-1.5B.Q5_K_M.gguf` | ~1.1 GB | 5-bit quantised | +| `Atem-SageMaths-1.5B.Q8_0.gguf` | ~1.6 GB | 8-bit quantised — near-lossless | + +--- + +## Known Limitations + +**Thin CoT coverage.** Only MATH-500 (500 records, ~3% of training data) contributes explicit think traces. The model's think-then-answer behaviour is therefore limited to problems structurally similar to MATH-500 content. On novel problem types, it defaults to the direct solution format. + +**Arithmetic precision.** Multi-step numerical calculations remain a known weakness across the Atem series. Intermediate arithmetic slips can occur on problems requiring many sequential operations. Final answers to precision-critical calculations should be independently verified. + +**Competition scope.** Training data is heavily weighted toward competition-style problems with clean closed-form answers. Open-ended applied mathematics, calculus, linear algebra, and statistics are not represented in the training corpus. + +--- + +## Roadmap + +| Stage | Status | Description | +|---|---|---| +| Stage 1 — SFT | ✅ Complete | Atem v1 — direct reasoning foundation | +| Stage 2 — CoT SFT | ✅ Complete | Atem-Wisdom — thinking traces | +| Specialisation — Code | ✅ Complete | Atem-SageCoder | +| Specialisation — Maths | ✅ Complete | **Atem-SageMaths — this model** | +| Stage 3 — DPO/IPO | 🔄 Planned | Atem-Pharaoh — preference-aligned reasoning | + +--- + +## Citation + +```bibtex +@misc{atem_sagemaths_2026, + author = {Asad, Zain}, + title = {Atem-SageMaths: A 1.5B Mathematics Model + via Competition Problem Distillation}, + year = {2026}, + publisher = {HuggingFace}, + howpublished = {\url{https://huggingface.co/EphAsad/Atem-SageMaths-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 → Atem-SageMaths). + +--- + +Built independently by [EphAsad](https://huggingface.co/EphAsad) \ No newline at end of file diff --git a/chat_template.jinja b/chat_template.jinja new file mode 100644 index 0000000..c37cec5 --- /dev/null +++ b/chat_template.jinja @@ -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 XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|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\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {{- tool_call.arguments | tojson }} + {{- '}\n' }} + {%- endfor %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- message.content }} + {{- '\n' }} + {%- 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 %} diff --git a/config.json b/config.json new file mode 100644 index 0000000..a5e9778 --- /dev/null +++ b/config.json @@ -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.5", + "use_cache": false, + "use_sliding_window": false, + "vocab_size": 151936 +} \ No newline at end of file diff --git a/generation_config.json b/generation_config.json new file mode 100644 index 0000000..5f32a68 --- /dev/null +++ b/generation_config.json @@ -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" +} diff --git a/model.safetensors b/model.safetensors new file mode 100644 index 0000000..60d1582 --- /dev/null +++ b/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84e5aeda7470114a93d3b1836d6dff5c9aa05fc49135db6a2c4ded81da8aa66e +size 3087467144 diff --git a/tokenizer.json b/tokenizer.json new file mode 100644 index 0000000..5340d81 --- /dev/null +++ b/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd5948af71b4f56cf697f7580814c7ce8b80595ef985544efcacf716126a2e31 +size 11422356 diff --git a/tokenizer_config.json b/tokenizer_config.json new file mode 100644 index 0000000..4122bec --- /dev/null +++ b/tokenizer_config.json @@ -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": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": false + }, + "151658": { + "content": "", + "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 XML tags:\\n\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n\\n\\nFor each function call, return a json object with function name and arguments within XML tags:\\n\\n{\\\"name\\\": , \\\"arguments\\\": }\\n<|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\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n' }}\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\\n' }}\n {{- message.content }}\n {{- '\\n' }}\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" +} \ No newline at end of file