Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- LICENSE +88 -0
- README.md +65 -0
- acc_vs_latency_qwen-2.png +3 -0
- added_tokens.json +24 -0
- config.json +45 -0
- generation_config.json +6 -0
- merges.txt +0 -0
- model-00001-of-00004.safetensors +3 -0
- model-00002-of-00004.safetensors +3 -0
- model-00003-of-00004.safetensors +3 -0
- model-00004-of-00004.safetensors +3 -0
- model.safetensors.index.json +0 -0
- special_tokens_map.json +31 -0
- tokenizer_config.json +208 -0
- trainer_state.json +0 -0
- training_args.bin +3 -0
- vocab.json +0 -0
.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 |
+
acc_vs_latency_qwen-2.png filter=lfs diff=lfs merge=lfs -text
|
LICENSE
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Disclaimer: IMPORTANT: This Apple Machine Learning Research Model is
|
2 |
+
specifically developed and released by Apple Inc. ("Apple") for the sole purpose
|
3 |
+
of scientific research of artificial intelligence and machine-learning
|
4 |
+
technology. “Apple Machine Learning Research Model” means the model, including
|
5 |
+
but not limited to algorithms, formulas, trained model weights, parameters,
|
6 |
+
configurations, checkpoints, and any related materials (including
|
7 |
+
documentation).
|
8 |
+
|
9 |
+
This Apple Machine Learning Research Model is provided to You by
|
10 |
+
Apple in consideration of your agreement to the following terms, and your use,
|
11 |
+
modification, creation of Model Derivatives, and or redistribution of the Apple
|
12 |
+
Machine Learning Research Model constitutes acceptance of this Agreement. If You
|
13 |
+
do not agree with these terms, please do not use, modify, create Model
|
14 |
+
Derivatives of, or distribute this Apple Machine Learning Research Model or
|
15 |
+
Model Derivatives.
|
16 |
+
|
17 |
+
* License Scope: In consideration of your agreement to abide by the following
|
18 |
+
terms, and subject to these terms, Apple hereby grants you a personal,
|
19 |
+
non-exclusive, worldwide, non-transferable, royalty-free, revocable, and
|
20 |
+
limited license, to use, copy, modify, distribute, and create Model
|
21 |
+
Derivatives (defined below) of the Apple Machine Learning Research Model
|
22 |
+
exclusively for Research Purposes. You agree that any Model Derivatives You
|
23 |
+
may create or that may be created for You will be limited to Research Purposes
|
24 |
+
as well. “Research Purposes” means non-commercial scientific research and
|
25 |
+
academic development activities, such as experimentation, analysis, testing
|
26 |
+
conducted by You with the sole intent to advance scientific knowledge and
|
27 |
+
research. “Research Purposes” does not include any commercial exploitation,
|
28 |
+
product development or use in any commercial product or service.
|
29 |
+
|
30 |
+
* Distribution of Apple Machine Learning Research Model and Model Derivatives:
|
31 |
+
If you choose to redistribute Apple Machine Learning Research Model or its
|
32 |
+
Model Derivatives, you must provide a copy of this Agreement to such third
|
33 |
+
party, and ensure that the following attribution notice be provided: “Apple
|
34 |
+
Machine Learning Research Model is licensed under the Apple Machine Learning
|
35 |
+
Research Model License Agreement.” Additionally, all Model Derivatives must
|
36 |
+
clearly be identified as such, including disclosure of modifications and
|
37 |
+
changes made to the Apple Machine Learning Research Model. The name,
|
38 |
+
trademarks, service marks or logos of Apple may not be used to endorse or
|
39 |
+
promote Model Derivatives or the relationship between You and Apple. “Model
|
40 |
+
Derivatives” means any models or any other artifacts created by modifications,
|
41 |
+
improvements, adaptations, alterations to the architecture, algorithm or
|
42 |
+
training processes of the Apple Machine Learning Research Model, or by any
|
43 |
+
retraining, fine-tuning of the Apple Machine Learning Research Model.
|
44 |
+
|
45 |
+
* No Other License: Except as expressly stated in this notice, no other rights
|
46 |
+
or licenses, express or implied, are granted by Apple herein, including but
|
47 |
+
not limited to any patent, trademark, and similar intellectual property rights
|
48 |
+
worldwide that may be infringed by the Apple Machine Learning Research Model,
|
49 |
+
the Model Derivatives or by other works in which the Apple Machine Learning
|
50 |
+
Research Model may be incorporated.
|
51 |
+
|
52 |
+
* Compliance with Laws: Your use of Apple Machine Learning Research Model must
|
53 |
+
be in compliance with all applicable laws and regulations.
|
54 |
+
|
55 |
+
* Term and Termination: The term of this Agreement will begin upon your
|
56 |
+
acceptance of this Agreement or use of the Apple Machine Learning Research
|
57 |
+
Model and will continue until terminated in accordance with the following
|
58 |
+
terms. Apple may terminate this Agreement at any time if You are in breach of
|
59 |
+
any term or condition of this Agreement. Upon termination of this Agreement,
|
60 |
+
You must cease to use all Apple Machine Learning Research Models and Model
|
61 |
+
Derivatives and permanently delete any copy thereof. Sections 3, 6 and 7 will
|
62 |
+
survive termination.
|
63 |
+
|
64 |
+
* Disclaimer and Limitation of Liability: This Apple Machine Learning Research
|
65 |
+
Model and any outputs generated by the Apple Machine Learning Research Model
|
66 |
+
are provided on an “AS IS” basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
67 |
+
IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
|
68 |
+
NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
69 |
+
REGARDING THE APPLE MACHINE LEARNING RESEARCH MODEL OR OUTPUTS GENERATED BY
|
70 |
+
THE APPLE MACHINE LEARNING RESEARCH MODEL. You are solely responsible for
|
71 |
+
determining the appropriateness of using or redistributing the Apple Machine
|
72 |
+
Learning Research Model and any outputs of the Apple Machine Learning Research
|
73 |
+
Model and assume any risks associated with Your use of the Apple Machine
|
74 |
+
Learning Research Model and any output and results. IN NO EVENT SHALL APPLE BE
|
75 |
+
LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
76 |
+
IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF
|
77 |
+
THE APPLE MACHINE LEARNING RESEARCH MODEL AND ANY OUTPUTS OF THE APPLE MACHINE
|
78 |
+
LEARNING RESEARCH MODEL, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT,
|
79 |
+
TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS
|
80 |
+
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
81 |
+
|
82 |
+
* Governing Law: This Agreement will be governed by and construed under the laws
|
83 |
+
of the State of California without regard to its choice of law principles. The
|
84 |
+
Convention on Contracts for the International Sale of Goods shall not apply to
|
85 |
+
the Agreement except that the arbitration clause and any arbitration hereunder
|
86 |
+
shall be governed by the Federal Arbitration Act, Chapters 1 and 2.
|
87 |
+
|
88 |
+
Copyright (C) 2025 Apple Inc. All Rights Reserved.
|
README.md
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apple-amlr
|
3 |
+
license_name: apple-ascl
|
4 |
+
license_link: https://github.com/apple/ml-fastvlm/blob/main/LICENSE_MODEL
|
5 |
+
library_name: ml-fastvlm
|
6 |
+
---
|
7 |
+
# FastVLM: Efficient Vision Encoding for Vision Language Models
|
8 |
+
|
9 |
+
FastVLM was introduced in
|
10 |
+
**[FastVLM: Efficient Vision Encoding for Vision Language Models](https://www.arxiv.org/abs/2412.13303). (CVPR 2025)**
|
11 |
+
|
12 |
+
[//]: # ()
|
13 |
+
<p align="center">
|
14 |
+
<img src="acc_vs_latency_qwen-2.png" alt="Accuracy vs latency figure." width="400"/>
|
15 |
+
</p>
|
16 |
+
|
17 |
+
### Highlights
|
18 |
+
* We introduce FastViTHD, a novel hybrid vision encoder designed to output fewer tokens and significantly reduce encoding time for high-resolution images.
|
19 |
+
* Our smallest variant outperforms LLaVA-OneVision-0.5B with 85x faster Time-to-First-Token (TTFT) and 3.4x smaller vision encoder.
|
20 |
+
* Our larger variants using Qwen2-7B LLM outperform recent works like Cambrian-1-8B while using a single image encoder with a 7.9x faster TTFT.
|
21 |
+
|
22 |
+
|
23 |
+
### Evaluations
|
24 |
+
| Benchmark | FastVLM-0.5B | FastVLM-1.5B | FastVLM-7B |
|
25 |
+
|:--------------|:------------:|:------------:|:----------:|
|
26 |
+
| Ai2D | 68.0 | 77.4 | 83.6 |
|
27 |
+
| ScienceQA | 85.2 | 94.4 | 96.7 |
|
28 |
+
| MMMU | 33.9 | 37.8 | 45.4 |
|
29 |
+
| VQAv2 | 76.3 | 79.1 | 80.8 |
|
30 |
+
| ChartQA | 76.0 | 80.1 | 85.0 |
|
31 |
+
| TextVQA | 64.5 | 70.4 | 74.9 |
|
32 |
+
| InfoVQA | 46.4 | 59.7 | 75.8 |
|
33 |
+
| DocVQA | 82.5 | 88.3 | 93.2 |
|
34 |
+
| OCRBench | 63.9 | 70.2 | 73.1 |
|
35 |
+
| RealWorldQA | 56.1 | 61.2 | 67.2 |
|
36 |
+
| SeedBench-Img | 71.0 | 74.2 | 75.4 |
|
37 |
+
|
38 |
+
|
39 |
+
### Usage Example
|
40 |
+
To run inference of PyTorch checkpoint, follow the instruction in the official repo:
|
41 |
+
|
42 |
+
Download the model
|
43 |
+
```
|
44 |
+
huggingface-cli download apple/FastVLM-7B
|
45 |
+
```
|
46 |
+
|
47 |
+
Run inference using `predict.py` from the official repo.
|
48 |
+
```bash
|
49 |
+
python predict.py --model-path /path/to/checkpoint-dir \
|
50 |
+
--image-file /path/to/image.png \
|
51 |
+
--prompt "Describe the image."
|
52 |
+
```
|
53 |
+
|
54 |
+
|
55 |
+
## Citation
|
56 |
+
If you found this model useful, please cite the following paper:
|
57 |
+
```
|
58 |
+
@InProceedings{fastvlm2025,
|
59 |
+
author = {Pavan Kumar Anasosalu Vasu, Fartash Faghri, Chun-Liang Li, Cem Koc, Nate True, Albert Antony, Gokul Santhanam, James Gabriel, Peter Grasch, Oncel Tuzel, Hadi Pouransari},
|
60 |
+
title = {FastVLM: Efficient Vision Encoding for Vision Language Models},
|
61 |
+
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
|
62 |
+
month = {June},
|
63 |
+
year = {2025},
|
64 |
+
}
|
65 |
+
```
|
acc_vs_latency_qwen-2.png
ADDED
![]() |
Git LFS Details
|
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 |
+
}
|
config.json
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "./llava-v1.5-13b",
|
3 |
+
"architectures": [
|
4 |
+
"LlavaQwen2ForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"bos_token_id": 151643,
|
8 |
+
"eos_token_id": 151645,
|
9 |
+
"freeze_mm_mlp_adapter": false,
|
10 |
+
"hidden_act": "silu",
|
11 |
+
"hidden_size": 3584,
|
12 |
+
"image_aspect_ratio": "pad",
|
13 |
+
"image_grid_pinpoints": null,
|
14 |
+
"initializer_range": 0.02,
|
15 |
+
"intermediate_size": 18944,
|
16 |
+
"max_position_embeddings": 32768,
|
17 |
+
"max_window_layers": 28,
|
18 |
+
"mm_hidden_size": 3072,
|
19 |
+
"mm_patch_merge_type": "flat",
|
20 |
+
"mm_projector_lr": null,
|
21 |
+
"mm_projector_type": "mlp2x_gelu",
|
22 |
+
"mm_use_im_patch_token": false,
|
23 |
+
"mm_use_im_start_end": false,
|
24 |
+
"mm_vision_select_feature": "patch",
|
25 |
+
"mm_vision_select_layer": -2,
|
26 |
+
"mm_vision_tower": "mobileclip_l_1024",
|
27 |
+
"model_type": "llava_qwen2",
|
28 |
+
"num_attention_heads": 28,
|
29 |
+
"num_hidden_layers": 28,
|
30 |
+
"num_key_value_heads": 4,
|
31 |
+
"rms_norm_eps": 1e-06,
|
32 |
+
"rope_theta": 1000000.0,
|
33 |
+
"sliding_window": 131072,
|
34 |
+
"tie_word_embeddings": false,
|
35 |
+
"tokenizer_model_max_length": 8192,
|
36 |
+
"tokenizer_padding_side": "right",
|
37 |
+
"torch_dtype": "bfloat16",
|
38 |
+
"transformers_version": "4.39.3",
|
39 |
+
"tune_mm_mlp_adapter": false,
|
40 |
+
"unfreeze_mm_vision_tower": true,
|
41 |
+
"use_cache": true,
|
42 |
+
"use_mm_proj": true,
|
43 |
+
"use_sliding_window": false,
|
44 |
+
"vocab_size": 152064
|
45 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_sample": true,
|
3 |
+
"temperature": null,
|
4 |
+
"top_p": null,
|
5 |
+
"transformers_version": "4.39.3"
|
6 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model-00001-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:03ebae131ce93a4fe6374b7fe3e263ba49abaf3267d6105c48a99fa78e6438c9
|
3 |
+
size 4877660776
|
model-00002-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1e8c535dd0a7ac9fe648208272ca1d0868d0daac9a0db5e266304e69465a5852
|
3 |
+
size 4932751008
|
model-00003-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6921a6c518d3aee8389c81e68c1a6e2e0858868d14596c1dc4549fe8d1472c0d
|
3 |
+
size 4628901248
|
model-00004-of-00004.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:937f06211b518a9766253b254cb6c00c8dd249ccb4868d301117e1f48c4af042
|
3 |
+
size 1089994880
|
model.safetensors.index.json
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_config.json
ADDED
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\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 Qwen, created by Alibaba Cloud. You are a helpful assistant.<|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",
|
199 |
+
"clean_up_tokenization_spaces": false,
|
200 |
+
"eos_token": "<|im_end|>",
|
201 |
+
"errors": "replace",
|
202 |
+
"model_max_length": 8192,
|
203 |
+
"pad_token": "<|endoftext|>",
|
204 |
+
"padding_side": "right",
|
205 |
+
"split_special_tokens": false,
|
206 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
207 |
+
"unk_token": null
|
208 |
+
}
|
trainer_state.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2f8b8e614328387112b4f730cb632baf75812b6bde9137b83718752ecb690232
|
3 |
+
size 6584
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|