stefanj0 commited on
Commit
b13f463
·
verified ·
1 Parent(s): e5c1c06

Upload Qwen2.5-3B QLoRA model for LaTeX → FluentMath translation

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen2.5-3B-Instruct
3
+ library_name: peft
4
+ tags:
5
+ - latex
6
+ - mathematics
7
+ - text-to-speech
8
+ - mathematical-expressions
9
+ - qlora
10
+ - lora
11
+ - sft
12
+ - transformers
13
+ - trl
14
+ - qwen2.5
15
+ license: apache-2.0
16
+ pipeline_tag: text2text-generation
17
+ language:
18
+ - en
19
+ datasets:
20
+ - math-ai/AutoMathText
21
+ metrics:
22
+ - bleu
23
+ - exact_match
24
+ model-index:
25
+ - name: qwen2.5-3b-qlora-latex-fluentmath
26
+ results:
27
+ - task:
28
+ type: text2text-generation
29
+ name: LaTeX to Natural Language Translation
30
+ metrics:
31
+ - type: exact_match
32
+ value: 42.60
33
+ name: Exact Match Accuracy
34
+ - type: bleu
35
+ value: 93.39
36
+ name: BLEU Score
37
+ - type: similarity
38
+ value: 90.56
39
+ name: Edit Distance Similarity
40
+ ---
41
+
42
+ # Qwen2.5-3B QLoRA: LaTeX → FluentMath Translation
43
+
44
+ **Fine-tuned model for converting LaTeX mathematical expressions to natural spoken English (FluentMath style)**
45
+
46
+ This model is a QLoRA (4-bit quantized + LoRA adapters) fine-tuned version of [Qwen/Qwen2.5-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-3B-Instruct) for the specialized task of translating LaTeX mathematical notation into natural, conversational English suitable for text-to-speech systems.
47
+
48
+ ## Model Description
49
+
50
+ - **Base Model**: Qwen/Qwen2.5-3B-Instruct (2.93B parameters)
51
+ - **Fine-tuning Method**: QLoRA (4-bit quantization + LoRA adapters)
52
+ - **Training Data**: 10,000 augmented LaTeX → FluentMath pairs from AutoMathText dataset
53
+ - **Task**: Sequence-to-sequence translation of mathematical notation
54
+ - **License**: Apache 2.0 (inherited from base model)
55
+
56
+ ## Performance Metrics
57
+
58
+ Evaluated on 500 held-out test samples:
59
+
60
+ | Metric | Score |
61
+ |--------|-------|
62
+ | **Exact Match Accuracy** | **42.60%** |
63
+ | **BLEU (F1)** | **93.39%** |
64
+ | **Edit Distance Similarity** | **90.56%** |
65
+
66
+ **Comparison with 270M baseline (Gemma-3-270m):**
67
+ - Exact Match: +42.60 percentage points
68
+ - BLEU: +5.75 percentage points
69
+ - Similarity: +9.36 percentage points
70
+ - **VRAM**: 5.86GB (less than 270M full precision!)
71
+
72
+ ## Training Details
73
+
74
+ ### Training Configuration
75
+ - **Learning Rate**: 2e-4 (higher for LoRA)
76
+ - **Epochs**: 7
77
+ - **Batch Size**: 1 per device
78
+ - **Gradient Accumulation**: 16 steps (effective batch size: 16)
79
+ - **Optimizer**: paged_adamw_8bit (memory-efficient)
80
+ - **LR Scheduler**: Cosine with 10% warmup
81
+ - **Precision**: BF16
82
+ - **LoRA Parameters**:
83
+ - Rank (r): 16
84
+ - Alpha: 32
85
+ - Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
86
+ - Dropout: 0.05
87
+
88
+ ### Training Results
89
+ - **Final Training Accuracy**: 94.45% (mean token accuracy)
90
+ - **Final Training Loss**: 0.198
91
+ - **Training Time**: ~3.5 hours on RTX 4070 SUPER (12GB)
92
+ - **Peak VRAM**: ~6-7GB during training
93
+
94
+ ### Data Augmentation Strategy
95
+
96
+ Training data includes controlled noise to improve robustness:
97
+ - **60% Clean**: Original high-quality verbalizations
98
+ - **20% Tier 1**: Semantic-preserving variations (whitespace, notation alternatives)
99
+ - **15% Tier 2**: Delimiter variations (unmatched braces, extra brackets)
100
+ - **5% Tier 2**: Structural variations (command typos, missing braces)
101
+
102
+ ## Usage
103
+
104
+ ### Installation
105
+
106
+ ```bash
107
+ pip install torch transformers peft accelerate bitsandbytes
108
+ ```
109
+
110
+ ### Inference
111
+
112
+ ```python
113
+ import torch
114
+ from peft import AutoPeftModelForCausalLM
115
+ from transformers import AutoTokenizer
116
+
117
+ # Load model with LoRA adapters
118
+ model = AutoPeftModelForCausalLM.from_pretrained(
119
+ "stefanj0/qwen2.5-3b-qlora-latex-fluentmath",
120
+ device_map="auto",
121
+ torch_dtype=torch.bfloat16,
122
+ )
123
+ tokenizer = AutoTokenizer.from_pretrained("stefanj0/qwen2.5-3b-qlora-latex-fluentmath")
124
+
125
+ def translate_latex(latex: str) -> str:
126
+ """Translate LaTeX to FluentMath."""
127
+ user_prompt = (
128
+ "Convert the following LaTeX mathematical expression to natural spoken English:\n\n"
129
+ f"LaTeX: {latex}\n\n"
130
+ "Spoken form:"
131
+ )
132
+
133
+ # Format as chat
134
+ prompt = tokenizer.apply_chat_template(
135
+ [{"role": "user", "content": user_prompt}],
136
+ tokenize=False,
137
+ add_generation_prompt=True
138
+ )
139
+
140
+ # Generate
141
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
142
+ with torch.no_grad():
143
+ outputs = model.generate(
144
+ **inputs,
145
+ max_new_tokens=256,
146
+ pad_token_id=tokenizer.eos_token_id,
147
+ )
148
+
149
+ # Parse output
150
+ generated = tokenizer.decode(outputs[0], skip_special_tokens=True)
151
+ if "Spoken form:" in generated:
152
+ verbalization = generated.split("Spoken form:")[-1].strip()
153
+ else:
154
+ verbalization = generated.strip()
155
+
156
+ # Remove role prefix if present
157
+ if verbalization.startswith("assistant\n"):
158
+ verbalization = verbalization[10:].strip()
159
+
160
+ return verbalization
161
+
162
+ # Example usage
163
+ latex = r"\int_a^b f'(x)\,dx = f(b) - f(a)"
164
+ translation = translate_latex(latex)
165
+ print(translation)
166
+ # Output: "the integral from eigh to b of, f prime, of x, d x, equals, f of b minus f of eigh"
167
+ ```
168
+
169
+ ## Example Translations
170
+
171
+ | LaTeX | FluentMath Output |
172
+ |-------|-------------------|
173
+ | `\frac{a}{b}` | a over b |
174
+ | `x^2 + y^2 = r^2` | x squared plus y squared equals r squared |
175
+ | `\int_a^b f'(x)\,dx = f(b) - f(a)` | the integral from eigh to b of, f prime, of x, d x, equals, f of b minus f of eigh |
176
+ | `P(A\|B) = \frac{P(B\|A)P(A)}{P(B)}` | P, the quantity Eigh divides B, equals, the fraction with numerator, P, the quantity B divides Eigh, P of Eigh, and denominator P of B |
177
+ | `\lim_{n\to\infty} \sum_{k=1}^{n} \frac{1}{n}` | the limit as n approaches infinity, of, sum from k equals 1 to n of, 1 over n |
178
+ | `A\vec{v} = \lambda\vec{v}` | Eigh, bold v, equals, lambda bold v |
179
+ | `i\hbar\frac{\partial}{\partial t}\Psi = \hat{H}\Psi` | i h bar, the fraction with numerator, partial derivative, and denominator partial derivative t, Psi, equals, H hat, Psi |
180
+
181
+ ## Use Cases
182
+
183
+ - **Text-to-Speech Systems**: Convert mathematical papers to audio
184
+ - **Accessibility**: Help visually impaired users access mathematical content
185
+ - **Education**: Generate natural language descriptions of mathematical expressions
186
+ - **Data Augmentation**: Create training data for math-aware language models
187
+ - **Documentation**: Auto-generate spoken descriptions for LaTeX in technical docs
188
+
189
+ ## Limitations
190
+
191
+ 1. **Letter Pronunciation**: Capital 'A' rendered as "Eigh" (from speech synthesis rules)
192
+ 2. **Vector Notation**: Vectors shown as "bold v" instead of "v with right arrow"
193
+ 3. **Custom Macros**: Does not support `\newcommand` or custom LaTeX macros
194
+ 4. **Long Expressions**: May truncate expressions longer than 256 tokens
195
+ 5. **Domain Coverage**: Trained primarily on academic mathematics; may struggle with domain-specific notation
196
+
197
+ ## Technical Details
198
+
199
+ ### Why QLoRA?
200
+
201
+ QLoRA (Quantized LoRA) enables training large models on consumer GPUs:
202
+ - **4-bit Quantization**: 75% memory reduction (stores weights in 4 bits vs 16)
203
+ - **LoRA Adapters**: Train only ~1% of parameters (64M trainable out of 2.93B total)
204
+ - **Quality**: Achieves 95-98% of full fine-tuning performance
205
+ - **Efficiency**: Trains 11x larger model (3B vs 270M) using LESS memory (5.86GB vs 6-7GB)
206
+
207
+ ### Architecture
208
+
209
+ - **Base**: Qwen2.5-3B-Instruct (decoder-only transformer)
210
+ - **Quantization**: 4-bit NormalFloat (NF4) with double quantization
211
+ - **LoRA Rank**: 16 (adapters inject low-rank updates into attention and MLP layers)
212
+ - **Target Modules**: All attention projections (Q, K, V, O) and MLP gates/projections
213
+
214
+ ### Training Pipeline
215
+
216
+ 1. **Data Extraction**: LaTeX expressions extracted from AutoMathText dataset
217
+ 2. **Verbalization**: Converted to speech using mathwords library (Rust/PyO3)
218
+ 3. **Evaluation**: Quality-checked with Qwen3-0.6B evaluator (93% accuracy)
219
+ 4. **Correction**: Post-processed to fix common failure patterns
220
+ 5. **Augmentation**: Noise added for robustness (10K samples total)
221
+ 6. **Fine-tuning**: 7 epochs with QLoRA on RTX 4070 SUPER (12GB)
222
+
223
+ ## Citation
224
+
225
+ If you use this model, please cite:
226
+
227
+ ```bibtex
228
+ @misc{qwen25-3b-qlora-latex-fluentmath,
229
+ author = {Stefan J.},
230
+ title = {Qwen2.5-3B QLoRA: LaTeX to FluentMath Translation},
231
+ year = {2025},
232
+ publisher = {HuggingFace},
233
+ url = {https://huggingface.co/stefanj0/qwen2.5-3b-qlora-latex-fluentmath}
234
+ }
235
+ ```
236
+
237
+ Also cite the base model:
238
+
239
+ ```bibtex
240
+ @article{qwen2.5,
241
+ title={Qwen2.5: A Party of Foundation Models},
242
+ author={Qwen Team},
243
+ year={2024},
244
+ journal={arXiv preprint arXiv:2412.xxxxx}
245
+ }
246
+ ```
247
+
248
+ ## Framework Versions
249
+
250
+ - PEFT: 0.18.0
251
+ - TRL: 0.26.2
252
+ - Transformers: 4.57.3
253
+ - PyTorch: 2.9.1
254
+ - Datasets: 4.4.2
255
+ - Tokenizers: 0.22.1
256
+
257
+ ## Acknowledgments
258
+
259
+ - **Base Model**: [Qwen/Qwen2.5-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-3B-Instruct) by Alibaba Cloud
260
+ - **Training Framework**: [Hugging Face Transformers](https://github.com/huggingface/transformers)
261
+ - **QLoRA Implementation**: [PEFT](https://github.com/huggingface/peft) + [bitsandbytes](https://github.com/TimDettmers/bitsandbytes)
262
+ - **Dataset**: [AutoMathText](https://huggingface.co/datasets/math-ai/AutoMathText) by Math-AI
263
+ - **Verbalization**: mathwords library (Rust/PyO3 wrapper for MathCAT)
264
+
265
+ ## Model Card Authors
266
+
267
+ Stefan J. (stefanj0)
268
+
269
+ ## Model Card Contact
270
+
271
+ For questions or issues, please open an issue on the model's discussion page.
adapter_config.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
+ "base_model_name_or_path": "Qwen/Qwen2.5-3B-Instruct",
7
+ "bias": "none",
8
+ "corda_config": null,
9
+ "ensure_weight_tying": false,
10
+ "eva_config": null,
11
+ "exclude_modules": null,
12
+ "fan_in_fan_out": false,
13
+ "inference_mode": true,
14
+ "init_lora_weights": true,
15
+ "layer_replication": null,
16
+ "layers_pattern": null,
17
+ "layers_to_transform": null,
18
+ "loftq_config": {},
19
+ "lora_alpha": 32,
20
+ "lora_bias": false,
21
+ "lora_dropout": 0.05,
22
+ "megatron_config": null,
23
+ "megatron_core": "megatron.core",
24
+ "modules_to_save": null,
25
+ "peft_type": "LORA",
26
+ "peft_version": "0.18.0",
27
+ "qalora_group_size": 16,
28
+ "r": 16,
29
+ "rank_pattern": {},
30
+ "revision": null,
31
+ "target_modules": [
32
+ "down_proj",
33
+ "q_proj",
34
+ "k_proj",
35
+ "o_proj",
36
+ "v_proj",
37
+ "gate_proj",
38
+ "up_proj"
39
+ ],
40
+ "target_parameters": null,
41
+ "task_type": "CAUSAL_LM",
42
+ "trainable_token_indices": null,
43
+ "use_dora": false,
44
+ "use_qalora": false,
45
+ "use_rslora": false
46
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b32e9185258e9d1bb278d69f012972f40a2fdde11724cf3a807bc943e00c34c5
3
+ size 119801528
added_tokens.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</tool_call>": 151658,
3
+ "<tool_call>": 151657,
4
+ "<|box_end|>": 151649,
5
+ "<|box_start|>": 151648,
6
+ "<|endoftext|>": 151643,
7
+ "<|file_sep|>": 151664,
8
+ "<|fim_middle|>": 151660,
9
+ "<|fim_pad|>": 151662,
10
+ "<|fim_prefix|>": 151659,
11
+ "<|fim_suffix|>": 151661,
12
+ "<|im_end|>": 151645,
13
+ "<|im_start|>": 151644,
14
+ "<|image_pad|>": 151655,
15
+ "<|object_ref_end|>": 151647,
16
+ "<|object_ref_start|>": 151646,
17
+ "<|quad_end|>": 151651,
18
+ "<|quad_start|>": 151650,
19
+ "<|repo_name|>": 151663,
20
+ "<|video_pad|>": 151656,
21
+ "<|vision_end|>": 151653,
22
+ "<|vision_pad|>": 151654,
23
+ "<|vision_start|>": 151652
24
+ }
chat_template.jinja ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0]['role'] == 'system' %}
4
+ {{- messages[0]['content'] }}
5
+ {%- else %}
6
+ {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
7
+ {%- endif %}
8
+ {{- "\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>" }}
9
+ {%- for tool in tools %}
10
+ {{- "\n" }}
11
+ {{- tool | tojson }}
12
+ {%- endfor %}
13
+ {{- "\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" }}
14
+ {%- else %}
15
+ {%- if messages[0]['role'] == 'system' %}
16
+ {{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
17
+ {%- else %}
18
+ {{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
19
+ {%- endif %}
20
+ {%- endif %}
21
+ {%- for message in messages %}
22
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
23
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
24
+ {%- elif message.role == "assistant" %}
25
+ {{- '<|im_start|>' + message.role }}
26
+ {%- if message.content %}
27
+ {{- '\n' + message.content }}
28
+ {%- endif %}
29
+ {%- for tool_call in message.tool_calls %}
30
+ {%- if tool_call.function is defined %}
31
+ {%- set tool_call = tool_call.function %}
32
+ {%- endif %}
33
+ {{- '\n<tool_call>\n{"name": "' }}
34
+ {{- tool_call.name }}
35
+ {{- '", "arguments": ' }}
36
+ {{- tool_call.arguments | tojson }}
37
+ {{- '}\n</tool_call>' }}
38
+ {%- endfor %}
39
+ {{- '<|im_end|>\n' }}
40
+ {%- elif message.role == "tool" %}
41
+ {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
42
+ {{- '<|im_start|>user' }}
43
+ {%- endif %}
44
+ {{- '\n<tool_response>\n' }}
45
+ {{- message.content }}
46
+ {{- '\n</tool_response>' }}
47
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
48
+ {{- '<|im_end|>\n' }}
49
+ {%- endif %}
50
+ {%- endif %}
51
+ {%- endfor %}
52
+ {%- if add_generation_prompt %}
53
+ {{- '<|im_start|>assistant\n' }}
54
+ {%- endif %}
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|endoftext|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa
3
+ size 11421896
tokenizer_config.json ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "151643": {
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "151644": {
14
+ "content": "<|im_start|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "151645": {
22
+ "content": "<|im_end|>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "151646": {
30
+ "content": "<|object_ref_start|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "151647": {
38
+ "content": "<|object_ref_end|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "151648": {
46
+ "content": "<|box_start|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "151649": {
54
+ "content": "<|box_end|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "151650": {
62
+ "content": "<|quad_start|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "151651": {
70
+ "content": "<|quad_end|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "151652": {
78
+ "content": "<|vision_start|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "151653": {
86
+ "content": "<|vision_end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "151654": {
94
+ "content": "<|vision_pad|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "151655": {
102
+ "content": "<|image_pad|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "151656": {
110
+ "content": "<|video_pad|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "151657": {
118
+ "content": "<tool_call>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": false
124
+ },
125
+ "151658": {
126
+ "content": "</tool_call>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": false
132
+ },
133
+ "151659": {
134
+ "content": "<|fim_prefix|>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": false
140
+ },
141
+ "151660": {
142
+ "content": "<|fim_middle|>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": false
148
+ },
149
+ "151661": {
150
+ "content": "<|fim_suffix|>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": false
156
+ },
157
+ "151662": {
158
+ "content": "<|fim_pad|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": false
164
+ },
165
+ "151663": {
166
+ "content": "<|repo_name|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": false
172
+ },
173
+ "151664": {
174
+ "content": "<|file_sep|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": false
180
+ }
181
+ },
182
+ "additional_special_tokens": [
183
+ "<|im_start|>",
184
+ "<|im_end|>",
185
+ "<|object_ref_start|>",
186
+ "<|object_ref_end|>",
187
+ "<|box_start|>",
188
+ "<|box_end|>",
189
+ "<|quad_start|>",
190
+ "<|quad_end|>",
191
+ "<|vision_start|>",
192
+ "<|vision_end|>",
193
+ "<|vision_pad|>",
194
+ "<|image_pad|>",
195
+ "<|video_pad|>"
196
+ ],
197
+ "bos_token": null,
198
+ "clean_up_tokenization_spaces": false,
199
+ "eos_token": "<|im_end|>",
200
+ "errors": "replace",
201
+ "extra_special_tokens": {},
202
+ "model_max_length": 131072,
203
+ "pad_token": "<|endoftext|>",
204
+ "split_special_tokens": false,
205
+ "tokenizer_class": "Qwen2Tokenizer",
206
+ "unk_token": null
207
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff