Skip to content

Commit 1904044

Browse files
committed
[doc] update README and doc.
1 parent 7d8f166 commit 1904044

4 files changed

Lines changed: 42 additions & 8 deletions

File tree

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ It focuses on supporting the subset of Jinja2 used by modern Large Language Mode
1111
## Features
1212

1313
- **C++11 Compatible**: Ensures maximum compatibility across older compiler versions and embedded systems.
14+
- **Easy Integration**: The core library consists of just **one header file** (`include/jinja.hpp`) and **one source file** (`src/jinja.cpp`), making it extremely easy to copy and drop into any project.
1415
- **Lightweight**: Minimal dependencies (only `nlohmann/json`).
1516
- **LLM Focused**: Native support for `messages`, `tools`, `add_generation_prompt`, and special tokens.
1617
- **Strictly Typed**: Uses `nlohmann::json` for context management.
@@ -20,12 +21,13 @@ It focuses on supporting the subset of Jinja2 used by modern Large Language Mode
2021
## Supported Models
2122

2223
Tested and verified with templates from:
23-
- **Llama 3 / 3.1 / 3.2** (Instruct & Vision)
24-
- **Qwen 2.5** (Coder, Math, VL, Omni)
25-
- **Qwen 3** (Instruct, Thinking, QwQ)
24+
- **Qwen 2.5 / 3** (Coder, Math, VL, Omni, Instruct, Thinking, QwQ)
2625
- **DeepSeek** (V3, R1)
26+
- **Llama 3 / 3.1 / 3.2** (Instruct & Vision)
2727
- **Mistral**
2828
- **Gemma**
29+
- **SmolLM**
30+
- **Phi**
2931
- And more...
3032

3133
## Build Instructions

README_CN.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
## 特性
1212

1313
- **C++11 兼容**:确保在旧版编译器和嵌入式系统上的最大兼容性。
14+
- **易于集成**:核心库仅包含**一个头文件** (`include/jinja.hpp`) 和**一个源文件** (`src/jinja.cpp`),非常方便拷贝并集成到任何项目中。
1415
- **轻量级**:依赖极少 (仅依赖 `nlohmann/json`,已包含在项目中)。
1516
- **专注 LLM**:原生支持 `messages`, `tools`, `add_generation_prompt` 以及特殊 token 的处理。
1617
- **类型安全**:使用 `nlohmann::json` 进行上下文管理。
@@ -20,12 +21,13 @@
2021
## 支持的模型
2122

2223
已基于以下模型的真实模板进行测试验证:
23-
- **Llama 3 / 3.1 / 3.2** (Instruct & Vision)
24-
- **Qwen 2.5** (Coder, Math, VL, Omni)
25-
- **Qwen 3** (Instruct, Thinking, QwQ)
24+
- **Qwen 2.5 / 3** (Coder, Math, VL, Omni, Instruct, Thinking, QwQ)
2625
- **DeepSeek** (V3, R1)
26+
- **Llama 3 / 3.1 / 3.2** (Instruct & Vision)
2727
- **Mistral**
2828
- **Gemma**
29+
- **SmolLM**
30+
- **Phi**
2931
- 更多...
3032

3133
## 构建指南

doc/implementation_details.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,20 @@ To support a wide range of deployment environments:
8989

9090
## Testing Strategy
9191

