kimyoungjune
commited on
Upload 20 files
Browse files- .gitattributes +1 -0
- LICENSE.txt +178 -0
- README.md +221 -0
- added_tokens.json +34 -0
- assets/grounding.png +0 -0
- assets/ocr_1.png +3 -0
- assets/ocr_2.jpg +0 -0
- config.json +198 -0
- generation_config.json +15 -0
- model-00001-of-00007.safetensors +3 -0
- model-00002-of-00007.safetensors +3 -0
- model-00003-of-00007.safetensors +3 -0
- model-00004-of-00007.safetensors +3 -0
- model-00005-of-00007.safetensors +3 -0
- model-00006-of-00007.safetensors +3 -0
- model-00007-of-00007.safetensors +3 -0
- model.safetensors.index.json +0 -0
- special_tokens_map.json +28 -0
- tokenizer.json +0 -0
- tokenizer_config.json +280 -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 |
+
assets/ocr_1.png filter=lfs diff=lfs merge=lfs -text
|
LICENSE.txt
ADDED
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
Creative Commons Attribution Non Commercial 4.0 International
|
3 |
+
|
4 |
+
|
5 |
+
Creative Commons Attribution-NonCommercial 4.0 International
|
6 |
+
|
7 |
+
Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
|
8 |
+
|
9 |
+
Using Creative Commons Public Licenses
|
10 |
+
|
11 |
+
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
|
12 |
+
|
13 |
+
Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors.
|
14 |
+
|
15 |
+
Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public.
|
16 |
+
|
17 |
+
Creative Commons Attribution-NonCommercial 4.0 International Public License
|
18 |
+
|
19 |
+
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
20 |
+
|
21 |
+
Section 1 – Definitions.
|
22 |
+
|
23 |
+
a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
|
24 |
+
|
25 |
+
b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
|
26 |
+
|
27 |
+
c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
28 |
+
|
29 |
+
d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
|
30 |
+
|
31 |
+
e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
|
32 |
+
|
33 |
+
f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
|
34 |
+
|
35 |
+
g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
|
36 |
+
|
37 |
+
h. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
|
38 |
+
|
39 |
+
i. NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
|
40 |
+
|
41 |
+
j. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
|
42 |
+
|
43 |
+
k. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
|
44 |
+
|
45 |
+
l. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
|
46 |
+
|
47 |
+
Section 2 – Scope.
|
48 |
+
|
49 |
+
a. License grant.
|
50 |
+
|
51 |
+
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
|
52 |
+
|
53 |
+
A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
|
54 |
+
|
55 |
+
B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
|
56 |
+
|
57 |
+
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
|
58 |
+
|
59 |
+
3. Term. The term of this Public License is specified in Section 6(a).
|
60 |
+
|
61 |
+
4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
|
62 |
+
|
63 |
+
5. Downstream recipients.
|
64 |
+
|
65 |
+
A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
|
66 |
+
|
67 |
+
B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
|
68 |
+
|
69 |
+
6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
|
70 |
+
|
71 |
+
b. Other rights.
|
72 |
+
|
73 |
+
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
|
74 |
+
|
75 |
+
2. Patent and trademark rights are not licensed under this Public License.
|
76 |
+
|
77 |
+
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes.
|
78 |
+
|
79 |
+
Section 3 – License Conditions.
|
80 |
+
|
81 |
+
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
|
82 |
+
|
83 |
+
a. Attribution.
|
84 |
+
|
85 |
+
1. If You Share the Licensed Material (including in modified form), You must:
|
86 |
+
|
87 |
+
A. retain the following if it is supplied by the Licensor with the Licensed Material:
|
88 |
+
|
89 |
+
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
|
90 |
+
|
91 |
+
ii. a copyright notice;
|
92 |
+
|
93 |
+
iii. a notice that refers to this Public License;
|
94 |
+
|
95 |
+
iv. a notice that refers to the disclaimer of warranties;
|
96 |
+
|
97 |
+
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
98 |
+
|
99 |
+
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
|
100 |
+
|
101 |
+
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
|
102 |
+
|
103 |
+
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
|
104 |
+
|
105 |
+
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
106 |
+
|
107 |
+
4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
|
108 |
+
|
109 |
+
Section 4 – Sui Generis Database Rights.
|
110 |
+
|
111 |
+
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
|
112 |
+
|
113 |
+
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
|
114 |
+
|
115 |
+
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
|
116 |
+
|
117 |
+
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
|
118 |
+
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
|
119 |
+
|
120 |
+
Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
121 |
+
|
122 |
+
a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
|
123 |
+
|
124 |
+
b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
|
125 |
+
|
126 |
+
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
|
127 |
+
|
128 |
+
Section 6 – Term and Termination.
|
129 |
+
|
130 |
+
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
|
131 |
+
|
132 |
+
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
|
133 |
+
|
134 |
+
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
|
135 |
+
|
136 |
+
2. upon express reinstatement by the Licensor.
|
137 |
+
|
138 |
+
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
|
139 |
+
|
140 |
+
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
|
141 |
+
|
142 |
+
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
143 |
+
|
144 |
+
Section 7 – Other Terms and Conditions.
|
145 |
+
|
146 |
+
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
|
147 |
+
|
148 |
+
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
|
149 |
+
|
150 |
+
Section 8 – Interpretation.
|
151 |
+
|
152 |
+
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
|
153 |
+
|
154 |
+
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
|
155 |
+
|
156 |
+
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
|
157 |
+
|
158 |
+
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
|
159 |
+
|
160 |
+
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
|
161 |
+
|
162 |
+
Creative Commons may be contacted at creativecommons.org.
|
163 |
+
|
164 |
+
|
165 |
+
Any questions about our licensed work can be sent to opensource@ncsoft.com.
|
166 |
+
|
167 |
+
This software uses Open Source Software (OSS). You can find the link for the source code of these open source projects, along with applicable license information, below.
|
168 |
+
|
169 |
+
|
170 |
+
Qwen2.5
|
171 |
+
https://huggingface.co/Qwen/Qwen2.5-14B-Instruct
|
172 |
+
Copyright 2024 Alibaba Cloud
|
173 |
+
Apache License 2.0
|
174 |
+
|
175 |
+
SigLIP (shape-optimized model)
|
176 |
+
https://huggingface.co/google/siglip-so400m-patch14-384
|
177 |
+
Apache License 2.0
|
178 |
+
|
README.md
CHANGED
@@ -1,3 +1,224 @@
|
|
1 |
---
|
|
|
|
|
|
|
2 |
license: cc-by-nc-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
- ko
|
5 |
license: cc-by-nc-4.0
|
6 |
+
tags:
|
7 |
+
- multimodal
|
8 |
+
- conversational
|
9 |
+
- ncsoft
|
10 |
+
- varco
|
11 |
+
base_model:
|
12 |
+
- Qwen/Qwen2.5-14B-Instruct
|
13 |
+
- google/siglip-so400m-patch14-384
|
14 |
+
library_name: transformers
|
15 |
---
|
16 |
+
|
17 |
+
# VARCO-VISION-14B
|
18 |
+
|
19 |
+
## About the Model
|
20 |
+
|
21 |
+
**VARCO-VISION-14B** is a powerful English-Korean Vision-Language Model (VLM) developed through four distinct training phases, culminating in a final preference optimization stage. Designed to excel in both multimodal and text-only tasks, VARCO-VISION-14B not only surpasses other models of similar size in performance but also achieves scores comparable to those of proprietary models. The model currently accepts a single image and accompanying text as input, generating text as output. It supports grounding—the ability to identify the locations of objects within an image—as well as OCR (Optical Character Recognition) to recognize text within images.
|
22 |
+
|
23 |
+
- **Developed by:** NC Research, Multimodal Generation Team
|
24 |
+
- **Technical Report:** [Coming Soon]()
|
25 |
+
- **Languages:** Korean, English
|
26 |
+
- **License:** CC BY-NC 4.0
|
27 |
+
- **Architecture:** VARCO-VISION-14B follows the architecture of [LLaVA-OneVision](https://arxiv.org/abs/2408.03326).
|
28 |
+
- **Base Model:**
|
29 |
+
- **Language Model:** [Qwen/Qwen2.5-14B-Instruct](https://huggingface.co/Qwen/Qwen2.5-14B-Instruct)
|
30 |
+
- **Vision Encoder:** [google/siglip-so400m-patch14-384](https://huggingface.co/google/siglip-so400m-patch14-384)
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
## Uses
|
35 |
+
|
36 |
+
### Direct Use
|
37 |
+
|
38 |
+
To load VARCO-VISION-14B, start by cloning and installing **LLaVA-NeXT**:
|
39 |
+
|
40 |
+
```bash
|
41 |
+
git clone https://github.com/LLaVA-VL/LLaVA-NeXT
|
42 |
+
cd LLaVA-NeXT
|
43 |
+
pip install -e ".[train]"
|
44 |
+
```
|
45 |
+
|
46 |
+
After installing **LLaVA-NeXT**, you can load VARCO-VISION-14B using the following code:
|
47 |
+
|
48 |
+
```python
|
49 |
+
import torch
|
50 |
+
from transformers import AutoTokenizer
|
51 |
+
from llava.model.language_model.llava_qwen import LlavaQwenForCausalLM
|
52 |
+
from llava.conversation import apply_chat_template
|
53 |
+
from llava.mm_utils import tokenizer_image_token, process_images
|
54 |
+
|
55 |
+
model_name = "NCSOFT/VARCO-VISION-14B"
|
56 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
57 |
+
model = LlavaQwenForCausalLM.from_pretrained(
|
58 |
+
model_name,
|
59 |
+
torch_dtype=torch.float16,
|
60 |
+
attn_implementation="flash_attention_2",
|
61 |
+
low_cpu_mem_usage=True,
|
62 |
+
device_map="auto"
|
63 |
+
)
|
64 |
+
|
65 |
+
vision_tower = model.get_vision_tower()
|
66 |
+
image_processor = vision_tower.image_processor
|
67 |
+
```
|
68 |
+
|
69 |
+
Prepare the image and text input by preprocessing the image and tokenizing the text. Pass the processed inputs to the model to generate predictions.
|
70 |
+
|
71 |
+
```python
|
72 |
+
import requests
|
73 |
+
from PIL import Image
|
74 |
+
|
75 |
+
# Define a chat history and use `apply_chat_template` to get correctly formatted prompt
|
76 |
+
# Each value in "content" has to be a list of dicts with types ("text", "image")
|
77 |
+
conversation = [
|
78 |
+
{
|
79 |
+
"role": "user",
|
80 |
+
"content": [
|
81 |
+
{"type": "text", "text": "Describe this image."},
|
82 |
+
{"type": "image"},
|
83 |
+
],
|
84 |
+
},
|
85 |
+
]
|
86 |
+
prompt = tokenizer.apply_chat_template(conversation, add_generation_prompt=True, tokenize=False)
|
87 |
+
|
88 |
+
IMAGE_TOKEN_INDEX = -200
|
89 |
+
EOS_TOKEN = "<|im_end|>"
|
90 |
+
input_ids = tokenizer_image_token(prompt, tokenizer, IMAGE_TOKEN_INDEX, return_tensors="pt")
|
91 |
+
input_ids = input_ids.unsqueeze(0).to(model.device)
|
92 |
+
|
93 |
+
image_url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
94 |
+
raw_image = Image.open(requests.get(image_url, stream=True).raw)
|
95 |
+
image_tensors = process_images([raw_image], image_processor, model.config)
|
96 |
+
image_tensors = [image_tensor.half().to(model.device) for image_tensor in image_tensors]
|
97 |
+
image_sizes = [raw_image.size]
|
98 |
+
|
99 |
+
with torch.inference_mode():
|
100 |
+
output_ids = model.generate(
|
101 |
+
input_ids,
|
102 |
+
images=image_tensors,
|
103 |
+
image_sizes=image_sizes,
|
104 |
+
do_sample=False,
|
105 |
+
max_new_tokens=1024,
|
106 |
+
use_cache=True,
|
107 |
+
)
|
108 |
+
|
109 |
+
outputs = tokenizer.batch_decode(output_ids)[0]
|
110 |
+
if outputs.endswith(EOS_TOKEN):
|
111 |
+
outputs = outputs[: -len(EOS_TOKEN)]
|
112 |
+
|
113 |
+
outputs = outputs.strip()
|
114 |
+
print(outputs)
|
115 |
+
```
|
116 |
+
|
117 |
+
### Specialized Features
|
118 |
+
|
119 |
+
To receive questions or answers based on bounding boxes (e.g., grounding, referring, OCR tasks), include special tokens in the input text.
|
120 |
+
|
121 |
+
The following special tokens are used to define specific tasks, inputs and outputs for the model:
|
122 |
+
|
123 |
+
- `<gro>`: Indicates that the model's response should include bounding box information.
|
124 |
+
- `<ocr>`: Specifies OCR tasks for recognizing text within an image.
|
125 |
+
- `<char>` and `</char>`: Used to mark a text phrase.
|
126 |
+
- `<obj>` and `</obj>`: Used to indicate an object.
|
127 |
+
- `<bbox>` and `</bbox>`: Used to represent a bounding box.
|
128 |
+
- `<delim>`: Represents multiple location points for a single object or text.
|
129 |
+
|
130 |
+
#### Grounding
|
131 |
+
|
132 |
+
Grounding refers to the task where the model identifies specific locations within an image to provide an answer. To perform grounding, prepend the special token `<gro>` to the question.
|
133 |
+
|
134 |
+
```python
|
135 |
+
conversation = [
|
136 |
+
{
|
137 |
+
"role": "user",
|
138 |
+
"content": [
|
139 |
+
{"type": "text", "text": "<gro>\nDescribe the image in detail."},
|
140 |
+
{"type": "image"},
|
141 |
+
],
|
142 |
+
},
|
143 |
+
]
|
144 |
+
```
|
145 |
+
|
146 |
+
**Expected Output Example:**
|
147 |
+
```html
|
148 |
+
The image shows <obj>two cats</obj><bbox>0.521, 0.049, 0.997, 0.783<delim>0.016, 0.108, 0.512, 0.99</bbox> lying on <obj>a pink blanket</obj><bbox>0.002, 0.231, 0.999, 0.999</bbox>. The cat on the left is lying on its side with its head resting on the blanket and its body stretched out. The cat on the right is lying on its back with its paws stretched out and its head turned to the side. Both cats appear relaxed and comfortable. There are also <obj>two remote controls</obj><bbox>0.039, 0.138, 0.283, 0.257<delim>0.508, 0.166, 0.581, 0.295</bbox> placed near the cats, one on each side of them.
|
149 |
+
```
|
150 |
+
|
151 |
+
<img src="assets/grounding.png" alt="Grounding Example" width="400"/>
|
152 |
+
|
153 |
+
#### Referring
|
154 |
+
|
155 |
+
VARCO-VISION-14B can handle location-specific questions using bounding boxes. To perform referring tasks, structure the conversation by including the object of interest within `<obj>` and `</obj>` tags and specifying its location with `<bbox>` and `</bbox>` tags. This allows the model to understand the context and focus on the object at the specified location.
|
156 |
+
|
157 |
+
```python
|
158 |
+
conversation = [
|
159 |
+
{
|
160 |
+
"role": "user",
|
161 |
+
"content": [
|
162 |
+
{
|
163 |
+
"type": "text",
|
164 |
+
"text": "<obj>이 물건</obj><bbox>0.039, 0.138, 0.283, 0.257</bbox>은 어떻게 쓰는거야?",
|
165 |
+
},
|
166 |
+
{"type": "image"},
|
167 |
+
],
|
168 |
+
},
|
169 |
+
]
|
170 |
+
```
|
171 |
+
|
172 |
+
**Expected Output Example:**
|
173 |
+
```
|
174 |
+
**이 물건**은 리모컨으로, 주로 텔레비전이나 다른 전자 기기를 원격으로 조작하는 데 사용됩니다. 버튼을 누르면 채널 변경, 볼륨 조절, 전원 켜기/끄기 등의 기능을 수행할 수 있습니다. 리모컨의 버튼에는 일반적으로 숫자, 메뉴, 설정, 재생/일시정지 등의 기능이 포함되어 있으며, 사용자는 이를 통해 손쉽게 기기를 제어할 수 있습니다.
|
175 |
+
```
|
176 |
+
|
177 |
+
#### OCR
|
178 |
+
|
179 |
+
To perform Optical Character Recognition (OCR), use the `<ocr>` token.
|
180 |
+
|
181 |
+
```python
|
182 |
+
image_file = "./assets/ocr_1.png"
|
183 |
+
|
184 |
+
conversation = [
|
185 |
+
{
|
186 |
+
"role": "user",
|
187 |
+
"content": [
|
188 |
+
{"type": "text", "text": "<ocr>"},
|
189 |
+
{"type": "image"},
|
190 |
+
],
|
191 |
+
},
|
192 |
+
]
|
193 |
+
```
|
194 |
+
|
195 |
+
**Expected Output Example:**
|
196 |
+
|
197 |
+
```
|
198 |
+
<char>백범로</char><bbox>0.172, 0.265, 0.328, 0.34</bbox>
|
199 |
+
<char>124번길</char><bbox>0.349, 0.265, 0.512, 0.34</bbox>
|
200 |
+
<char>Baekbeom-ro</char><bbox>0.171, 0.335, 0.432, 0.391</bbox>
|
201 |
+
<char>124</char><bbox>0.444, 0.34, 0.508, 0.391</bbox>
|
202 |
+
<char>만수주공아파트</char><bbox>0.109, 0.528, 0.335, 0.594</bbox>
|
203 |
+
<char>시흥</char><bbox>0.443, 0.516, 0.522, 0.578</bbox>
|
204 |
+
<char>시청</char><bbox>0.711, 0.521, 0.811, 0.594</bbox>
|
205 |
+
<char>Mansu</char><bbox>0.103, 0.601, 0.181, 0.647</bbox>
|
206 |
+
<char>Jugong</char><bbox>0.186, 0.601, 0.273, 0.658</bbox>
|
207 |
+
<char>Apt</char><bbox>0.281, 0.601, 0.327, 0.651</bbox>
|
208 |
+
<char>42</char><bbox>0.377, 0.601, 0.416, 0.647</bbox>
|
209 |
+
<char>Shieung</char><bbox>0.445, 0.578, 0.53, 0.623</bbox>
|
210 |
+
<char>인천대공원</char><bbox>0.431, 0.623, 0.609, 0.684</bbox>
|
211 |
+
<char>모래내시장역</char><bbox>0.651, 0.591, 0.873, 0.664</bbox>
|
212 |
+
<char>IncheonGrand</char><bbox>0.433, 0.684, 0.561, 0.723</bbox>
|
213 |
+
<char>Park</char><bbox>0.564, 0.684, 0.611, 0.723</bbox>
|
214 |
+
```
|
215 |
+
|
216 |
+
<img src="assets/ocr_2.jpg" alt="OCR Example" width="350"/>
|
217 |
+
|
218 |
+
## Citing the Model
|
219 |
+
|
220 |
+
(*bibtex will be updated soon..*) If you use VARCO-VISION-14B in your research, please cite the following:
|
221 |
+
|
222 |
+
```bibtex
|
223 |
+
|
224 |
+
```
|
added_tokens.json
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"</bbox>": 151673,
|
3 |
+
"</char>": 151669,
|
4 |
+
"</obj>": 151671,
|
5 |
+
"</tool_call>": 151658,
|
6 |
+
"<bbox>": 151672,
|
7 |
+
"<char>": 151668,
|
8 |
+
"<delim>": 151674,
|
9 |
+
"<gro>": 151666,
|
10 |
+
"<obj>": 151670,
|
11 |
+
"<ocr>": 151667,
|
12 |
+
"<tool_call>": 151657,
|
13 |
+
"<|box_end|>": 151649,
|
14 |
+
"<|box_start|>": 151648,
|
15 |
+
"<|endoftext|>": 151643,
|
16 |
+
"<|file_sep|>": 151664,
|
17 |
+
"<|fim_middle|>": 151660,
|
18 |
+
"<|fim_pad|>": 151662,
|
19 |
+
"<|fim_prefix|>": 151659,
|
20 |
+
"<|fim_suffix|>": 151661,
|
21 |
+
"<|im_end|>": 151645,
|
22 |
+
"<|im_start|>": 151644,
|
23 |
+
"<|image_pad|>": 151655,
|
24 |
+
"<|object_ref_end|>": 151647,
|
25 |
+
"<|object_ref_start|>": 151646,
|
26 |
+
"<|quad_end|>": 151651,
|
27 |
+
"<|quad_start|>": 151650,
|
28 |
+
"<|repo_name|>": 151663,
|
29 |
+
"<|video_pad|>": 151656,
|
30 |
+
"<|vision_end|>": 151653,
|
31 |
+
"<|vision_pad|>": 151654,
|
32 |
+
"<|vision_start|>": 151652,
|
33 |
+
"[UNK]": 151665
|
34 |
+
}
|
assets/grounding.png
ADDED
assets/ocr_1.png
ADDED
Git LFS Details
|
assets/ocr_2.jpg
ADDED
config.json
ADDED
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "NCSOFT/VARCO-VISION-14B",
|
3 |
+
"architectures": [
|
4 |
+
"LlavaQwenForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"bos_token_id": 151643,
|
8 |
+
"eos_token_id": 151645,
|
9 |
+
"hidden_act": "silu",
|
10 |
+
"hidden_size": 5120,
|
11 |
+
"image_aspect_ratio": "anyres_max_9",
|
12 |
+
"image_crop_resolution": null,
|
13 |
+
"image_grid_pinpoints": [
|
14 |
+
[
|
15 |
+
384,
|
16 |
+
384
|
17 |
+
],
|
18 |
+
[
|
19 |
+
384,
|
20 |
+
768
|
21 |
+
],
|
22 |
+
[
|
23 |
+
384,
|
24 |
+
1152
|
25 |
+
],
|
26 |
+
[
|
27 |
+
384,
|
28 |
+
1536
|
29 |
+
],
|
30 |
+
[
|
31 |
+
384,
|
32 |
+
1920
|
33 |
+
],
|
34 |
+
[
|
35 |
+
384,
|
36 |
+
2304
|
37 |
+
],
|
38 |
+
[
|
39 |
+
768,
|
40 |
+
384
|
41 |
+
],
|
42 |
+
[
|
43 |
+
768,
|
44 |
+
768
|
45 |
+
],
|
46 |
+
[
|
47 |
+
768,
|
48 |
+
1152
|
49 |
+
],
|
50 |
+
[
|
51 |
+
768,
|
52 |
+
1536
|
53 |
+
],
|
54 |
+
[
|
55 |
+
768,
|
56 |
+
1920
|
57 |
+
],
|
58 |
+
[
|
59 |
+
768,
|
60 |
+
2304
|
61 |
+
],
|
62 |
+
[
|
63 |
+
1152,
|
64 |
+
384
|
65 |
+
],
|
66 |
+
[
|
67 |
+
1152,
|
68 |
+
768
|
69 |
+
],
|
70 |
+
[
|
71 |
+
1152,
|
72 |
+
1152
|
73 |
+
],
|
74 |
+
[
|
75 |
+
1152,
|
76 |
+
1536
|
77 |
+
],
|
78 |
+
[
|
79 |
+
1152,
|
80 |
+
1920
|
81 |
+
],
|
82 |
+
[
|
83 |
+
1152,
|
84 |
+
2304
|
85 |
+
],
|
86 |
+
[
|
87 |
+
1536,
|
88 |
+
384
|
89 |
+
],
|
90 |
+
[
|
91 |
+
1536,
|
92 |
+
768
|
93 |
+
],
|
94 |
+
[
|
95 |
+
1536,
|
96 |
+
1152
|
97 |
+
],
|
98 |
+
[
|
99 |
+
1536,
|
100 |
+
1536
|
101 |
+
],
|
102 |
+
[
|
103 |
+
1536,
|
104 |
+
1920
|
105 |
+
],
|
106 |
+
[
|
107 |
+
1536,
|
108 |
+
2304
|
109 |
+
],
|
110 |
+
[
|
111 |
+
1920,
|
112 |
+
384
|
113 |
+
],
|
114 |
+
[
|
115 |
+
1920,
|
116 |
+
768
|
117 |
+
],
|
118 |
+
[
|
119 |
+
1920,
|
120 |
+
1152
|
121 |
+
],
|
122 |
+
[
|
123 |
+
1920,
|
124 |
+
1536
|
125 |
+
],
|
126 |
+
[
|
127 |
+
1920,
|
128 |
+
1920
|
129 |
+
],
|
130 |
+
[
|
131 |
+
1920,
|
132 |
+
2304
|
133 |
+
],
|
134 |
+
[
|
135 |
+
2304,
|
136 |
+
384
|
137 |
+
],
|
138 |
+
[
|
139 |
+
2304,
|
140 |
+
768
|
141 |
+
],
|
142 |
+
[
|
143 |
+
2304,
|
144 |
+
1152
|
145 |
+
],
|
146 |
+
[
|
147 |
+
2304,
|
148 |
+
1536
|
149 |
+
],
|
150 |
+
[
|
151 |
+
2304,
|
152 |
+
1920
|
153 |
+
],
|
154 |
+
[
|
155 |
+
2304,
|
156 |
+
2304
|
157 |
+
]
|
158 |
+
],
|
159 |
+
"image_split_resolution": null,
|
160 |
+
"initializer_range": 0.02,
|
161 |
+
"intermediate_size": 13824,
|
162 |
+
"max_position_embeddings": 32768,
|
163 |
+
"max_window_layers": 70,
|
164 |
+
"mm_hidden_size": 1152,
|
165 |
+
"mm_newline_position": "one_token",
|
166 |
+
"mm_patch_merge_type": "spatial_unpad",
|
167 |
+
"mm_projector_lr": null,
|
168 |
+
"mm_projector_type": "mlp2x_gelu",
|
169 |
+
"mm_resampler_type": null,
|
170 |
+
"mm_spatial_pool_mode": "bilinear",
|
171 |
+
"mm_tunable_parts": "mm_vision_tower,mm_mlp_adapter,mm_language_model",
|
172 |
+
"mm_use_im_patch_token": false,
|
173 |
+
"mm_use_im_start_end": false,
|
174 |
+
"mm_vision_select_feature": "patch",
|
175 |
+
"mm_vision_select_layer": -2,
|
176 |
+
"mm_vision_tower": "google/siglip-so400m-patch14-384",
|
177 |
+
"mm_vision_tower_lr": 2e-06,
|
178 |
+
"model_type": "qwen2",
|
179 |
+
"num_attention_heads": 40,
|
180 |
+
"num_hidden_layers": 48,
|
181 |
+
"num_key_value_heads": 8,
|
182 |
+
"pos_skipping_range": 4096,
|
183 |
+
"rms_norm_eps": 1e-06,
|
184 |
+
"rope_scaling": null,
|
185 |
+
"rope_theta": 1000000.0,
|
186 |
+
"sliding_window": null,
|
187 |
+
"tie_word_embeddings": false,
|
188 |
+
"tokenizer_model_max_length": 16384,
|
189 |
+
"tokenizer_padding_side": "right",
|
190 |
+
"torch_dtype": "bfloat16",
|
191 |
+
"transformers_version": "4.44.2",
|
192 |
+
"use_cache": false,
|
193 |
+
"use_mm_proj": true,
|
194 |
+
"use_pos_skipping": false,
|
195 |
+
"use_sliding_window": false,
|
196 |
+
"vision_tower_pretrained": null,
|
197 |
+
"vocab_size": 151675
|
198 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"attn_implementation": "flash_attention_2",
|
3 |
+
"bos_token_id": 151643,
|
4 |
+
"do_sample": true,
|
5 |
+
"eos_token_id": [
|
6 |
+
151645,
|
7 |
+
151643
|
8 |
+
],
|
9 |
+
"pad_token_id": 151643,
|
10 |
+
"repetition_penalty": 1.05,
|
11 |
+
"temperature": 0.7,
|
12 |
+
"top_k": 20,
|
13 |
+
"top_p": 0.8,
|
14 |
+
"transformers_version": "4.44.2"
|
15 |
+
}
|
model-00001-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4bfcf03c636906395f9ca66f737cb2c4acdb227527a6eeadf44b4e161a6ead0e
|
3 |
+
size 4982238256
|
model-00002-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4a91a0b30b2617abe3c7c39d1c6f292c112b44603db82943ad208975ccbcd1c3
|
3 |
+
size 4954847344
|
model-00003-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7b7126848eb10f08b32275c6bfa2eb85eb274ddcab8acf6321bd1030179e1451
|
3 |
+
size 4954847392
|
model-00004-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cfbd6feb17b2367fba9b4e5c940fc138a8bfb493556a28d0a4e51feb995cc650
|
3 |
+
size 4954847392
|
model-00005-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6cf11cad55836c52bb2f9f473f4b8da1537dc5351e6cb10e1fc4741ec2fe8dbf
|
3 |
+
size 4954847392
|
model-00006-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:49790c30668e6ee630126bda800815e576862bbbccb3e1b7601a1932e7cf43c4
|
3 |
+
size 4037205480
|
model-00007-of-00007.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cde77eca028b13b6eddb3f3b74cf3ed1e0cb49f3911436faf1f3b77284c01bf5
|
3 |
+
size 1553152128
|
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,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"<gro>",
|
4 |
+
"<ocr>",
|
5 |
+
"<char>",
|
6 |
+
"</char>",
|
7 |
+
"<obj>",
|
8 |
+
"</obj>",
|
9 |
+
"<bbox>",
|
10 |
+
"</bbox>",
|
11 |
+
"<delim>"
|
12 |
+
],
|
13 |
+
"eos_token": {
|
14 |
+
"content": "<|im_end|>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false
|
19 |
+
},
|
20 |
+
"pad_token": "[UNK]",
|
21 |
+
"unk_token": {
|
22 |
+
"content": "[UNK]",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": false,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false
|
27 |
+
}
|
28 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,280 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"151665": {
|
182 |
+
"content": "[UNK]",
|
183 |
+
"lstrip": false,
|
184 |
+
"normalized": false,
|
185 |
+
"rstrip": false,
|
186 |
+
"single_word": false,
|
187 |
+
"special": true
|
188 |
+
},
|
189 |
+
"151666": {
|
190 |
+
"content": "<gro>",
|
191 |
+
"lstrip": false,
|
192 |
+
"normalized": false,
|
193 |
+
"rstrip": false,
|
194 |
+
"single_word": false,
|
195 |
+
"special": true
|
196 |
+
},
|
197 |
+
"151667": {
|
198 |
+
"content": "<ocr>",
|
199 |
+
"lstrip": false,
|
200 |
+
"normalized": false,
|
201 |
+
"rstrip": false,
|
202 |
+
"single_word": false,
|
203 |
+
"special": true
|
204 |
+
},
|
205 |
+
"151668": {
|
206 |
+
"content": "<char>",
|
207 |
+
"lstrip": false,
|
208 |
+
"normalized": false,
|
209 |
+
"rstrip": false,
|
210 |
+
"single_word": false,
|
211 |
+
"special": true
|
212 |
+
},
|
213 |
+
"151669": {
|
214 |
+
"content": "</char>",
|
215 |
+
"lstrip": false,
|
216 |
+
"normalized": false,
|
217 |
+
"rstrip": false,
|
218 |
+
"single_word": false,
|
219 |
+
"special": true
|
220 |
+
},
|
221 |
+
"151670": {
|
222 |
+
"content": "<obj>",
|
223 |
+
"lstrip": false,
|
224 |
+
"normalized": false,
|
225 |
+
"rstrip": false,
|
226 |
+
"single_word": false,
|
227 |
+
"special": true
|
228 |
+
},
|
229 |
+
"151671": {
|
230 |
+
"content": "</obj>",
|
231 |
+
"lstrip": false,
|
232 |
+
"normalized": false,
|
233 |
+
"rstrip": false,
|
234 |
+
"single_word": false,
|
235 |
+
"special": true
|
236 |
+
},
|
237 |
+
"151672": {
|
238 |
+
"content": "<bbox>",
|
239 |
+
"lstrip": false,
|
240 |
+
"normalized": false,
|
241 |
+
"rstrip": false,
|
242 |
+
"single_word": false,
|
243 |
+
"special": true
|
244 |
+
},
|
245 |
+
"151673": {
|
246 |
+
"content": "</bbox>",
|
247 |
+
"lstrip": false,
|
248 |
+
"normalized": false,
|
249 |
+
"rstrip": false,
|
250 |
+
"single_word": false,
|
251 |
+
"special": true
|
252 |
+
},
|
253 |
+
"151674": {
|
254 |
+
"content": "<delim>",
|
255 |
+
"lstrip": false,
|
256 |
+
"normalized": false,
|
257 |
+
"rstrip": false,
|
258 |
+
"single_word": false,
|
259 |
+
"special": true
|
260 |
+
}
|
261 |
+
},
|
262 |
+
"additional_special_tokens": [
|
263 |
+
"<gro>",
|
264 |
+
"<ocr>",
|
265 |
+
"<char>",
|
266 |
+
"</char>",
|
267 |
+
"<obj>",
|
268 |
+
"</obj>",
|
269 |
+
"<bbox>",
|
270 |
+
"</bbox>",
|
271 |
+
"<delim>"
|
272 |
+
],
|
273 |
+
"bos_token": null,
|
274 |
+
"chat_template": "{% if messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% else %}{{ '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}{% endif %}{% for message in messages %}{{ '<|im_start|>' + message['role'] + '\n' }}{# Render all images first #}{% for content in message['content'] | selectattr('type', 'equalto', 'image') %}{{ '<image>\n' }}{% endfor %}{# Render all text next #}{% if message['role'] != 'assistant' %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{{ content['text'] }}{% endfor %}{% else %}{% for content in message['content'] | selectattr('type', 'equalto', 'text') %}{% generation %}{{ content['text'] }}{% endgeneration %}{% endfor %}{% endif %}{{ '<|im_end|>\n' }}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
275 |
+
"pad_token": "[UNK]",
|
276 |
+
"padding_side": "right",
|
277 |
+
"split_special_tokens": false,
|
278 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
279 |
+
"unk_token": "[UNK]"
|
280 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|