92-
* **Real Data**: We use `tests/test_chat_template.json` generated from the official Python `transformers` library on typically supported models.
93-
* **Fuzzy Matching**: For dynamic content (like dates), tests use regex normalization to ensure pass consistency across time and environments.
92+
* **Real Data**: We use `tests/test_chat_template.json` generated from the official Python `transformers` library.
93+
* **Fuzzy Matching**: For dynamic content (like dates), tests use regex normalization to ensure pass consistency.
94+
95+
### Tested Models
96+
The following models are automatically verified in our test suite:
97+
98+
* **Qwen**: `Qwen2.5-3B-Instruct`, `Qwen2.5-VL-3B-Instruct`, `Qwen2.5-Omni-3B`, `Qwen2.5-7B-Instruct-1M`, `Qwen2.5-Math-7B-Instruct`, `QwQ-32B`
99+
* **Qwen3**: `Qwen3-4B`, `Qwen3-4B-Instruct`, `Qwen3-4B-Thinking`, `Qwen3-VL-4B-Instruct`, `Qwen3-VL-4B-Thinking`, `Qwen3Guard-Gen-4B`, `Qwen3-Coder-30B-A3B-Instruct`, `Qwen3-Omni-30B-A3B-Instruct`, `Qwen3-Omni-30B-A3B-Thinking`
100+
* **DeepSeek**: `DeepSeek-R1-Distill-Qwen-7B`, `DeepSeek-V3.2`, `DeepSeek-R1`
101+
* **GLM**: `ZhipuAI/GLM-4.5V`, `ZhipuAI/GLM-4.6V`
102+
* **Yi**: `01ai/Yi-VL-6B`, `01ai/Yi-1.5-6B-Chat`
103+
* **SmolLM**: `HuggingFaceTB/SmolLM-135M-Instruct`, `HuggingFaceTB/SmolVLM-256M-Instruct`, `HuggingFaceTB/SmolLM2-135M-Instruct`, `HuggingFaceTB/SmolLM3-3B`
104+
* **Gemma**: `google/gemma-3-4b-it`, `google/gemma-3n-E4B-it`
105+
* **Mistral**: `mistralai/Ministral-3-3B-Instruct-2512`
106+
* **Llama**: `llama-2-7b`, `Meta-Llama-3-8B-Instruct`, `Llama-3.2-3B-Instruct`
107+
* **Phi**: `Phi-3.5-mini-instruct`, `Phi-3.5-vision-instruct`, `phi-4`, `Phi-4-mini-reasoning`
108+
* **MobileLLM**: `LLM-Research/MobileLLM-125M`

doc/implementation_details_CN.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,18 @@ Lexer 部分模拟了 Jinja2 的 `lstrip_blocks` 和 `trim_blocks` 行为。手
9191

9292
* **真实数据**: 我们使用 `tests/test_chat_template.json`,该文件是从官方 Python `transformers` 库针对通常支持的模型生成的。
9393
* **模糊匹配**: 对于动态内容 (如日期),测试使用正则归一化来确跨时间和环境的通过一致性。
94+
95+
### 已通过测试的模型 (Tested Models)
96+
我们在测试套件中自动验证了以下模型:
97+
98+
* **Qwen**: `Qwen2.5-3B-Instruct`, `Qwen2.5-VL-3B-Instruct`, `Qwen2.5-Omni-3B`, `Qwen2.5-7B-Instruct-1M`, `Qwen2.5-Math-7B-Instruct`, `QwQ-32B`
99+
* **Qwen3**: `Qwen3-4B`, `Qwen3-4B-Instruct`, `Qwen3-4B-Thinking`, `Qwen3-VL-4B-Instruct`, `Qwen3-VL-4B-Thinking`, `Qwen3Guard-Gen-4B`, `Qwen3-Coder-30B-A3B-Instruct`, `Qwen3-Omni-30B-A3B-Instruct`, `Qwen3-Omni-30B-A3B-Thinking`
100+
* **DeepSeek**: `DeepSeek-R1-Distill-Qwen-7B`, `DeepSeek-V3.2`, `DeepSeek-R1`
101+
* **GLM**: `ZhipuAI/GLM-4.5V`, `ZhipuAI/GLM-4.6V`
102+
* **Yi**: `01ai/Yi-VL-6B`, `01ai/Yi-1.5-6B-Chat`
103+
* **SmolLM**: `HuggingFaceTB/SmolLM-135M-Instruct`, `HuggingFaceTB/SmolVLM-256M-Instruct`, `HuggingFaceTB/SmolLM2-135M-Instruct`, `HuggingFaceTB/SmolLM3-3B`
104+
* **Gemma**: `google/gemma-3-4b-it`, `google/gemma-3n-E4B-it`
105+
* **Mistral**: `mistralai/Ministral-3-3B-Instruct-2512`
106+
* **Llama**: `llama-2-7b`, `Meta-Llama-3-8B-Instruct`, `Llama-3.2-3B-Instruct`
107+
* **Phi**: `Phi-3.5-mini-instruct`, `Phi-3.5-vision-instruct`, `phi-4`, `Phi-4-mini-reasoning`
108+
* **MobileLLM**: `LLM-Research/MobileLLM-125M`

0 commit comments

Comments
 (0)