Video-Text-to-Text
Transformers
Safetensors
English
jepa_llm
feature-extraction
video
video-question-answering
video-language-model
multimodal
v-jepa
world-model
custom_code
qwen3
Eval Results (legacy)
Instructions to use kkt94/Llama-V-JEPA-LM-Qwen3-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kkt94/Llama-V-JEPA-LM-Qwen3-4B with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("kkt94/Llama-V-JEPA-LM-Qwen3-4B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Release
Browse files- .gitattributes +1 -0
- LICENSE_LLAMA3_2 +111 -0
- LICENSE_QWEN3 +202 -0
- LICENSE_VJEPA2 +21 -0
- NOTICE_LLAMA3_2 +1 -0
- README.md +373 -0
- USE_POLICY_LLAMA3_2.md +52 -0
- chat_template.jinja +4 -0
- config.json +93 -0
- configuration_jepa_llm.py +37 -0
- merges.txt +0 -0
- model-00001-of-00003.safetensors +3 -0
- model-00002-of-00003.safetensors +3 -0
- model-00003-of-00003.safetensors +3 -0
- model.safetensors.index.json +916 -0
- modeling_jepa_llm.py +267 -0
- processing_jepa_llm.py +118 -0
- requirements.txt +10 -0
- tokenizer.json +3 -0
- tokenizer_config.json +238 -0
- vjepa2_1_encoder.py +400 -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 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
LICENSE_LLAMA3_2
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
LLAMA 3.2 COMMUNITY LICENSE AGREEMENT
|
| 2 |
+
Llama 3.2 Version Release Date: September 25, 2024
|
| 3 |
+
|
| 4 |
+
“Agreement” means the terms and conditions for use, reproduction, distribution
|
| 5 |
+
and modification of the Llama Materials set forth herein.
|
| 6 |
+
|
| 7 |
+
“Documentation” means the specifications, manuals and documentation accompanying Llama 3.2
|
| 8 |
+
distributed by Meta at https://llama.meta.com/doc/overview.
|
| 9 |
+
|
| 10 |
+
“Licensee” or “you” means you, or your employer or any other person or entity (if you are
|
| 11 |
+
entering into this Agreement on such person or entity’s behalf), of the age required under
|
| 12 |
+
applicable laws, rules or regulations to provide legal consent and that has legal authority
|
| 13 |
+
to bind your employer or such other person or entity if you are entering in this Agreement
|
| 14 |
+
on their behalf.
|
| 15 |
+
|
| 16 |
+
“Llama 3.2” means the foundational large language models and software and algorithms, including
|
| 17 |
+
machine-learning model code, trained model weights, inference-enabling code, training-enabling code,
|
| 18 |
+
fine-tuning enabling code and other elements of the foregoing distributed by Meta at
|
| 19 |
+
https://www.llama.com/llama-downloads.
|
| 20 |
+
|
| 21 |
+
“Llama Materials” means, collectively, Meta’s proprietary Llama 3.2 and Documentation (and
|
| 22 |
+
any portion thereof) made available under this Agreement.
|
| 23 |
+
|
| 24 |
+
“Meta” or “we” means Meta Platforms Ireland Limited (if you are located in or,
|
| 25 |
+
if you are an entity, your principal place of business is in the EEA or Switzerland)
|
| 26 |
+
and Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland).
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
By clicking “I Accept” below or by using or distributing any portion or element of the Llama Materials,
|
| 30 |
+
you agree to be bound by this Agreement.
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
1. License Rights and Redistribution.
|
| 34 |
+
|
| 35 |
+
a. Grant of Rights. You are granted a non-exclusive, worldwide,
|
| 36 |
+
non-transferable and royalty-free limited license under Meta’s intellectual property or other rights
|
| 37 |
+
owned by Meta embodied in the Llama Materials to use, reproduce, distribute, copy, create derivative works
|
| 38 |
+
of, and make modifications to the Llama Materials.
|
| 39 |
+
|
| 40 |
+
b. Redistribution and Use.
|
| 41 |
+
|
| 42 |
+
i. If you distribute or make available the Llama Materials (or any derivative works thereof),
|
| 43 |
+
or a product or service (including another AI model) that contains any of them, you shall (A) provide
|
| 44 |
+
a copy of this Agreement with any such Llama Materials; and (B) prominently display “Built with Llama”
|
| 45 |
+
on a related website, user interface, blogpost, about page, or product documentation. If you use the
|
| 46 |
+
Llama Materials or any outputs or results of the Llama Materials to create, train, fine tune, or
|
| 47 |
+
otherwise improve an AI model, which is distributed or made available, you shall also include “Llama”
|
| 48 |
+
at the beginning of any such AI model name.
|
| 49 |
+
|
| 50 |
+
ii. If you receive Llama Materials, or any derivative works thereof, from a Licensee as part
|
| 51 |
+
of an integrated end user product, then Section 2 of this Agreement will not apply to you.
|
| 52 |
+
|
| 53 |
+
iii. You must retain in all copies of the Llama Materials that you distribute the
|
| 54 |
+
following attribution notice within a “Notice” text file distributed as a part of such copies:
|
| 55 |
+
“Llama 3.2 is licensed under the Llama 3.2 Community License, Copyright © Meta Platforms,
|
| 56 |
+
Inc. All Rights Reserved.”
|
| 57 |
+
|
| 58 |
+
iv. Your use of the Llama Materials must comply with applicable laws and regulations
|
| 59 |
+
(including trade compliance laws and regulations) and adhere to the Acceptable Use Policy for
|
| 60 |
+
the Llama Materials (available at https://www.llama.com/llama3_2/use-policy), which is hereby
|
| 61 |
+
incorporated by reference into this Agreement.
|
| 62 |
+
|
| 63 |
+
2. Additional Commercial Terms. If, on the Llama 3.2 version release date, the monthly active users
|
| 64 |
+
of the products or services made available by or for Licensee, or Licensee’s affiliates,
|
| 65 |
+
is greater than 700 million monthly active users in the preceding calendar month, you must request
|
| 66 |
+
a license from Meta, which Meta may grant to you in its sole discretion, and you are not authorized to
|
| 67 |
+
exercise any of the rights under this Agreement unless or until Meta otherwise expressly grants you such rights.
|
| 68 |
+
|
| 69 |
+
3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND
|
| 70 |
+
RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF ANY KIND, AND META DISCLAIMS
|
| 71 |
+
ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES
|
| 72 |
+
OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE
|
| 73 |
+
FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND ASSUME ANY RISKS ASSOCIATED
|
| 74 |
+
WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS.
|
| 75 |
+
|
| 76 |
+
4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY,
|
| 77 |
+
WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT,
|
| 78 |
+
FOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN
|
| 79 |
+
IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
|
| 80 |
+
|
| 81 |
+
5. Intellectual Property.
|
| 82 |
+
|
| 83 |
+
a. No trademark licenses are granted under this Agreement, and in connection with the Llama Materials,
|
| 84 |
+
neither Meta nor Licensee may use any name or mark owned by or associated with the other or any of its affiliates,
|
| 85 |
+
except as required for reasonable and customary use in describing and redistributing the Llama Materials or as
|
| 86 |
+
set forth in this Section 5(a). Meta hereby grants you a license to use “Llama” (the “Mark”) solely as required
|
| 87 |
+
to comply with the last sentence of Section 1.b.i. You will comply with Meta’s brand guidelines (currently accessible
|
| 88 |
+
at https://about.meta.com/brand/resources/meta/company-brand/). All goodwill arising out of your use of the Mark
|
| 89 |
+
will inure to the benefit of Meta.
|
| 90 |
+
|
| 91 |
+
b. Subject to Meta’s ownership of Llama Materials and derivatives made by or for Meta, with respect to any
|
| 92 |
+
derivative works and modifications of the Llama Materials that are made by you, as between you and Meta,
|
| 93 |
+
you are and will be the owner of such derivative works and modifications.
|
| 94 |
+
|
| 95 |
+
c. If you institute litigation or other proceedings against Meta or any entity (including a cross-claim or
|
| 96 |
+
counterclaim in a lawsuit) alleging that the Llama Materials or Llama 3.2 outputs or results, or any portion
|
| 97 |
+
of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable
|
| 98 |
+
by you, then any licenses granted to you under this Agreement shall terminate as of the date such litigation or
|
| 99 |
+
claim is filed or instituted. You will indemnify and hold harmless Meta from and against any claim by any third
|
| 100 |
+
party arising out of or related to your use or distribution of the Llama Materials.
|
| 101 |
+
|
| 102 |
+
6. Term and Termination. The term of this Agreement will commence upon your acceptance of this Agreement or access
|
| 103 |
+
to the Llama Materials and will continue in full force and effect until terminated in accordance with the terms
|
| 104 |
+
and conditions herein. Meta may terminate this Agreement if you are in breach of any term or condition of this
|
| 105 |
+
Agreement. Upon termination of this Agreement, you shall delete and cease use of the Llama Materials. Sections 3,
|
| 106 |
+
4 and 7 shall survive the termination of this Agreement.
|
| 107 |
+
|
| 108 |
+
7. Governing Law and Jurisdiction. This Agreement will be governed and construed under the laws of the State of
|
| 109 |
+
California without regard to choice of law principles, and the UN Convention on Contracts for the International
|
| 110 |
+
Sale of Goods does not apply to this Agreement. The courts of California shall have exclusive jurisdiction of
|
| 111 |
+
any dispute arising out of this Agreement.
|
LICENSE_QWEN3
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright 2024 Alibaba Cloud
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
LICENSE_VJEPA2
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
NOTICE_LLAMA3_2
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Llama 3.2 is licensed under the Llama 3.2 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.
|
README.md
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: transformers
|
| 6 |
+
pipeline_tag: video-text-to-text
|
| 7 |
+
base_model:
|
| 8 |
+
- Qwen/Qwen3-4B-Instruct-2507
|
| 9 |
+
base_model_relation: finetune
|
| 10 |
+
tags:
|
| 11 |
+
- video
|
| 12 |
+
- video-question-answering
|
| 13 |
+
- video-language-model
|
| 14 |
+
- multimodal
|
| 15 |
+
- v-jepa
|
| 16 |
+
- world-model
|
| 17 |
+
- custom_code
|
| 18 |
+
- qwen3
|
| 19 |
+
model-index:
|
| 20 |
+
- name: Llama-V-JEPA-LM-Qwen3-4B
|
| 21 |
+
results:
|
| 22 |
+
- task:
|
| 23 |
+
type: video-text-to-text
|
| 24 |
+
name: Video question answering
|
| 25 |
+
dataset:
|
| 26 |
+
name: MVBench
|
| 27 |
+
type: OpenGVLab/MVBench
|
| 28 |
+
metrics:
|
| 29 |
+
- type: accuracy
|
| 30 |
+
name: accuracy
|
| 31 |
+
value: 72.1
|
| 32 |
+
- task:
|
| 33 |
+
type: video-text-to-text
|
| 34 |
+
name: Video question answering
|
| 35 |
+
dataset:
|
| 36 |
+
name: PerceptionTest
|
| 37 |
+
type: lmms-lab/PerceptionTest
|
| 38 |
+
metrics:
|
| 39 |
+
- type: accuracy
|
| 40 |
+
name: accuracy
|
| 41 |
+
value: 78.2
|
| 42 |
+
- task:
|
| 43 |
+
type: video-text-to-text
|
| 44 |
+
name: Video question answering
|
| 45 |
+
dataset:
|
| 46 |
+
name: TVBench
|
| 47 |
+
type: FunAILab/TVBench
|
| 48 |
+
metrics:
|
| 49 |
+
- type: accuracy
|
| 50 |
+
name: accuracy
|
| 51 |
+
value: 74.8
|
| 52 |
+
- task:
|
| 53 |
+
type: video-text-to-text
|
| 54 |
+
name: Video question answering
|
| 55 |
+
dataset:
|
| 56 |
+
name: TempCompass
|
| 57 |
+
type: lmms-lab/TempCompass
|
| 58 |
+
metrics:
|
| 59 |
+
- type: accuracy
|
| 60 |
+
name: accuracy
|
| 61 |
+
value: 79.9
|
| 62 |
+
- task:
|
| 63 |
+
type: video-text-to-text
|
| 64 |
+
name: Video question answering
|
| 65 |
+
dataset:
|
| 66 |
+
name: TOMATO
|
| 67 |
+
type: yale-nlp/TOMATO
|
| 68 |
+
metrics:
|
| 69 |
+
- type: accuracy
|
| 70 |
+
name: accuracy
|
| 71 |
+
value: 53.5
|
| 72 |
+
- task:
|
| 73 |
+
type: video-text-to-text
|
| 74 |
+
name: Video question answering
|
| 75 |
+
dataset:
|
| 76 |
+
name: MotionBench
|
| 77 |
+
type: zai-org/MotionBench
|
| 78 |
+
metrics:
|
| 79 |
+
- type: accuracy
|
| 80 |
+
name: accuracy
|
| 81 |
+
value: 59.1
|
| 82 |
+
- task:
|
| 83 |
+
type: video-text-to-text
|
| 84 |
+
name: Video question answering
|
| 85 |
+
dataset:
|
| 86 |
+
name: NExT-QA
|
| 87 |
+
type: lmms-lab/NExTQA
|
| 88 |
+
metrics:
|
| 89 |
+
- type: accuracy
|
| 90 |
+
name: accuracy
|
| 91 |
+
value: 79.3
|
| 92 |
+
- task:
|
| 93 |
+
type: video-text-to-text
|
| 94 |
+
name: Video question answering
|
| 95 |
+
dataset:
|
| 96 |
+
name: MVP
|
| 97 |
+
type: facebook/minimal_video_pairs
|
| 98 |
+
metrics:
|
| 99 |
+
- type: accuracy
|
| 100 |
+
name: pair accuracy
|
| 101 |
+
value: 58.1
|
| 102 |
+
- task:
|
| 103 |
+
type: video-text-to-text
|
| 104 |
+
name: Video question answering
|
| 105 |
+
dataset:
|
| 106 |
+
name: TemporalBench (binary)
|
| 107 |
+
type: microsoft/TemporalBench
|
| 108 |
+
metrics:
|
| 109 |
+
- type: accuracy
|
| 110 |
+
name: accuracy
|
| 111 |
+
value: 75.7
|
| 112 |
+
- task:
|
| 113 |
+
type: video-text-to-text
|
| 114 |
+
name: Video question answering
|
| 115 |
+
dataset:
|
| 116 |
+
name: SSv2 (multiple choice)
|
| 117 |
+
type: HuggingFaceM4/something_something_v2
|
| 118 |
+
metrics:
|
| 119 |
+
- type: accuracy
|
| 120 |
+
name: accuracy
|
| 121 |
+
value: 92.2
|
| 122 |
+
- task:
|
| 123 |
+
type: video-text-to-text
|
| 124 |
+
name: Video question answering
|
| 125 |
+
dataset:
|
| 126 |
+
name: Vinoground text
|
| 127 |
+
type: HanSolo9682/Vinoground
|
| 128 |
+
metrics:
|
| 129 |
+
- type: accuracy
|
| 130 |
+
name: text pair accuracy
|
| 131 |
+
value: 76.0
|
| 132 |
+
- task:
|
| 133 |
+
type: video-text-to-text
|
| 134 |
+
name: Video question answering
|
| 135 |
+
dataset:
|
| 136 |
+
name: Vinoground video
|
| 137 |
+
type: HanSolo9682/Vinoground
|
| 138 |
+
metrics:
|
| 139 |
+
- type: accuracy
|
| 140 |
+
name: video pair accuracy
|
| 141 |
+
value: 66.8
|
| 142 |
+
---
|
| 143 |
+
|
| 144 |
+
# Llama-V-JEPA-LM-Qwen3-4B
|
| 145 |
+
|
| 146 |
+
Base language model: [Qwen3-4B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507) (Apache-2.0). The name begins with "Llama" because the training data include the FGQA split of [PLM-Video-Human](https://huggingface.co/datasets/facebook/PLM-Video-Human), an output of Llama 3.2 whose license requires models trained on it to carry the "Llama" prefix.
|
| 147 |
+
|
| 148 |
+
**Llama-V-JEPA-LM-Qwen3-4B** is a video-language model from the **Llama-V-JEPA-LM** family. It joins a frozen **V-JEPA 2.1 world-model video encoder** (ViT-g) to the **Qwen3-4B-Instruct-2507** language model through a **spectral bridge** that turns every 32-frame clip into **1,024 visual tokens**. It is trained with **counterfactual supervision**: pixel transformations of public videos produce answer-balanced variants whose answers are fixed by construction and differ only in how the scene changes, so the language model learns to read the dynamics (direction, speed, order, state) that the world-model encoder carries. Trained on 4.53M public samples, Llama-V-JEPA-LM-Qwen3-4B reaches a **72.14** average on 12 scores across 11 video benchmarks, ahead of every open model of its size class (best open 4B-class model: Molmo2-4B, 61.08).
|
| 149 |
+
|
| 150 |
+
## Highlights
|
| 151 |
+
|
| 152 |
+
- **Ahead of every open model of its size class.** 72.14 on the 12-score average vs. 61.08 for Molmo2-4B; best of all open 4B-class models on 8 of 12 scores (Vinoground video 66.8 vs. 33.8, SSv2 92.2 vs. 68.3, Vinoground text 76.0 vs. 55.0, TOMATO 53.5 vs. 36.5).
|
| 153 |
+
- **Reads motion and temporal change.** The counterfactual data teach direction, order, position, speed, counting and completion from public videos, with answers set by the transformation and no new human annotation.
|
| 154 |
+
- **Generalizes beyond its constructions.** 96.3 average on six held-out sets (unseen speed ratios, an unseen source corpus, unseen combinations, an unseen simulator; chance 33.3), vs. 50.0 for the best open 4B-class model (Qwen3-VL-4B).
|
| 155 |
+
- **Compact and fast.** 1,024 visual tokens per clip at any input resolution, so the language model prefills a clip with 8.6 TFLOPs in 29 ms on one H100, vs. 18.1–104.4 TFLOPs and 58–218 ms for the open models of its class; 167 ms to the first token in total.
|
| 156 |
+
- **Beyond Meta's V-JEPA video LLMs.** On the six benchmarks reported for Meta's V-JEPA 2 / 2.1 video LLMs (Llama-3.1-8B), 69.4 average vs. 63.3 / 62.8 (as published), with 4.53M instead of 88.5M / 72.5M training samples.
|
| 157 |
+
|
| 158 |
+
## Model details
|
| 159 |
+
|
| 160 |
+
| | |
|
| 161 |
+
|---|---|
|
| 162 |
+
| Model type | Video-language model (video + text in, text out) |
|
| 163 |
+
| Language model | [Qwen3-4B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507), fully fine-tuned (4.02 B parameters) |
|
| 164 |
+
| Vision encoder | V-JEPA 2.1 ViT-g, frozen (1.01 B parameters) |
|
| 165 |
+
| Bridge | spectral bridge: fixed PCA rotation and rescaling to 2,048 dimensions + trainable MLP (9.8 M parameters) |
|
| 166 |
+
| Total parameters | 5.06 B |
|
| 167 |
+
| Visual tokens | 1,024 per clip (16 tubelets × 8 × 8 cells), independent of input resolution |
|
| 168 |
+
| Frames | 32 per clip, sampled uniformly, 384 × 384 |
|
| 169 |
+
| Context | 2,560 tokens in training (video tokens + prompt + answer) |
|
| 170 |
+
| Precision | bf16 (bridge projection statistics in fp32) |
|
| 171 |
+
| Training samples | 4.53M (one pass over a mixture of 175 public sources) |
|
| 172 |
+
| Language | English |
|
| 173 |
+
| Licence | Apache-2.0; V-JEPA 2 encoder: MIT; FGQA training data: Llama 3.2 Community License (see [License](#license)) |
|
| 174 |
+
|
| 175 |
+
<details><summary>Architecture details</summary>
|
| 176 |
+
|
| 177 |
+
| Component | Details | Parameters |
|
| 178 |
+
|---|---|---|
|
| 179 |
+
| Video encoder (frozen) | V-JEPA 2.1 ViT-g/16 (`vjepa2_1_vitg_384.pt`, target encoder), 384 x 384, tubelet 2, RoPE; 4 output levels (blocks 9 / 19 / 29 / 39) | 1.01 B |
|
| 180 |
+
| Spectral bridge | per-level LayerNorm of the 4 levels, 3 x 3 patch pooling to 8 x 8 cells per tubelet, projection onto the top 2,048 principal directions of the frozen V-JEPA features with one global scale (fixed statistics, fp32), LayerNorm + MLP 2048 -> 2048 -> 2560, plus learned position, time and cell-geometry codes | 9.8 M (+ 11.54 M fp32 statistics) |
|
| 181 |
+
| Language model (fully fine-tuned) | Qwen3-4B-Instruct-2507 architecture (36 layers, hidden 2560), tied input/output embeddings | 4.02 B |
|
| 182 |
+
|
| 183 |
+
Weights are bf16 safetensors (3 shards, about 10.1 GB). The only exception is the bridge's projection statistics (`bridge.spectral.{mean,basis,scale}`), which stay in fp32, also after `.to(torch.bfloat16)`.
|
| 184 |
+
|
| 185 |
+
</details>
|
| 186 |
+
|
| 187 |
+
## Quick start
|
| 188 |
+
|
| 189 |
+
**1. Install** (Python 3.10+, a CUDA build of PyTorch that matches your driver):
|
| 190 |
+
|
| 191 |
+
```bash
|
| 192 |
+
pip install torch
|
| 193 |
+
pip install "transformers>=5" safetensors tokenizers numpy jinja2 eva-decord huggingface_hub
|
| 194 |
+
```
|
| 195 |
+
|
| 196 |
+
**2. Run** on a GPU with 16 GB or more (peak memory for one clip in our test: 10.0 GiB):
|
| 197 |
+
|
| 198 |
+
```python
|
| 199 |
+
import torch
|
| 200 |
+
from transformers import AutoModel
|
| 201 |
+
|
| 202 |
+
model = AutoModel.from_pretrained(
|
| 203 |
+
"kkt94/Llama-V-JEPA-LM-Qwen3-4B",
|
| 204 |
+
trust_remote_code=True, dtype=torch.bfloat16,
|
| 205 |
+
).to("cuda").eval()
|
| 206 |
+
|
| 207 |
+
# free-form answer (greedy decoding)
|
| 208 |
+
print(model.chat("my_video.mp4", "Describe what happens in the video."))
|
| 209 |
+
|
| 210 |
+
# multiple choice -> (index of the chosen option, one score per option)
|
| 211 |
+
idx, scores = model.choose("my_video.mp4", "Which way does the ball roll?", ["to the left", "to the right"])
|
| 212 |
+
print(idx, scores)
|
| 213 |
+
|
| 214 |
+
# only part of the video (seconds)
|
| 215 |
+
print(model.chat("my_video.mp4", "What does the person pick up?", start_sec=5.0, end_sec=12.0))
|
| 216 |
+
|
| 217 |
+
# encode once, ask several questions
|
| 218 |
+
frames, times = model.load_video("my_video.mp4")
|
| 219 |
+
ev = model.encode_video(frames, times) # [1, 1024, 2560] video tokens
|
| 220 |
+
print(model.choose(None, "Is the door open at the end?", ["yes", "no"], evidence=ev))
|
| 221 |
+
print(model.chat(None, "What happens next?", evidence=ev))
|
| 222 |
+
```
|
| 223 |
+
|
| 224 |
+
`hf download kkt94/Llama-V-JEPA-LM-Qwen3-4B --local-dir ./Llama-V-JEPA-LM-Qwen3-4B` downloads the files (about 10.1 GB) if you prefer a local folder; `from_pretrained` accepts that folder too.
|
| 225 |
+
|
| 226 |
+
### Usage notes
|
| 227 |
+
|
| 228 |
+
- **`choose`** scores the options and does not generate. The prompt is `"{question}\nA. {option 0}\nB. {option 1}\n...\nAnswer with the option's letter from the given choices directly."`; the prediction is the argmax of the option-letter logits at the first answer position (up to 10 options, A-J). This is the protocol of the evaluation below.
|
| 229 |
+
- **`chat`** answers a single-turn question with greedy decoding (`max_new_tokens`, default 256).
|
| 230 |
+
- **Chat template** (`chat_template.jinja`, set on `model.tokenizer` automatically): plain Qwen3 `<|im_start|>` turns, no system prompt and no thinking block. The video tokens come first in the single user turn, followed by the question. The API takes one video and one question per call.
|
| 231 |
+
- **Frames:** 32 frames sampled uniformly over the clip (frame *i* at `t0 + (i + 0.5) * (t1 - t0) / 32` s, nearest source frame); the clip is the whole video or `[start_sec, end_sec]`. Short side resized to 384 px (bicubic, antialiased), centre crop 384 x 384, ImageNet normalisation; the real frame timestamps are encoded into the video tokens. For long videos, `start_sec` / `end_sec` select the segment of interest.
|
| 232 |
+
- **Video files:** any container / codec that `decord` reads (mp4, webm, mkv, avi, ...).
|
| 233 |
+
- **Precision:** bf16, except the bridge statistics (fp32). `rope_inv_freq_bf16` (config, default `true`) rounds the LLM's rotary frequencies to bf16 as in the evaluation these scores come from.
|
| 234 |
+
|
| 235 |
+
<details><summary>Repository files</summary>
|
| 236 |
+
|
| 237 |
+
| File | Contents |
|
| 238 |
+
|---|---|
|
| 239 |
+
| `model-*.safetensors`, `model.safetensors.index.json` | weights (vision encoder, bridge, language model) |
|
| 240 |
+
| `config.json` | `JepaLlmConfig` (`model_type: jepa_llm`) with the language model's config as `text_config` |
|
| 241 |
+
| `configuration_jepa_llm.py` | the config class |
|
| 242 |
+
| `modeling_jepa_llm.py` | `JepaLlmModel`: encoder, bridge, language model and the `chat` / `choose` API |
|
| 243 |
+
| `processing_jepa_llm.py` | video decoding, frame sampling, preprocessing, prompt building, chat templates |
|
| 244 |
+
| `vjepa2_1_encoder.py` | inference-only copy of the V-JEPA 2.1 encoder (MIT) |
|
| 245 |
+
| tokenizer files, `chat_template.jinja` | the language model's tokenizer and the template the model was trained with |
|
| 246 |
+
| `LICENSE_QWEN3`, `LICENSE_VJEPA2`, `LICENSE_LLAMA3_2`, `NOTICE_LLAMA3_2`, `USE_POLICY_LLAMA3_2.md` | licences (`*_LLAMA3_2`: Llama 3.2 licence, notice and use policy for the PLM-Video-Human FGQA training data) |
|
| 247 |
+
|
| 248 |
+
The code needs no external repository (`trust_remote_code=True`). Tested with Python 3.12, torch 2.13, transformers 5.10.4 (see `requirements.txt`).
|
| 249 |
+
|
| 250 |
+
</details>
|
| 251 |
+
|
| 252 |
+
## Evaluation
|
| 253 |
+
|
| 254 |
+
Twelve scores on eleven video benchmarks for Llama-V-JEPA-LM-Qwen3-4B and every open model of the 4B class. All models are evaluated by the same harness with one protocol: 32 frames, the same items and prompts, option-letter scoring. Bold: best in the table.
|
| 255 |
+
|
| 256 |
+
| Model | MVB | PT | TVB | TC | TOM | MoB | NQA | MVP | TB | SSv2 | VG-T | VG-V | **Avg** |
|
| 257 |
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
| 258 |
+
| **Llama-V-JEPA-LM-Qwen3-4B** | 72.1 | 78.2 | **74.8** | **79.9** | **53.5** | 59.1 | 79.3 | **58.1** | **75.7** | **92.2** | **76.0** | **66.8** | **72.14** |
|
| 259 |
+
| Molmo2-4B | **74.2** | **81.4** | 65.5 | 70.8 | 36.5 | **62.3** | **85.1** | 45.4 | 72.8 | 57.0 | 48.2 | 33.8 | 61.08 |
|
| 260 |
+
| PLM-3B | 73.0 | 76.0 | 56.6 | 67.0 | 36.3 | 58.9 | 84.0 | 46.2 | 66.2 | 68.3 | 55.0 | 31.4 | 59.91 |
|
| 261 |
+
| InternVL3.5-4B | 70.9 | 69.1 | 60.0 | 71.1 | 32.1 | 59.0 | 79.8 | 41.4 | 73.2 | 64.1 | 53.6 | 28.0 | 58.52 |
|
| 262 |
+
| Qwen3-VL-4B | 68.0 | 72.0 | 59.2 | 70.9 | 36.3 | 61.5 | 80.9 | 39.6 | 68.9 | 64.8 | 47.6 | 31.0 | 58.39 |
|
| 263 |
+
| Apollo-3B | 62.0 | 67.1 | 50.9 | 63.0 | 29.0 | 55.0 | 80.9 | 27.4 | 60.1 | 64.7 | 37.4 | 25.8 | 51.94 |
|
| 264 |
+
| Gemma 4 E4B | 46.5 | 52.0 | 41.5 | 57.4 | 22.8 | 49.4 | 64.7 | 16.5 | 61.0 | 43.8 | 26.4 | 24.0 | 42.17 |
|
| 265 |
+
|
| 266 |
+
MVB: MVBench, PT: PerceptionTest, TVB: TVBench, TC: TempCompass, TOM: TOMATO, MoB: MotionBench, NQA: NExT-QA, MVP: Minimal Video Pairs (pair accuracy), TB: TemporalBench (binary), SSv2: Something-Something v2 (multiple choice), VG-T / VG-V: Vinoground text / video (pair accuracy), Avg: mean of the 12 scores.
|
| 267 |
+
|
| 268 |
+
**Held-out generalization.** Six construction sets built from videos and settings never used in training (unseen playback-speed ratios, a new source corpus for speed and for direction, unseen mirror × reversal and acceleration × reversal combinations, camera motion from an unseen simulator; chance 33.3): **96.3** average for Llama-V-JEPA-LM-Qwen3-4B, vs. 50.0 for the best open 4B-class model (Qwen3-VL-4B).
|
| 269 |
+
|
| 270 |
+
**Inference cost** per 32-frame clip on one H100 (batch 1, bf16, video decoding excluded; times: median of 10 runs after 3 warm-ups; 480p clip unless noted):
|
| 271 |
+
|
| 272 |
+
| Model | Visual tokens | Encoder (TFLOPs) | LLM prefill (TFLOPs) | LLM prefill (ms) | First token, 480p (ms) | Decode (ms / token) | First token, 720p (ms) |
|
| 273 |
+
|---|---:|---:|---:|---:|---:|---:|---:|
|
| 274 |
+
| **Llama-V-JEPA-LM-Qwen3-4B** | 1,024 | 37.8 | 8.6 | 29 | 167 | 23.9 | 168 |
|
| 275 |
+
| Qwen3-VL-4B | 1,920 / 11,520 | 5.0 | 18.1 | 58 | 93 | 24.9 | 474 |
|
| 276 |
+
| InternVL3.5-4B | 8,192 | 23.2 | 104.4 | 218 | 273 | 25.3 | 273 |
|
| 277 |
+
| Molmo2-4B | 2,592 | 19.7 | 26.1 | 93 | 225 | 27.8 | 235 |
|
| 278 |
+
| PLM-3B | 8,192 | 22.2 | 70.4 | 138 | 228 | 15.6 | 228 |
|
| 279 |
+
|
| 280 |
+
First token = vision encoder + connector + LLM prefill. Decode: per generated token with KV cache. --: not timed. The visual-token count and cost of Llama-V-JEPA-LM models do not depend on the input resolution.
|
| 281 |
+
|
| 282 |
+
## Training
|
| 283 |
+
|
| 284 |
+
**Data.** 4.53M samples drawn at fixed per-source weights from 175 public sources: open video caption and QA collections (LLaVA-Video, ShareGPTVideo, PerceptionLM data, Charades-Ego, EPIC-Kitchens, HoloAssist, SSv2, Kinetics-700, SA-V, ActivityNet and others) plus 33 counterfactual sources (509,193 rows, about 6% of the drawn samples). The counterfactual rows come from 14 constructions in 6 families. Each takes a clip of a public dataset and a transformation; the answer follows from the transformation, so no new human annotation and no language model are involved. Within each source every scene appears with each answer equally often in expectation.
|
| 285 |
+
|
| 286 |
+
| Family | Constructions | Rows |
|
| 287 |
+
|---|---|---:|
|
| 288 |
+
| Sign flip | clip reversed or mirrored, camera move rendered or reversed, two clips each optionally reversed | 117,066 |
|
| 289 |
+
| Order | two events joined in sequence or stacked; which segment matches a two-action caption | 85,579 |
|
| 290 |
+
| Position | several clips joined, one holds the queried action: beginning / middle / end | 48,386 |
|
| 291 |
+
| Magnitude | relative speed, acceleration / deceleration, slow motion vs. time-lapse | 141,084 |
|
| 292 |
+
| Count | one action repeated k times; number of distinct activities | 35,614 |
|
| 293 |
+
| Stop/cut | clip cut before the action completes; physically impossible simulator edits | 81,464 |
|
| 294 |
+
|
| 295 |
+
**Recipe.** The V-JEPA 2.1 encoder stays frozen. After a bridge-only warm-up (0.6–0.8% of the steps), the bridge and the full language model are trained together in a single stage, one pass over the mixture: 30,187 steps at global batch 150, learning rate 1.2e-5 for the language model and 2e-4 for the bridge, cosine decay, weight decay 0.01 / 0.05, maximum sequence length 2,560 tokens.
|
| 296 |
+
|
| 297 |
+
**Hardware.** 30 NVIDIA H100 GPUs (5 clips per GPU), 16.6 hours, 499 H100-hours in total; training compute 314 EFLOPs (including the frozen encoder's forward pass).
|
| 298 |
+
|
| 299 |
+
## Training data
|
| 300 |
+
|
| 301 |
+
Fine-tuned on the training splits of public video-language datasets; no new human annotation.
|
| 302 |
+
|
| 303 |
+
| Dataset | License | Note |
|
| 304 |
+
|---|---|---|
|
| 305 |
+
| Something-Something v2 | Qualcomm research-use license | non-commercial |
|
| 306 |
+
| LLaVA-Video-178K | Apache-2.0 (card: academic research) | GPT-4o-generated |
|
| 307 |
+
| ShareGPTVideo (LLaVA-Hound) | Apache-2.0 | GPT-generated |
|
| 308 |
+
| HoloAssist | CDLA-Permissive-2.0 | – |
|
| 309 |
+
| SA-V | CC BY 4.0 | – |
|
| 310 |
+
| PLM-Video-Human (RCap, RDCap, RTLoc) | CC BY 4.0 | – |
|
| 311 |
+
| PLM-Video-Human FGQA | Llama 3.2 Community License | Llama 3.2 output |
|
| 312 |
+
| Charades / Charades-Ego | AI2 non-commercial license | non-commercial |
|
| 313 |
+
| EPIC-KITCHENS-100 | CC BY-NC 4.0 | non-commercial |
|
| 314 |
+
| EgoDex | CC BY-NC-ND 4.0 | non-commercial |
|
| 315 |
+
| Kinetics-700 | CC BY 4.0 (annotations) | YouTube videos |
|
| 316 |
+
| NVIDIA PhysicalAI Physical-Interaction-Scenes | OpenMDW-1.1 | – |
|
| 317 |
+
| RoboVQA | CC BY 4.0 | – |
|
| 318 |
+
| Language-Table | Apache-2.0 | – |
|
| 319 |
+
| CLEVRER | see project page | – |
|
| 320 |
+
| TimeIT | CC BY 4.0 (instructions) | source videos under their own terms |
|
| 321 |
+
| PerceptionTest (train) | CC BY 4.0 | – |
|
| 322 |
+
| STAR (train) | Apache-2.0 | Charades videos |
|
| 323 |
+
| Oops! | CC BY-NC-SA 4.0 | non-commercial |
|
| 324 |
+
| HT-Step | CC BY-NC 4.0 | non-commercial |
|
| 325 |
+
| Others (ActivityNet, YouCook2, LSMDC, Ego-QA, Video-Holmes, VidLN, Countix) | see each dataset | research use |
|
| 326 |
+
| UltraChat-200k prompts | MIT | answers generated by the base LLM |
|
| 327 |
+
| Reasoning / answer rewrites | generated by Qwen3-8B / Qwen3-VL-8B (Apache-2.0) | – |
|
| 328 |
+
|
| 329 |
+
Each dataset remains under its own terms; this release grants no rights in them.
|
| 330 |
+
|
| 331 |
+
## Intended use
|
| 332 |
+
|
| 333 |
+
- **Intended:** question answering about and description of videos in English: actions, events and their order, motion direction and speed, camera motion, counting, and state changes; research on video-language models and world-model encoders.
|
| 334 |
+
- **Out of scope:** image, document, chart or OCR question answering, which were not training targets; use that violates the Llama 3.2 Acceptable Use Policy (which applies to the FGQA training-data component) or applicable law.
|
| 335 |
+
|
| 336 |
+
Several training datasets restrict commercial use. We release the weights for research and non-commercial use; anyone considering commercial use is responsible for checking the terms of the training data.
|
| 337 |
+
|
| 338 |
+
## License
|
| 339 |
+
|
| 340 |
+
This model combines components under the following licences:
|
| 341 |
+
|
| 342 |
+
- **Language model: Apache License 2.0.** The language-model weights are a modified version of [Qwen3-4B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507) (`LICENSE_QWEN3`): all weights were fine-tuned on video-language data, and video tokens from the bridge are inserted into its input embeddings. The tokenizer files are unmodified copies from Qwen3-4B-Instruct-2507.
|
| 343 |
+
- **Video encoder: MIT License.** The encoder weights are the V-JEPA 2.1 ViT-g checkpoint `vjepa2_1_vitg_384.pt` released by Meta with [facebookresearch/vjepa2](https://github.com/facebookresearch/vjepa2) (MIT, `LICENSE_VJEPA2`), unchanged (frozen). `vjepa2_1_encoder.py` is adapted from that repository under the MIT License.
|
| 344 |
+
- **Bridge weights and model code** are released under the Apache License 2.0.
|
| 345 |
+
- **Training data component: Llama 3.2 Community License.** The training data include the FGQA split of [PLM-Video-Human](https://huggingface.co/datasets/facebook/PLM-Video-Human), an output of Llama 3.2 that is subject to the [Llama 3.2 Community License](https://www.llama.com/llama3_2/license/) (`LICENSE_LLAMA3_2`) and the [Llama 3.2 Acceptable Use Policy](https://www.llama.com/llama3_2/use-policy/) (`USE_POLICY_LLAMA3_2.md`); as that license requires for models trained on it, the model name begins with "Llama". Llama 3.2 is licensed under the Llama 3.2 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved. (`NOTICE_LLAMA3_2`)
|
| 346 |
+
- **Training datasets** remain under their own terms (see [Training data](#training-data)).
|
| 347 |
+
|
| 348 |
+
## Citation
|
| 349 |
+
|
| 350 |
+
The entry will be updated when the paper is public.
|
| 351 |
+
|
| 352 |
+
```bibtex
|
| 353 |
+
@misc{vjepalm2026,
|
| 354 |
+
title = {V-JEPA-LM: Video-Language Models That Read Dynamics Beyond Static, Text-Aligned Representations},
|
| 355 |
+
author = {Anonymous},
|
| 356 |
+
year = {2026}
|
| 357 |
+
}
|
| 358 |
+
```
|
| 359 |
+
|
| 360 |
+
Please also cite V-JEPA 2 / V-JEPA 2.1 and Qwen3.
|
| 361 |
+
|
| 362 |
+
## Model family
|
| 363 |
+
|
| 364 |
+
All sizes are in the [Llama-V-JEPA-LM collection](https://huggingface.co/collections/kkt94/llama-v-jepa-lm-6af41fb2a548b444c6255d63).
|
| 365 |
+
|
| 366 |
+
| Model | Language model | Encoder | Avg (12) |
|
| 367 |
+
|---|---|---|---:|
|
| 368 |
+
| [Llama-V-JEPA-LM-Llama3.2-1B](https://huggingface.co/kkt94/Llama-V-JEPA-LM-Llama3.2-1B) | Llama-3.2-1B-Instruct | V-JEPA 2.1 ViT-L | 62.21 |
|
| 369 |
+
| [Llama-V-JEPA-LM-Qwen3-1.7B](https://huggingface.co/kkt94/Llama-V-JEPA-LM-Qwen3-1.7B) | Qwen3-1.7B | V-JEPA 2.1 ViT-L | 66.02 |
|
| 370 |
+
| [Llama-V-JEPA-LM-Llama3.2-3B](https://huggingface.co/kkt94/Llama-V-JEPA-LM-Llama3.2-3B) | Llama-3.2-3B-Instruct | V-JEPA 2.1 ViT-g | 68.97 |
|
| 371 |
+
| **Llama-V-JEPA-LM-Qwen3-4B** (this model) | Qwen3-4B-Instruct-2507 | V-JEPA 2.1 ViT-g | 72.14 |
|
| 372 |
+
| [Llama-V-JEPA-LM-Llama3.1-8B](https://huggingface.co/kkt94/Llama-V-JEPA-LM-Llama3.1-8B) | Llama-3.1-8B-Instruct | V-JEPA 2.1 ViT-g | 70.51 |
|
| 373 |
+
| [Llama-V-JEPA-LM-Qwen3-8B](https://huggingface.co/kkt94/Llama-V-JEPA-LM-Qwen3-8B) | Qwen3-8B | V-JEPA 2.1 ViT-g | 70.11 |
|
USE_POLICY_LLAMA3_2.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
**Llama 3.2** **Acceptable Use Policy**
|
| 2 |
+
|
| 3 |
+
Meta is committed to promoting safe and fair use of its tools and features, including Llama 3.2. If you access or use Llama 3.2, you agree to this Acceptable Use Policy (“**Policy**”). The most recent copy of this policy can be found at [https://www.llama.com/llama3_2/use-policy](https://www.llama.com/llama3_2/use-policy).
|
| 4 |
+
|
| 5 |
+
**Prohibited Uses**
|
| 6 |
+
|
| 7 |
+
We want everyone to use Llama 3.2 safely and responsibly. You agree you will not use, or allow others to use, Llama 3.2 to:
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
1. Violate the law or others’ rights, including to:
|
| 12 |
+
1. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:
|
| 13 |
+
1. Violence or terrorism
|
| 14 |
+
2. Exploitation or harm to children, including the solicitation, creation, acquisition, or dissemination of child exploitative content or failure to report Child Sexual Abuse Material
|
| 15 |
+
3. Human trafficking, exploitation, and sexual violence
|
| 16 |
+
4. The illegal distribution of information or materials to minors, including obscene materials, or failure to employ legally required age-gating in connection with such information or materials.
|
| 17 |
+
5. Sexual solicitation
|
| 18 |
+
6. Any other criminal activity
|
| 19 |
+
1. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals
|
| 20 |
+
2. Engage in, promote, incite, or facilitate discrimination or other unlawful or harmful conduct in the provision of employment, employment benefits, credit, housing, other economic benefits, or other essential goods and services
|
| 21 |
+
3. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices
|
| 22 |
+
4. Collect, process, disclose, generate, or infer private or sensitive information about individuals, including information about individuals’ identity, health, or demographic information, unless you have obtained the right to do so in accordance with applicable law
|
| 23 |
+
5. Engage in or facilitate any action or generate any content that infringes, misappropriates, or otherwise violates any third-party rights, including the outputs or results of any products or services using the Llama Materials
|
| 24 |
+
6. Create, generate, or facilitate the creation of malicious code, malware, computer viruses or do anything else that could disable, overburden, interfere with or impair the proper working, integrity, operation or appearance of a website or computer system
|
| 25 |
+
7. Engage in any action, or facilitate any action, to intentionally circumvent or remove usage restrictions or other safety measures, or to enable functionality disabled by Meta
|
| 26 |
+
2. Engage in, promote, incite, facilitate, or assist in the planning or development of activities that present a risk of death or bodily harm to individuals, including use of Llama 3.2 related to the following:
|
| 27 |
+
8. Military, warfare, nuclear industries or applications, espionage, use for materials or activities that are subject to the International Traffic Arms Regulations (ITAR) maintained by the United States Department of State or to the U.S. Biological Weapons Anti-Terrorism Act of 1989 or the Chemical Weapons Convention Implementation Act of 1997
|
| 28 |
+
9. Guns and illegal weapons (including weapon development)
|
| 29 |
+
10. Illegal drugs and regulated/controlled substances
|
| 30 |
+
11. Operation of critical infrastructure, transportation technologies, or heavy machinery
|
| 31 |
+
12. Self-harm or harm to others, including suicide, cutting, and eating disorders
|
| 32 |
+
13. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual
|
| 33 |
+
3. Intentionally deceive or mislead others, including use of Llama 3.2 related to the following:
|
| 34 |
+
14. Generating, promoting, or furthering fraud or the creation or promotion of disinformation
|
| 35 |
+
15. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content
|
| 36 |
+
16. Generating, promoting, or further distributing spam
|
| 37 |
+
17. Impersonating another individual without consent, authorization, or legal right
|
| 38 |
+
18. Representing that the use of Llama 3.2 or outputs are human-generated
|
| 39 |
+
19. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement
|
| 40 |
+
4. Fail to appropriately disclose to end users any known dangers of your AI system
|
| 41 |
+
5. Interact with third party tools, models, or software designed to generate unlawful content or engage in unlawful or harmful conduct and/or represent that the outputs of such tools, models, or software are associated with Meta or Llama 3.2
|
| 42 |
+
|
| 43 |
+
With respect to any multimodal models included in Llama 3.2, the rights granted under Section 1(a) of the Llama 3.2 Community License Agreement are not being granted to you if you are an individual domiciled in, or a company with a principal place of business in, the European Union. This restriction does not apply to end users of a product or service that incorporates any such multimodal models.
|
| 44 |
+
|
| 45 |
+
Please report any violation of this Policy, software “bug,” or other problems that could lead to a violation of this Policy through one of the following means:
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
* Reporting issues with the model: [https://github.com/meta-llama/llama-models/issues](https://l.workplace.com/l.php?u=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-models%2Fissues&h=AT0qV8W9BFT6NwihiOHRuKYQM_UnkzN_NmHMy91OT55gkLpgi4kQupHUl0ssR4dQsIQ8n3tfd0vtkobvsEvt1l4Ic6GXI2EeuHV8N08OG2WnbAmm0FL4ObkazC6G_256vN0lN9DsykCvCqGZ)
|
| 50 |
+
* Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)
|
| 51 |
+
* Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)
|
| 52 |
+
* Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama 3.2: LlamaUseReport@meta.com
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- for message in messages -%}
|
| 2 |
+
{{- '<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>\n' -}}
|
| 3 |
+
{%- endfor -%}
|
| 4 |
+
{%- if add_generation_prompt -%}{{- '<|im_start|>assistant\n' -}}{%- endif -%}
|
config.json
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"JepaLlmModel"
|
| 4 |
+
],
|
| 5 |
+
"auto_map": {
|
| 6 |
+
"AutoConfig": "configuration_jepa_llm.JepaLlmConfig",
|
| 7 |
+
"AutoModel": "modeling_jepa_llm.JepaLlmModel"
|
| 8 |
+
},
|
| 9 |
+
"bridge_hidden": 2048,
|
| 10 |
+
"chat_template_name": "qwen3_instruct",
|
| 11 |
+
"dtype": "bfloat16",
|
| 12 |
+
"evidence_cells": 8,
|
| 13 |
+
"image_size": 384,
|
| 14 |
+
"max_tubelets": 64,
|
| 15 |
+
"model_type": "jepa_llm",
|
| 16 |
+
"num_frames": 32,
|
| 17 |
+
"rope_inv_freq_bf16": true,
|
| 18 |
+
"spectral_k": 2048,
|
| 19 |
+
"text_config": {
|
| 20 |
+
"attention_bias": false,
|
| 21 |
+
"attention_dropout": 0.0,
|
| 22 |
+
"bos_token_id": 151643,
|
| 23 |
+
"dtype": "bfloat16",
|
| 24 |
+
"eos_token_id": 151645,
|
| 25 |
+
"head_dim": 128,
|
| 26 |
+
"hidden_act": "silu",
|
| 27 |
+
"hidden_size": 2560,
|
| 28 |
+
"initializer_range": 0.02,
|
| 29 |
+
"intermediate_size": 9728,
|
| 30 |
+
"layer_types": [
|
| 31 |
+
"full_attention",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"full_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"full_attention",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"full_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"full_attention",
|
| 47 |
+
"full_attention",
|
| 48 |
+
"full_attention",
|
| 49 |
+
"full_attention",
|
| 50 |
+
"full_attention",
|
| 51 |
+
"full_attention",
|
| 52 |
+
"full_attention",
|
| 53 |
+
"full_attention",
|
| 54 |
+
"full_attention",
|
| 55 |
+
"full_attention",
|
| 56 |
+
"full_attention",
|
| 57 |
+
"full_attention",
|
| 58 |
+
"full_attention",
|
| 59 |
+
"full_attention",
|
| 60 |
+
"full_attention",
|
| 61 |
+
"full_attention",
|
| 62 |
+
"full_attention",
|
| 63 |
+
"full_attention",
|
| 64 |
+
"full_attention",
|
| 65 |
+
"full_attention",
|
| 66 |
+
"full_attention"
|
| 67 |
+
],
|
| 68 |
+
"max_position_embeddings": 262144,
|
| 69 |
+
"max_window_layers": 36,
|
| 70 |
+
"model_type": "qwen3",
|
| 71 |
+
"num_attention_heads": 32,
|
| 72 |
+
"num_hidden_layers": 36,
|
| 73 |
+
"num_key_value_heads": 8,
|
| 74 |
+
"pad_token_id": null,
|
| 75 |
+
"rms_norm_eps": 1e-06,
|
| 76 |
+
"rope_parameters": {
|
| 77 |
+
"rope_theta": 5000000,
|
| 78 |
+
"rope_type": "default"
|
| 79 |
+
},
|
| 80 |
+
"sliding_window": null,
|
| 81 |
+
"tie_word_embeddings": true,
|
| 82 |
+
"use_cache": true,
|
| 83 |
+
"use_sliding_window": false,
|
| 84 |
+
"vocab_size": 151936
|
| 85 |
+
},
|
| 86 |
+
"tie_word_embeddings": true,
|
| 87 |
+
"time_dim": 64,
|
| 88 |
+
"transformers_version": "5.10.4",
|
| 89 |
+
"vision_config": {},
|
| 90 |
+
"vision_level_dim": 1408,
|
| 91 |
+
"vision_levels": 4,
|
| 92 |
+
"vision_variant": "vit_giant_384"
|
| 93 |
+
}
|
configuration_jepa_llm.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Configuration of JEPA-LLM: frozen V-JEPA 2.1 ViT-g video encoder -> spectral-equalisation bridge -> Qwen3 LLM."""
|
| 2 |
+
from transformers import AutoConfig, PretrainedConfig
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
class JepaLlmConfig(PretrainedConfig):
|
| 6 |
+
model_type = "jepa_llm"
|
| 7 |
+
sub_configs = {"text_config": AutoConfig}
|
| 8 |
+
|
| 9 |
+
def __init__(self, text_config=None, vision_config=None, num_frames: int = 32, image_size: int = 384,
|
| 10 |
+
evidence_cells: int = 8, vision_levels: int = 4, vision_level_dim: int = 1408, spectral_k: int = 2048,
|
| 11 |
+
bridge_hidden: int = 2048, max_tubelets: int = 64, time_dim: int = 64, rope_inv_freq_bf16: bool = True,
|
| 12 |
+
**kwargs):
|
| 13 |
+
if isinstance(text_config, dict):
|
| 14 |
+
text_config = dict(text_config)
|
| 15 |
+
text_config.setdefault("model_type", "qwen3")
|
| 16 |
+
from transformers import CONFIG_MAPPING
|
| 17 |
+
text_config = CONFIG_MAPPING[text_config["model_type"]](**text_config)
|
| 18 |
+
elif text_config is None:
|
| 19 |
+
from transformers import CONFIG_MAPPING
|
| 20 |
+
text_config = CONFIG_MAPPING["qwen3"]()
|
| 21 |
+
self.text_config = text_config
|
| 22 |
+
# V-JEPA 2.1 ViT-g/16 encoder (vjepa2_1_encoder.vjepa2_1_vit_giant_384); keys override its defaults
|
| 23 |
+
self.vision_config = dict(vision_config or {})
|
| 24 |
+
self.num_frames = num_frames # frames per clip (16 tubelets of 2 frames)
|
| 25 |
+
self.image_size = image_size # square crop side, pixels
|
| 26 |
+
self.evidence_cells = evidence_cells # the 24 x 24 patch grid pooled to cells x cells per tubelet
|
| 27 |
+
self.vision_levels = vision_levels # encoder output levels (blocks 9 / 19 / 29 / 39)
|
| 28 |
+
self.vision_level_dim = vision_level_dim
|
| 29 |
+
self.spectral_k = spectral_k # principal directions kept by the equalisation
|
| 30 |
+
self.bridge_hidden = bridge_hidden
|
| 31 |
+
self.max_tubelets = max_tubelets
|
| 32 |
+
self.time_dim = time_dim
|
| 33 |
+
# True: the LLM's rotary frequencies are rounded to bf16 (what casting the whole model to bf16 does), as in the
|
| 34 |
+
# evaluation setup this export reproduces. False: fp32 rotary frequencies (the Qwen3 default for a bf16 load).
|
| 35 |
+
self.rope_inv_freq_bf16 = bool(rope_inv_freq_bf16)
|
| 36 |
+
kwargs.setdefault("tie_word_embeddings", getattr(text_config, "tie_word_embeddings", True))
|
| 37 |
+
super().__init__(**kwargs)
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model-00001-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab77ecd9775d48de6fb8fbe423c7004873d3ca191454ed3ab57538973d0eb868
|
| 3 |
+
size 4283385352
|
model-00002-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3d3f7b66f8d552fc8024617bd4a613ddb345fa4f8cde87364f2db3e39894e0df
|
| 3 |
+
size 4291554432
|
model-00003-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:98808f4353bb8abb161d4d38f53e49d0ebdf3bd6f1373ea4c9038dd402c3255c
|
| 3 |
+
size 1562479600
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,916 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata": {
|
| 3 |
+
"total_size": 10137310208
|
| 4 |
+
},
|
| 5 |
+
"weight_map": {
|
| 6 |
+
"vision_encoder.img_mod_embed": "model-00001-of-00003.safetensors",
|
| 7 |
+
"vision_encoder.video_mod_embed": "model-00001-of-00003.safetensors",
|
| 8 |
+
"vision_encoder.patch_embed.proj.weight": "model-00001-of-00003.safetensors",
|
| 9 |
+
"vision_encoder.patch_embed.proj.bias": "model-00001-of-00003.safetensors",
|
| 10 |
+
"vision_encoder.patch_embed_img.proj.weight": "model-00001-of-00003.safetensors",
|
| 11 |
+
"vision_encoder.patch_embed_img.proj.bias": "model-00001-of-00003.safetensors",
|
| 12 |
+
"vision_encoder.blocks.0.norm1.weight": "model-00001-of-00003.safetensors",
|
| 13 |
+
"vision_encoder.blocks.0.norm1.bias": "model-00001-of-00003.safetensors",
|
| 14 |
+
"vision_encoder.blocks.0.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 15 |
+
"vision_encoder.blocks.0.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 16 |
+
"vision_encoder.blocks.0.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 17 |
+
"vision_encoder.blocks.0.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 18 |
+
"vision_encoder.blocks.0.norm2.weight": "model-00001-of-00003.safetensors",
|
| 19 |
+
"vision_encoder.blocks.0.norm2.bias": "model-00001-of-00003.safetensors",
|
| 20 |
+
"vision_encoder.blocks.0.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 21 |
+
"vision_encoder.blocks.0.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 22 |
+
"vision_encoder.blocks.0.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 23 |
+
"vision_encoder.blocks.0.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 24 |
+
"vision_encoder.blocks.1.norm1.weight": "model-00001-of-00003.safetensors",
|
| 25 |
+
"vision_encoder.blocks.1.norm1.bias": "model-00001-of-00003.safetensors",
|
| 26 |
+
"vision_encoder.blocks.1.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 27 |
+
"vision_encoder.blocks.1.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 28 |
+
"vision_encoder.blocks.1.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 29 |
+
"vision_encoder.blocks.1.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 30 |
+
"vision_encoder.blocks.1.norm2.weight": "model-00001-of-00003.safetensors",
|
| 31 |
+
"vision_encoder.blocks.1.norm2.bias": "model-00001-of-00003.safetensors",
|
| 32 |
+
"vision_encoder.blocks.1.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 33 |
+
"vision_encoder.blocks.1.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 34 |
+
"vision_encoder.blocks.1.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 35 |
+
"vision_encoder.blocks.1.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 36 |
+
"vision_encoder.blocks.2.norm1.weight": "model-00001-of-00003.safetensors",
|
| 37 |
+
"vision_encoder.blocks.2.norm1.bias": "model-00001-of-00003.safetensors",
|
| 38 |
+
"vision_encoder.blocks.2.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 39 |
+
"vision_encoder.blocks.2.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 40 |
+
"vision_encoder.blocks.2.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 41 |
+
"vision_encoder.blocks.2.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 42 |
+
"vision_encoder.blocks.2.norm2.weight": "model-00001-of-00003.safetensors",
|
| 43 |
+
"vision_encoder.blocks.2.norm2.bias": "model-00001-of-00003.safetensors",
|
| 44 |
+
"vision_encoder.blocks.2.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 45 |
+
"vision_encoder.blocks.2.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 46 |
+
"vision_encoder.blocks.2.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 47 |
+
"vision_encoder.blocks.2.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 48 |
+
"vision_encoder.blocks.3.norm1.weight": "model-00001-of-00003.safetensors",
|
| 49 |
+
"vision_encoder.blocks.3.norm1.bias": "model-00001-of-00003.safetensors",
|
| 50 |
+
"vision_encoder.blocks.3.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 51 |
+
"vision_encoder.blocks.3.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 52 |
+
"vision_encoder.blocks.3.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 53 |
+
"vision_encoder.blocks.3.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 54 |
+
"vision_encoder.blocks.3.norm2.weight": "model-00001-of-00003.safetensors",
|
| 55 |
+
"vision_encoder.blocks.3.norm2.bias": "model-00001-of-00003.safetensors",
|
| 56 |
+
"vision_encoder.blocks.3.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 57 |
+
"vision_encoder.blocks.3.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 58 |
+
"vision_encoder.blocks.3.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 59 |
+
"vision_encoder.blocks.3.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 60 |
+
"vision_encoder.blocks.4.norm1.weight": "model-00001-of-00003.safetensors",
|
| 61 |
+
"vision_encoder.blocks.4.norm1.bias": "model-00001-of-00003.safetensors",
|
| 62 |
+
"vision_encoder.blocks.4.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 63 |
+
"vision_encoder.blocks.4.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 64 |
+
"vision_encoder.blocks.4.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 65 |
+
"vision_encoder.blocks.4.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 66 |
+
"vision_encoder.blocks.4.norm2.weight": "model-00001-of-00003.safetensors",
|
| 67 |
+
"vision_encoder.blocks.4.norm2.bias": "model-00001-of-00003.safetensors",
|
| 68 |
+
"vision_encoder.blocks.4.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 69 |
+
"vision_encoder.blocks.4.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 70 |
+
"vision_encoder.blocks.4.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 71 |
+
"vision_encoder.blocks.4.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 72 |
+
"vision_encoder.blocks.5.norm1.weight": "model-00001-of-00003.safetensors",
|
| 73 |
+
"vision_encoder.blocks.5.norm1.bias": "model-00001-of-00003.safetensors",
|
| 74 |
+
"vision_encoder.blocks.5.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 75 |
+
"vision_encoder.blocks.5.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 76 |
+
"vision_encoder.blocks.5.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 77 |
+
"vision_encoder.blocks.5.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 78 |
+
"vision_encoder.blocks.5.norm2.weight": "model-00001-of-00003.safetensors",
|
| 79 |
+
"vision_encoder.blocks.5.norm2.bias": "model-00001-of-00003.safetensors",
|
| 80 |
+
"vision_encoder.blocks.5.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 81 |
+
"vision_encoder.blocks.5.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 82 |
+
"vision_encoder.blocks.5.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 83 |
+
"vision_encoder.blocks.5.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 84 |
+
"vision_encoder.blocks.6.norm1.weight": "model-00001-of-00003.safetensors",
|
| 85 |
+
"vision_encoder.blocks.6.norm1.bias": "model-00001-of-00003.safetensors",
|
| 86 |
+
"vision_encoder.blocks.6.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 87 |
+
"vision_encoder.blocks.6.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 88 |
+
"vision_encoder.blocks.6.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 89 |
+
"vision_encoder.blocks.6.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 90 |
+
"vision_encoder.blocks.6.norm2.weight": "model-00001-of-00003.safetensors",
|
| 91 |
+
"vision_encoder.blocks.6.norm2.bias": "model-00001-of-00003.safetensors",
|
| 92 |
+
"vision_encoder.blocks.6.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 93 |
+
"vision_encoder.blocks.6.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 94 |
+
"vision_encoder.blocks.6.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 95 |
+
"vision_encoder.blocks.6.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 96 |
+
"vision_encoder.blocks.7.norm1.weight": "model-00001-of-00003.safetensors",
|
| 97 |
+
"vision_encoder.blocks.7.norm1.bias": "model-00001-of-00003.safetensors",
|
| 98 |
+
"vision_encoder.blocks.7.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 99 |
+
"vision_encoder.blocks.7.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 100 |
+
"vision_encoder.blocks.7.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 101 |
+
"vision_encoder.blocks.7.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 102 |
+
"vision_encoder.blocks.7.norm2.weight": "model-00001-of-00003.safetensors",
|
| 103 |
+
"vision_encoder.blocks.7.norm2.bias": "model-00001-of-00003.safetensors",
|
| 104 |
+
"vision_encoder.blocks.7.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 105 |
+
"vision_encoder.blocks.7.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 106 |
+
"vision_encoder.blocks.7.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 107 |
+
"vision_encoder.blocks.7.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 108 |
+
"vision_encoder.blocks.8.norm1.weight": "model-00001-of-00003.safetensors",
|
| 109 |
+
"vision_encoder.blocks.8.norm1.bias": "model-00001-of-00003.safetensors",
|
| 110 |
+
"vision_encoder.blocks.8.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 111 |
+
"vision_encoder.blocks.8.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 112 |
+
"vision_encoder.blocks.8.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 113 |
+
"vision_encoder.blocks.8.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 114 |
+
"vision_encoder.blocks.8.norm2.weight": "model-00001-of-00003.safetensors",
|
| 115 |
+
"vision_encoder.blocks.8.norm2.bias": "model-00001-of-00003.safetensors",
|
| 116 |
+
"vision_encoder.blocks.8.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 117 |
+
"vision_encoder.blocks.8.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 118 |
+
"vision_encoder.blocks.8.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 119 |
+
"vision_encoder.blocks.8.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 120 |
+
"vision_encoder.blocks.9.norm1.weight": "model-00001-of-00003.safetensors",
|
| 121 |
+
"vision_encoder.blocks.9.norm1.bias": "model-00001-of-00003.safetensors",
|
| 122 |
+
"vision_encoder.blocks.9.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 123 |
+
"vision_encoder.blocks.9.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 124 |
+
"vision_encoder.blocks.9.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 125 |
+
"vision_encoder.blocks.9.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 126 |
+
"vision_encoder.blocks.9.norm2.weight": "model-00001-of-00003.safetensors",
|
| 127 |
+
"vision_encoder.blocks.9.norm2.bias": "model-00001-of-00003.safetensors",
|
| 128 |
+
"vision_encoder.blocks.9.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 129 |
+
"vision_encoder.blocks.9.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 130 |
+
"vision_encoder.blocks.9.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 131 |
+
"vision_encoder.blocks.9.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 132 |
+
"vision_encoder.blocks.10.norm1.weight": "model-00001-of-00003.safetensors",
|
| 133 |
+
"vision_encoder.blocks.10.norm1.bias": "model-00001-of-00003.safetensors",
|
| 134 |
+
"vision_encoder.blocks.10.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 135 |
+
"vision_encoder.blocks.10.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 136 |
+
"vision_encoder.blocks.10.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 137 |
+
"vision_encoder.blocks.10.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 138 |
+
"vision_encoder.blocks.10.norm2.weight": "model-00001-of-00003.safetensors",
|
| 139 |
+
"vision_encoder.blocks.10.norm2.bias": "model-00001-of-00003.safetensors",
|
| 140 |
+
"vision_encoder.blocks.10.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 141 |
+
"vision_encoder.blocks.10.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 142 |
+
"vision_encoder.blocks.10.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 143 |
+
"vision_encoder.blocks.10.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 144 |
+
"vision_encoder.blocks.11.norm1.weight": "model-00001-of-00003.safetensors",
|
| 145 |
+
"vision_encoder.blocks.11.norm1.bias": "model-00001-of-00003.safetensors",
|
| 146 |
+
"vision_encoder.blocks.11.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 147 |
+
"vision_encoder.blocks.11.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 148 |
+
"vision_encoder.blocks.11.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 149 |
+
"vision_encoder.blocks.11.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 150 |
+
"vision_encoder.blocks.11.norm2.weight": "model-00001-of-00003.safetensors",
|
| 151 |
+
"vision_encoder.blocks.11.norm2.bias": "model-00001-of-00003.safetensors",
|
| 152 |
+
"vision_encoder.blocks.11.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 153 |
+
"vision_encoder.blocks.11.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 154 |
+
"vision_encoder.blocks.11.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 155 |
+
"vision_encoder.blocks.11.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 156 |
+
"vision_encoder.blocks.12.norm1.weight": "model-00001-of-00003.safetensors",
|
| 157 |
+
"vision_encoder.blocks.12.norm1.bias": "model-00001-of-00003.safetensors",
|
| 158 |
+
"vision_encoder.blocks.12.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 159 |
+
"vision_encoder.blocks.12.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 160 |
+
"vision_encoder.blocks.12.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 161 |
+
"vision_encoder.blocks.12.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 162 |
+
"vision_encoder.blocks.12.norm2.weight": "model-00001-of-00003.safetensors",
|
| 163 |
+
"vision_encoder.blocks.12.norm2.bias": "model-00001-of-00003.safetensors",
|
| 164 |
+
"vision_encoder.blocks.12.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 165 |
+
"vision_encoder.blocks.12.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 166 |
+
"vision_encoder.blocks.12.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 167 |
+
"vision_encoder.blocks.12.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 168 |
+
"vision_encoder.blocks.13.norm1.weight": "model-00001-of-00003.safetensors",
|
| 169 |
+
"vision_encoder.blocks.13.norm1.bias": "model-00001-of-00003.safetensors",
|
| 170 |
+
"vision_encoder.blocks.13.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 171 |
+
"vision_encoder.blocks.13.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 172 |
+
"vision_encoder.blocks.13.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 173 |
+
"vision_encoder.blocks.13.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 174 |
+
"vision_encoder.blocks.13.norm2.weight": "model-00001-of-00003.safetensors",
|
| 175 |
+
"vision_encoder.blocks.13.norm2.bias": "model-00001-of-00003.safetensors",
|
| 176 |
+
"vision_encoder.blocks.13.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 177 |
+
"vision_encoder.blocks.13.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 178 |
+
"vision_encoder.blocks.13.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 179 |
+
"vision_encoder.blocks.13.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 180 |
+
"vision_encoder.blocks.14.norm1.weight": "model-00001-of-00003.safetensors",
|
| 181 |
+
"vision_encoder.blocks.14.norm1.bias": "model-00001-of-00003.safetensors",
|
| 182 |
+
"vision_encoder.blocks.14.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 183 |
+
"vision_encoder.blocks.14.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 184 |
+
"vision_encoder.blocks.14.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 185 |
+
"vision_encoder.blocks.14.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 186 |
+
"vision_encoder.blocks.14.norm2.weight": "model-00001-of-00003.safetensors",
|
| 187 |
+
"vision_encoder.blocks.14.norm2.bias": "model-00001-of-00003.safetensors",
|
| 188 |
+
"vision_encoder.blocks.14.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 189 |
+
"vision_encoder.blocks.14.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 190 |
+
"vision_encoder.blocks.14.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 191 |
+
"vision_encoder.blocks.14.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 192 |
+
"vision_encoder.blocks.15.norm1.weight": "model-00001-of-00003.safetensors",
|
| 193 |
+
"vision_encoder.blocks.15.norm1.bias": "model-00001-of-00003.safetensors",
|
| 194 |
+
"vision_encoder.blocks.15.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 195 |
+
"vision_encoder.blocks.15.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 196 |
+
"vision_encoder.blocks.15.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 197 |
+
"vision_encoder.blocks.15.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 198 |
+
"vision_encoder.blocks.15.norm2.weight": "model-00001-of-00003.safetensors",
|
| 199 |
+
"vision_encoder.blocks.15.norm2.bias": "model-00001-of-00003.safetensors",
|
| 200 |
+
"vision_encoder.blocks.15.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 201 |
+
"vision_encoder.blocks.15.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 202 |
+
"vision_encoder.blocks.15.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 203 |
+
"vision_encoder.blocks.15.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 204 |
+
"vision_encoder.blocks.16.norm1.weight": "model-00001-of-00003.safetensors",
|
| 205 |
+
"vision_encoder.blocks.16.norm1.bias": "model-00001-of-00003.safetensors",
|
| 206 |
+
"vision_encoder.blocks.16.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 207 |
+
"vision_encoder.blocks.16.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 208 |
+
"vision_encoder.blocks.16.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 209 |
+
"vision_encoder.blocks.16.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 210 |
+
"vision_encoder.blocks.16.norm2.weight": "model-00001-of-00003.safetensors",
|
| 211 |
+
"vision_encoder.blocks.16.norm2.bias": "model-00001-of-00003.safetensors",
|
| 212 |
+
"vision_encoder.blocks.16.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 213 |
+
"vision_encoder.blocks.16.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 214 |
+
"vision_encoder.blocks.16.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 215 |
+
"vision_encoder.blocks.16.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 216 |
+
"vision_encoder.blocks.17.norm1.weight": "model-00001-of-00003.safetensors",
|
| 217 |
+
"vision_encoder.blocks.17.norm1.bias": "model-00001-of-00003.safetensors",
|
| 218 |
+
"vision_encoder.blocks.17.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 219 |
+
"vision_encoder.blocks.17.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 220 |
+
"vision_encoder.blocks.17.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 221 |
+
"vision_encoder.blocks.17.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 222 |
+
"vision_encoder.blocks.17.norm2.weight": "model-00001-of-00003.safetensors",
|
| 223 |
+
"vision_encoder.blocks.17.norm2.bias": "model-00001-of-00003.safetensors",
|
| 224 |
+
"vision_encoder.blocks.17.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 225 |
+
"vision_encoder.blocks.17.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 226 |
+
"vision_encoder.blocks.17.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 227 |
+
"vision_encoder.blocks.17.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 228 |
+
"vision_encoder.blocks.18.norm1.weight": "model-00001-of-00003.safetensors",
|
| 229 |
+
"vision_encoder.blocks.18.norm1.bias": "model-00001-of-00003.safetensors",
|
| 230 |
+
"vision_encoder.blocks.18.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 231 |
+
"vision_encoder.blocks.18.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 232 |
+
"vision_encoder.blocks.18.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 233 |
+
"vision_encoder.blocks.18.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 234 |
+
"vision_encoder.blocks.18.norm2.weight": "model-00001-of-00003.safetensors",
|
| 235 |
+
"vision_encoder.blocks.18.norm2.bias": "model-00001-of-00003.safetensors",
|
| 236 |
+
"vision_encoder.blocks.18.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 237 |
+
"vision_encoder.blocks.18.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 238 |
+
"vision_encoder.blocks.18.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 239 |
+
"vision_encoder.blocks.18.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 240 |
+
"vision_encoder.blocks.19.norm1.weight": "model-00001-of-00003.safetensors",
|
| 241 |
+
"vision_encoder.blocks.19.norm1.bias": "model-00001-of-00003.safetensors",
|
| 242 |
+
"vision_encoder.blocks.19.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 243 |
+
"vision_encoder.blocks.19.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 244 |
+
"vision_encoder.blocks.19.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 245 |
+
"vision_encoder.blocks.19.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 246 |
+
"vision_encoder.blocks.19.norm2.weight": "model-00001-of-00003.safetensors",
|
| 247 |
+
"vision_encoder.blocks.19.norm2.bias": "model-00001-of-00003.safetensors",
|
| 248 |
+
"vision_encoder.blocks.19.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 249 |
+
"vision_encoder.blocks.19.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 250 |
+
"vision_encoder.blocks.19.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 251 |
+
"vision_encoder.blocks.19.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 252 |
+
"vision_encoder.blocks.20.norm1.weight": "model-00001-of-00003.safetensors",
|
| 253 |
+
"vision_encoder.blocks.20.norm1.bias": "model-00001-of-00003.safetensors",
|
| 254 |
+
"vision_encoder.blocks.20.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 255 |
+
"vision_encoder.blocks.20.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 256 |
+
"vision_encoder.blocks.20.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 257 |
+
"vision_encoder.blocks.20.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 258 |
+
"vision_encoder.blocks.20.norm2.weight": "model-00001-of-00003.safetensors",
|
| 259 |
+
"vision_encoder.blocks.20.norm2.bias": "model-00001-of-00003.safetensors",
|
| 260 |
+
"vision_encoder.blocks.20.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 261 |
+
"vision_encoder.blocks.20.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 262 |
+
"vision_encoder.blocks.20.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 263 |
+
"vision_encoder.blocks.20.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 264 |
+
"vision_encoder.blocks.21.norm1.weight": "model-00001-of-00003.safetensors",
|
| 265 |
+
"vision_encoder.blocks.21.norm1.bias": "model-00001-of-00003.safetensors",
|
| 266 |
+
"vision_encoder.blocks.21.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 267 |
+
"vision_encoder.blocks.21.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 268 |
+
"vision_encoder.blocks.21.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 269 |
+
"vision_encoder.blocks.21.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 270 |
+
"vision_encoder.blocks.21.norm2.weight": "model-00001-of-00003.safetensors",
|
| 271 |
+
"vision_encoder.blocks.21.norm2.bias": "model-00001-of-00003.safetensors",
|
| 272 |
+
"vision_encoder.blocks.21.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 273 |
+
"vision_encoder.blocks.21.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 274 |
+
"vision_encoder.blocks.21.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 275 |
+
"vision_encoder.blocks.21.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 276 |
+
"vision_encoder.blocks.22.norm1.weight": "model-00001-of-00003.safetensors",
|
| 277 |
+
"vision_encoder.blocks.22.norm1.bias": "model-00001-of-00003.safetensors",
|
| 278 |
+
"vision_encoder.blocks.22.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 279 |
+
"vision_encoder.blocks.22.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 280 |
+
"vision_encoder.blocks.22.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 281 |
+
"vision_encoder.blocks.22.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 282 |
+
"vision_encoder.blocks.22.norm2.weight": "model-00001-of-00003.safetensors",
|
| 283 |
+
"vision_encoder.blocks.22.norm2.bias": "model-00001-of-00003.safetensors",
|
| 284 |
+
"vision_encoder.blocks.22.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 285 |
+
"vision_encoder.blocks.22.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 286 |
+
"vision_encoder.blocks.22.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 287 |
+
"vision_encoder.blocks.22.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 288 |
+
"vision_encoder.blocks.23.norm1.weight": "model-00001-of-00003.safetensors",
|
| 289 |
+
"vision_encoder.blocks.23.norm1.bias": "model-00001-of-00003.safetensors",
|
| 290 |
+
"vision_encoder.blocks.23.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 291 |
+
"vision_encoder.blocks.23.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 292 |
+
"vision_encoder.blocks.23.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 293 |
+
"vision_encoder.blocks.23.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 294 |
+
"vision_encoder.blocks.23.norm2.weight": "model-00001-of-00003.safetensors",
|
| 295 |
+
"vision_encoder.blocks.23.norm2.bias": "model-00001-of-00003.safetensors",
|
| 296 |
+
"vision_encoder.blocks.23.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 297 |
+
"vision_encoder.blocks.23.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 298 |
+
"vision_encoder.blocks.23.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 299 |
+
"vision_encoder.blocks.23.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 300 |
+
"vision_encoder.blocks.24.norm1.weight": "model-00001-of-00003.safetensors",
|
| 301 |
+
"vision_encoder.blocks.24.norm1.bias": "model-00001-of-00003.safetensors",
|
| 302 |
+
"vision_encoder.blocks.24.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 303 |
+
"vision_encoder.blocks.24.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 304 |
+
"vision_encoder.blocks.24.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 305 |
+
"vision_encoder.blocks.24.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 306 |
+
"vision_encoder.blocks.24.norm2.weight": "model-00001-of-00003.safetensors",
|
| 307 |
+
"vision_encoder.blocks.24.norm2.bias": "model-00001-of-00003.safetensors",
|
| 308 |
+
"vision_encoder.blocks.24.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 309 |
+
"vision_encoder.blocks.24.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 310 |
+
"vision_encoder.blocks.24.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 311 |
+
"vision_encoder.blocks.24.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 312 |
+
"vision_encoder.blocks.25.norm1.weight": "model-00001-of-00003.safetensors",
|
| 313 |
+
"vision_encoder.blocks.25.norm1.bias": "model-00001-of-00003.safetensors",
|
| 314 |
+
"vision_encoder.blocks.25.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 315 |
+
"vision_encoder.blocks.25.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 316 |
+
"vision_encoder.blocks.25.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 317 |
+
"vision_encoder.blocks.25.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 318 |
+
"vision_encoder.blocks.25.norm2.weight": "model-00001-of-00003.safetensors",
|
| 319 |
+
"vision_encoder.blocks.25.norm2.bias": "model-00001-of-00003.safetensors",
|
| 320 |
+
"vision_encoder.blocks.25.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 321 |
+
"vision_encoder.blocks.25.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 322 |
+
"vision_encoder.blocks.25.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 323 |
+
"vision_encoder.blocks.25.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 324 |
+
"vision_encoder.blocks.26.norm1.weight": "model-00001-of-00003.safetensors",
|
| 325 |
+
"vision_encoder.blocks.26.norm1.bias": "model-00001-of-00003.safetensors",
|
| 326 |
+
"vision_encoder.blocks.26.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 327 |
+
"vision_encoder.blocks.26.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 328 |
+
"vision_encoder.blocks.26.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 329 |
+
"vision_encoder.blocks.26.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 330 |
+
"vision_encoder.blocks.26.norm2.weight": "model-00001-of-00003.safetensors",
|
| 331 |
+
"vision_encoder.blocks.26.norm2.bias": "model-00001-of-00003.safetensors",
|
| 332 |
+
"vision_encoder.blocks.26.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 333 |
+
"vision_encoder.blocks.26.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 334 |
+
"vision_encoder.blocks.26.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 335 |
+
"vision_encoder.blocks.26.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 336 |
+
"vision_encoder.blocks.27.norm1.weight": "model-00001-of-00003.safetensors",
|
| 337 |
+
"vision_encoder.blocks.27.norm1.bias": "model-00001-of-00003.safetensors",
|
| 338 |
+
"vision_encoder.blocks.27.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 339 |
+
"vision_encoder.blocks.27.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 340 |
+
"vision_encoder.blocks.27.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 341 |
+
"vision_encoder.blocks.27.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 342 |
+
"vision_encoder.blocks.27.norm2.weight": "model-00001-of-00003.safetensors",
|
| 343 |
+
"vision_encoder.blocks.27.norm2.bias": "model-00001-of-00003.safetensors",
|
| 344 |
+
"vision_encoder.blocks.27.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 345 |
+
"vision_encoder.blocks.27.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 346 |
+
"vision_encoder.blocks.27.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 347 |
+
"vision_encoder.blocks.27.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 348 |
+
"vision_encoder.blocks.28.norm1.weight": "model-00001-of-00003.safetensors",
|
| 349 |
+
"vision_encoder.blocks.28.norm1.bias": "model-00001-of-00003.safetensors",
|
| 350 |
+
"vision_encoder.blocks.28.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 351 |
+
"vision_encoder.blocks.28.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 352 |
+
"vision_encoder.blocks.28.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 353 |
+
"vision_encoder.blocks.28.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 354 |
+
"vision_encoder.blocks.28.norm2.weight": "model-00001-of-00003.safetensors",
|
| 355 |
+
"vision_encoder.blocks.28.norm2.bias": "model-00001-of-00003.safetensors",
|
| 356 |
+
"vision_encoder.blocks.28.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 357 |
+
"vision_encoder.blocks.28.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 358 |
+
"vision_encoder.blocks.28.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 359 |
+
"vision_encoder.blocks.28.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 360 |
+
"vision_encoder.blocks.29.norm1.weight": "model-00001-of-00003.safetensors",
|
| 361 |
+
"vision_encoder.blocks.29.norm1.bias": "model-00001-of-00003.safetensors",
|
| 362 |
+
"vision_encoder.blocks.29.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 363 |
+
"vision_encoder.blocks.29.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 364 |
+
"vision_encoder.blocks.29.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 365 |
+
"vision_encoder.blocks.29.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 366 |
+
"vision_encoder.blocks.29.norm2.weight": "model-00001-of-00003.safetensors",
|
| 367 |
+
"vision_encoder.blocks.29.norm2.bias": "model-00001-of-00003.safetensors",
|
| 368 |
+
"vision_encoder.blocks.29.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 369 |
+
"vision_encoder.blocks.29.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 370 |
+
"vision_encoder.blocks.29.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 371 |
+
"vision_encoder.blocks.29.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 372 |
+
"vision_encoder.blocks.30.norm1.weight": "model-00001-of-00003.safetensors",
|
| 373 |
+
"vision_encoder.blocks.30.norm1.bias": "model-00001-of-00003.safetensors",
|
| 374 |
+
"vision_encoder.blocks.30.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 375 |
+
"vision_encoder.blocks.30.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 376 |
+
"vision_encoder.blocks.30.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 377 |
+
"vision_encoder.blocks.30.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 378 |
+
"vision_encoder.blocks.30.norm2.weight": "model-00001-of-00003.safetensors",
|
| 379 |
+
"vision_encoder.blocks.30.norm2.bias": "model-00001-of-00003.safetensors",
|
| 380 |
+
"vision_encoder.blocks.30.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 381 |
+
"vision_encoder.blocks.30.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 382 |
+
"vision_encoder.blocks.30.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 383 |
+
"vision_encoder.blocks.30.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 384 |
+
"vision_encoder.blocks.31.norm1.weight": "model-00001-of-00003.safetensors",
|
| 385 |
+
"vision_encoder.blocks.31.norm1.bias": "model-00001-of-00003.safetensors",
|
| 386 |
+
"vision_encoder.blocks.31.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 387 |
+
"vision_encoder.blocks.31.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 388 |
+
"vision_encoder.blocks.31.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 389 |
+
"vision_encoder.blocks.31.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 390 |
+
"vision_encoder.blocks.31.norm2.weight": "model-00001-of-00003.safetensors",
|
| 391 |
+
"vision_encoder.blocks.31.norm2.bias": "model-00001-of-00003.safetensors",
|
| 392 |
+
"vision_encoder.blocks.31.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 393 |
+
"vision_encoder.blocks.31.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 394 |
+
"vision_encoder.blocks.31.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 395 |
+
"vision_encoder.blocks.31.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 396 |
+
"vision_encoder.blocks.32.norm1.weight": "model-00001-of-00003.safetensors",
|
| 397 |
+
"vision_encoder.blocks.32.norm1.bias": "model-00001-of-00003.safetensors",
|
| 398 |
+
"vision_encoder.blocks.32.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 399 |
+
"vision_encoder.blocks.32.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 400 |
+
"vision_encoder.blocks.32.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 401 |
+
"vision_encoder.blocks.32.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 402 |
+
"vision_encoder.blocks.32.norm2.weight": "model-00001-of-00003.safetensors",
|
| 403 |
+
"vision_encoder.blocks.32.norm2.bias": "model-00001-of-00003.safetensors",
|
| 404 |
+
"vision_encoder.blocks.32.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 405 |
+
"vision_encoder.blocks.32.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 406 |
+
"vision_encoder.blocks.32.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 407 |
+
"vision_encoder.blocks.32.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 408 |
+
"vision_encoder.blocks.33.norm1.weight": "model-00001-of-00003.safetensors",
|
| 409 |
+
"vision_encoder.blocks.33.norm1.bias": "model-00001-of-00003.safetensors",
|
| 410 |
+
"vision_encoder.blocks.33.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 411 |
+
"vision_encoder.blocks.33.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 412 |
+
"vision_encoder.blocks.33.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 413 |
+
"vision_encoder.blocks.33.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 414 |
+
"vision_encoder.blocks.33.norm2.weight": "model-00001-of-00003.safetensors",
|
| 415 |
+
"vision_encoder.blocks.33.norm2.bias": "model-00001-of-00003.safetensors",
|
| 416 |
+
"vision_encoder.blocks.33.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 417 |
+
"vision_encoder.blocks.33.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 418 |
+
"vision_encoder.blocks.33.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 419 |
+
"vision_encoder.blocks.33.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 420 |
+
"vision_encoder.blocks.34.norm1.weight": "model-00001-of-00003.safetensors",
|
| 421 |
+
"vision_encoder.blocks.34.norm1.bias": "model-00001-of-00003.safetensors",
|
| 422 |
+
"vision_encoder.blocks.34.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 423 |
+
"vision_encoder.blocks.34.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 424 |
+
"vision_encoder.blocks.34.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 425 |
+
"vision_encoder.blocks.34.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 426 |
+
"vision_encoder.blocks.34.norm2.weight": "model-00001-of-00003.safetensors",
|
| 427 |
+
"vision_encoder.blocks.34.norm2.bias": "model-00001-of-00003.safetensors",
|
| 428 |
+
"vision_encoder.blocks.34.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 429 |
+
"vision_encoder.blocks.34.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 430 |
+
"vision_encoder.blocks.34.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 431 |
+
"vision_encoder.blocks.34.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 432 |
+
"vision_encoder.blocks.35.norm1.weight": "model-00001-of-00003.safetensors",
|
| 433 |
+
"vision_encoder.blocks.35.norm1.bias": "model-00001-of-00003.safetensors",
|
| 434 |
+
"vision_encoder.blocks.35.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 435 |
+
"vision_encoder.blocks.35.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 436 |
+
"vision_encoder.blocks.35.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 437 |
+
"vision_encoder.blocks.35.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 438 |
+
"vision_encoder.blocks.35.norm2.weight": "model-00001-of-00003.safetensors",
|
| 439 |
+
"vision_encoder.blocks.35.norm2.bias": "model-00001-of-00003.safetensors",
|
| 440 |
+
"vision_encoder.blocks.35.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 441 |
+
"vision_encoder.blocks.35.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 442 |
+
"vision_encoder.blocks.35.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 443 |
+
"vision_encoder.blocks.35.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 444 |
+
"vision_encoder.blocks.36.norm1.weight": "model-00001-of-00003.safetensors",
|
| 445 |
+
"vision_encoder.blocks.36.norm1.bias": "model-00001-of-00003.safetensors",
|
| 446 |
+
"vision_encoder.blocks.36.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 447 |
+
"vision_encoder.blocks.36.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 448 |
+
"vision_encoder.blocks.36.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 449 |
+
"vision_encoder.blocks.36.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 450 |
+
"vision_encoder.blocks.36.norm2.weight": "model-00001-of-00003.safetensors",
|
| 451 |
+
"vision_encoder.blocks.36.norm2.bias": "model-00001-of-00003.safetensors",
|
| 452 |
+
"vision_encoder.blocks.36.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 453 |
+
"vision_encoder.blocks.36.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 454 |
+
"vision_encoder.blocks.36.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 455 |
+
"vision_encoder.blocks.36.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 456 |
+
"vision_encoder.blocks.37.norm1.weight": "model-00001-of-00003.safetensors",
|
| 457 |
+
"vision_encoder.blocks.37.norm1.bias": "model-00001-of-00003.safetensors",
|
| 458 |
+
"vision_encoder.blocks.37.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 459 |
+
"vision_encoder.blocks.37.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 460 |
+
"vision_encoder.blocks.37.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 461 |
+
"vision_encoder.blocks.37.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 462 |
+
"vision_encoder.blocks.37.norm2.weight": "model-00001-of-00003.safetensors",
|
| 463 |
+
"vision_encoder.blocks.37.norm2.bias": "model-00001-of-00003.safetensors",
|
| 464 |
+
"vision_encoder.blocks.37.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 465 |
+
"vision_encoder.blocks.37.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 466 |
+
"vision_encoder.blocks.37.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 467 |
+
"vision_encoder.blocks.37.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 468 |
+
"vision_encoder.blocks.38.norm1.weight": "model-00001-of-00003.safetensors",
|
| 469 |
+
"vision_encoder.blocks.38.norm1.bias": "model-00001-of-00003.safetensors",
|
| 470 |
+
"vision_encoder.blocks.38.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 471 |
+
"vision_encoder.blocks.38.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 472 |
+
"vision_encoder.blocks.38.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 473 |
+
"vision_encoder.blocks.38.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 474 |
+
"vision_encoder.blocks.38.norm2.weight": "model-00001-of-00003.safetensors",
|
| 475 |
+
"vision_encoder.blocks.38.norm2.bias": "model-00001-of-00003.safetensors",
|
| 476 |
+
"vision_encoder.blocks.38.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 477 |
+
"vision_encoder.blocks.38.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 478 |
+
"vision_encoder.blocks.38.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 479 |
+
"vision_encoder.blocks.38.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 480 |
+
"vision_encoder.blocks.39.norm1.weight": "model-00001-of-00003.safetensors",
|
| 481 |
+
"vision_encoder.blocks.39.norm1.bias": "model-00001-of-00003.safetensors",
|
| 482 |
+
"vision_encoder.blocks.39.attn.qkv.weight": "model-00001-of-00003.safetensors",
|
| 483 |
+
"vision_encoder.blocks.39.attn.qkv.bias": "model-00001-of-00003.safetensors",
|
| 484 |
+
"vision_encoder.blocks.39.attn.proj.weight": "model-00001-of-00003.safetensors",
|
| 485 |
+
"vision_encoder.blocks.39.attn.proj.bias": "model-00001-of-00003.safetensors",
|
| 486 |
+
"vision_encoder.blocks.39.norm2.weight": "model-00001-of-00003.safetensors",
|
| 487 |
+
"vision_encoder.blocks.39.norm2.bias": "model-00001-of-00003.safetensors",
|
| 488 |
+
"vision_encoder.blocks.39.mlp.fc1.weight": "model-00001-of-00003.safetensors",
|
| 489 |
+
"vision_encoder.blocks.39.mlp.fc1.bias": "model-00001-of-00003.safetensors",
|
| 490 |
+
"vision_encoder.blocks.39.mlp.fc2.weight": "model-00001-of-00003.safetensors",
|
| 491 |
+
"vision_encoder.blocks.39.mlp.fc2.bias": "model-00001-of-00003.safetensors",
|
| 492 |
+
"vision_encoder.norms_block.0.weight": "model-00001-of-00003.safetensors",
|
| 493 |
+
"vision_encoder.norms_block.0.bias": "model-00001-of-00003.safetensors",
|
| 494 |
+
"vision_encoder.norms_block.1.weight": "model-00001-of-00003.safetensors",
|
| 495 |
+
"vision_encoder.norms_block.1.bias": "model-00001-of-00003.safetensors",
|
| 496 |
+
"vision_encoder.norms_block.2.weight": "model-00001-of-00003.safetensors",
|
| 497 |
+
"vision_encoder.norms_block.2.bias": "model-00001-of-00003.safetensors",
|
| 498 |
+
"vision_encoder.norms_block.3.weight": "model-00001-of-00003.safetensors",
|
| 499 |
+
"vision_encoder.norms_block.3.bias": "model-00001-of-00003.safetensors",
|
| 500 |
+
"bridge.inp.0.0.weight": "model-00001-of-00003.safetensors",
|
| 501 |
+
"bridge.inp.0.0.bias": "model-00001-of-00003.safetensors",
|
| 502 |
+
"bridge.inp.0.1.weight": "model-00001-of-00003.safetensors",
|
| 503 |
+
"bridge.inp.0.1.bias": "model-00001-of-00003.safetensors",
|
| 504 |
+
"bridge.out.1.weight": "model-00001-of-00003.safetensors",
|
| 505 |
+
"bridge.out.1.bias": "model-00001-of-00003.safetensors",
|
| 506 |
+
"bridge.t_emb.weight": "model-00001-of-00003.safetensors",
|
| 507 |
+
"bridge.y_emb.weight": "model-00001-of-00003.safetensors",
|
| 508 |
+
"bridge.x_emb.weight": "model-00001-of-00003.safetensors",
|
| 509 |
+
"bridge.kind_emb.weight": "model-00001-of-00003.safetensors",
|
| 510 |
+
"bridge.time_proj.weight": "model-00001-of-00003.safetensors",
|
| 511 |
+
"bridge.time_proj.bias": "model-00001-of-00003.safetensors",
|
| 512 |
+
"bridge.geom_proj.weight": "model-00001-of-00003.safetensors",
|
| 513 |
+
"bridge.geom_proj.bias": "model-00001-of-00003.safetensors",
|
| 514 |
+
"bridge.spectral.mean": "model-00001-of-00003.safetensors",
|
| 515 |
+
"bridge.spectral.basis": "model-00001-of-00003.safetensors",
|
| 516 |
+
"bridge.spectral.scale": "model-00001-of-00003.safetensors",
|
| 517 |
+
"language_model.model.embed_tokens.weight": "model-00001-of-00003.safetensors",
|
| 518 |
+
"language_model.model.layers.0.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
|
| 519 |
+
"language_model.model.layers.0.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
|
| 520 |
+
"language_model.model.layers.0.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
|
| 521 |
+
"language_model.model.layers.0.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
|
| 522 |
+
"language_model.model.layers.0.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
|
| 523 |
+
"language_model.model.layers.0.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
|
| 524 |
+
"language_model.model.layers.0.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
|
| 525 |
+
"language_model.model.layers.0.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
|
| 526 |
+
"language_model.model.layers.0.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
|
| 527 |
+
"language_model.model.layers.0.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 528 |
+
"language_model.model.layers.0.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 529 |
+
"language_model.model.layers.1.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
|
| 530 |
+
"language_model.model.layers.1.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
|
| 531 |
+
"language_model.model.layers.1.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
|
| 532 |
+
"language_model.model.layers.1.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
|
| 533 |
+
"language_model.model.layers.1.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
|
| 534 |
+
"language_model.model.layers.1.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
|
| 535 |
+
"language_model.model.layers.1.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
|
| 536 |
+
"language_model.model.layers.1.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
|
| 537 |
+
"language_model.model.layers.1.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
|
| 538 |
+
"language_model.model.layers.1.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 539 |
+
"language_model.model.layers.1.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 540 |
+
"language_model.model.layers.2.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
|
| 541 |
+
"language_model.model.layers.2.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
|
| 542 |
+
"language_model.model.layers.2.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
|
| 543 |
+
"language_model.model.layers.2.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
|
| 544 |
+
"language_model.model.layers.2.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
|
| 545 |
+
"language_model.model.layers.2.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
|
| 546 |
+
"language_model.model.layers.2.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
|
| 547 |
+
"language_model.model.layers.2.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
|
| 548 |
+
"language_model.model.layers.2.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
|
| 549 |
+
"language_model.model.layers.2.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 550 |
+
"language_model.model.layers.2.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 551 |
+
"language_model.model.layers.3.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
|
| 552 |
+
"language_model.model.layers.3.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
|
| 553 |
+
"language_model.model.layers.3.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
|
| 554 |
+
"language_model.model.layers.3.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
|
| 555 |
+
"language_model.model.layers.3.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
|
| 556 |
+
"language_model.model.layers.3.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
|
| 557 |
+
"language_model.model.layers.3.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
|
| 558 |
+
"language_model.model.layers.3.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
|
| 559 |
+
"language_model.model.layers.3.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
|
| 560 |
+
"language_model.model.layers.3.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 561 |
+
"language_model.model.layers.3.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 562 |
+
"language_model.model.layers.4.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
|
| 563 |
+
"language_model.model.layers.4.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
|
| 564 |
+
"language_model.model.layers.4.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
|
| 565 |
+
"language_model.model.layers.4.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
|
| 566 |
+
"language_model.model.layers.4.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
|
| 567 |
+
"language_model.model.layers.4.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
|
| 568 |
+
"language_model.model.layers.4.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
|
| 569 |
+
"language_model.model.layers.4.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
|
| 570 |
+
"language_model.model.layers.4.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
|
| 571 |
+
"language_model.model.layers.4.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 572 |
+
"language_model.model.layers.4.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 573 |
+
"language_model.model.layers.5.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
|
| 574 |
+
"language_model.model.layers.5.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
|
| 575 |
+
"language_model.model.layers.5.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
|
| 576 |
+
"language_model.model.layers.5.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
|
| 577 |
+
"language_model.model.layers.5.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
|
| 578 |
+
"language_model.model.layers.5.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
|
| 579 |
+
"language_model.model.layers.5.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
|
| 580 |
+
"language_model.model.layers.5.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
|
| 581 |
+
"language_model.model.layers.5.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
|
| 582 |
+
"language_model.model.layers.5.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 583 |
+
"language_model.model.layers.5.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 584 |
+
"language_model.model.layers.6.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
|
| 585 |
+
"language_model.model.layers.6.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
|
| 586 |
+
"language_model.model.layers.6.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
|
| 587 |
+
"language_model.model.layers.6.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
|
| 588 |
+
"language_model.model.layers.6.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
|
| 589 |
+
"language_model.model.layers.6.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
|
| 590 |
+
"language_model.model.layers.6.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
|
| 591 |
+
"language_model.model.layers.6.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
|
| 592 |
+
"language_model.model.layers.6.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
|
| 593 |
+
"language_model.model.layers.6.input_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 594 |
+
"language_model.model.layers.6.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
|
| 595 |
+
"language_model.model.layers.7.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 596 |
+
"language_model.model.layers.7.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 597 |
+
"language_model.model.layers.7.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 598 |
+
"language_model.model.layers.7.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 599 |
+
"language_model.model.layers.7.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 600 |
+
"language_model.model.layers.7.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 601 |
+
"language_model.model.layers.7.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 602 |
+
"language_model.model.layers.7.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 603 |
+
"language_model.model.layers.7.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 604 |
+
"language_model.model.layers.7.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 605 |
+
"language_model.model.layers.7.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 606 |
+
"language_model.model.layers.8.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 607 |
+
"language_model.model.layers.8.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 608 |
+
"language_model.model.layers.8.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 609 |
+
"language_model.model.layers.8.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 610 |
+
"language_model.model.layers.8.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 611 |
+
"language_model.model.layers.8.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 612 |
+
"language_model.model.layers.8.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 613 |
+
"language_model.model.layers.8.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 614 |
+
"language_model.model.layers.8.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 615 |
+
"language_model.model.layers.8.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 616 |
+
"language_model.model.layers.8.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 617 |
+
"language_model.model.layers.9.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 618 |
+
"language_model.model.layers.9.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 619 |
+
"language_model.model.layers.9.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 620 |
+
"language_model.model.layers.9.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 621 |
+
"language_model.model.layers.9.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 622 |
+
"language_model.model.layers.9.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 623 |
+
"language_model.model.layers.9.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 624 |
+
"language_model.model.layers.9.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 625 |
+
"language_model.model.layers.9.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 626 |
+
"language_model.model.layers.9.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 627 |
+
"language_model.model.layers.9.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 628 |
+
"language_model.model.layers.10.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 629 |
+
"language_model.model.layers.10.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 630 |
+
"language_model.model.layers.10.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 631 |
+
"language_model.model.layers.10.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 632 |
+
"language_model.model.layers.10.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 633 |
+
"language_model.model.layers.10.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 634 |
+
"language_model.model.layers.10.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 635 |
+
"language_model.model.layers.10.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 636 |
+
"language_model.model.layers.10.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 637 |
+
"language_model.model.layers.10.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 638 |
+
"language_model.model.layers.10.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 639 |
+
"language_model.model.layers.11.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 640 |
+
"language_model.model.layers.11.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 641 |
+
"language_model.model.layers.11.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 642 |
+
"language_model.model.layers.11.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 643 |
+
"language_model.model.layers.11.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 644 |
+
"language_model.model.layers.11.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 645 |
+
"language_model.model.layers.11.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 646 |
+
"language_model.model.layers.11.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 647 |
+
"language_model.model.layers.11.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 648 |
+
"language_model.model.layers.11.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 649 |
+
"language_model.model.layers.11.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 650 |
+
"language_model.model.layers.12.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 651 |
+
"language_model.model.layers.12.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 652 |
+
"language_model.model.layers.12.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 653 |
+
"language_model.model.layers.12.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 654 |
+
"language_model.model.layers.12.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 655 |
+
"language_model.model.layers.12.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 656 |
+
"language_model.model.layers.12.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 657 |
+
"language_model.model.layers.12.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 658 |
+
"language_model.model.layers.12.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 659 |
+
"language_model.model.layers.12.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 660 |
+
"language_model.model.layers.12.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 661 |
+
"language_model.model.layers.13.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 662 |
+
"language_model.model.layers.13.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 663 |
+
"language_model.model.layers.13.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 664 |
+
"language_model.model.layers.13.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 665 |
+
"language_model.model.layers.13.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 666 |
+
"language_model.model.layers.13.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 667 |
+
"language_model.model.layers.13.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 668 |
+
"language_model.model.layers.13.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 669 |
+
"language_model.model.layers.13.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 670 |
+
"language_model.model.layers.13.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 671 |
+
"language_model.model.layers.13.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 672 |
+
"language_model.model.layers.14.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 673 |
+
"language_model.model.layers.14.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 674 |
+
"language_model.model.layers.14.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 675 |
+
"language_model.model.layers.14.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 676 |
+
"language_model.model.layers.14.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 677 |
+
"language_model.model.layers.14.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 678 |
+
"language_model.model.layers.14.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 679 |
+
"language_model.model.layers.14.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 680 |
+
"language_model.model.layers.14.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 681 |
+
"language_model.model.layers.14.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 682 |
+
"language_model.model.layers.14.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 683 |
+
"language_model.model.layers.15.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 684 |
+
"language_model.model.layers.15.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 685 |
+
"language_model.model.layers.15.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 686 |
+
"language_model.model.layers.15.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 687 |
+
"language_model.model.layers.15.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 688 |
+
"language_model.model.layers.15.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 689 |
+
"language_model.model.layers.15.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 690 |
+
"language_model.model.layers.15.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 691 |
+
"language_model.model.layers.15.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 692 |
+
"language_model.model.layers.15.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 693 |
+
"language_model.model.layers.15.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 694 |
+
"language_model.model.layers.16.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 695 |
+
"language_model.model.layers.16.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 696 |
+
"language_model.model.layers.16.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 697 |
+
"language_model.model.layers.16.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 698 |
+
"language_model.model.layers.16.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 699 |
+
"language_model.model.layers.16.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 700 |
+
"language_model.model.layers.16.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 701 |
+
"language_model.model.layers.16.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 702 |
+
"language_model.model.layers.16.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 703 |
+
"language_model.model.layers.16.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 704 |
+
"language_model.model.layers.16.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 705 |
+
"language_model.model.layers.17.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 706 |
+
"language_model.model.layers.17.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 707 |
+
"language_model.model.layers.17.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 708 |
+
"language_model.model.layers.17.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 709 |
+
"language_model.model.layers.17.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 710 |
+
"language_model.model.layers.17.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 711 |
+
"language_model.model.layers.17.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 712 |
+
"language_model.model.layers.17.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 713 |
+
"language_model.model.layers.17.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 714 |
+
"language_model.model.layers.17.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 715 |
+
"language_model.model.layers.17.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 716 |
+
"language_model.model.layers.18.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 717 |
+
"language_model.model.layers.18.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 718 |
+
"language_model.model.layers.18.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 719 |
+
"language_model.model.layers.18.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 720 |
+
"language_model.model.layers.18.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 721 |
+
"language_model.model.layers.18.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 722 |
+
"language_model.model.layers.18.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 723 |
+
"language_model.model.layers.18.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 724 |
+
"language_model.model.layers.18.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 725 |
+
"language_model.model.layers.18.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 726 |
+
"language_model.model.layers.18.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 727 |
+
"language_model.model.layers.19.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 728 |
+
"language_model.model.layers.19.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 729 |
+
"language_model.model.layers.19.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 730 |
+
"language_model.model.layers.19.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 731 |
+
"language_model.model.layers.19.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 732 |
+
"language_model.model.layers.19.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 733 |
+
"language_model.model.layers.19.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 734 |
+
"language_model.model.layers.19.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 735 |
+
"language_model.model.layers.19.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 736 |
+
"language_model.model.layers.19.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 737 |
+
"language_model.model.layers.19.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 738 |
+
"language_model.model.layers.20.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 739 |
+
"language_model.model.layers.20.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 740 |
+
"language_model.model.layers.20.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 741 |
+
"language_model.model.layers.20.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 742 |
+
"language_model.model.layers.20.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 743 |
+
"language_model.model.layers.20.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 744 |
+
"language_model.model.layers.20.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 745 |
+
"language_model.model.layers.20.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 746 |
+
"language_model.model.layers.20.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 747 |
+
"language_model.model.layers.20.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 748 |
+
"language_model.model.layers.20.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 749 |
+
"language_model.model.layers.21.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 750 |
+
"language_model.model.layers.21.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 751 |
+
"language_model.model.layers.21.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 752 |
+
"language_model.model.layers.21.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 753 |
+
"language_model.model.layers.21.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 754 |
+
"language_model.model.layers.21.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 755 |
+
"language_model.model.layers.21.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 756 |
+
"language_model.model.layers.21.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 757 |
+
"language_model.model.layers.21.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 758 |
+
"language_model.model.layers.21.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 759 |
+
"language_model.model.layers.21.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 760 |
+
"language_model.model.layers.22.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 761 |
+
"language_model.model.layers.22.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 762 |
+
"language_model.model.layers.22.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 763 |
+
"language_model.model.layers.22.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 764 |
+
"language_model.model.layers.22.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 765 |
+
"language_model.model.layers.22.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 766 |
+
"language_model.model.layers.22.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 767 |
+
"language_model.model.layers.22.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 768 |
+
"language_model.model.layers.22.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 769 |
+
"language_model.model.layers.22.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 770 |
+
"language_model.model.layers.22.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 771 |
+
"language_model.model.layers.23.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 772 |
+
"language_model.model.layers.23.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 773 |
+
"language_model.model.layers.23.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 774 |
+
"language_model.model.layers.23.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 775 |
+
"language_model.model.layers.23.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 776 |
+
"language_model.model.layers.23.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 777 |
+
"language_model.model.layers.23.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 778 |
+
"language_model.model.layers.23.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 779 |
+
"language_model.model.layers.23.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 780 |
+
"language_model.model.layers.23.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 781 |
+
"language_model.model.layers.23.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 782 |
+
"language_model.model.layers.24.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 783 |
+
"language_model.model.layers.24.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 784 |
+
"language_model.model.layers.24.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 785 |
+
"language_model.model.layers.24.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 786 |
+
"language_model.model.layers.24.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 787 |
+
"language_model.model.layers.24.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 788 |
+
"language_model.model.layers.24.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 789 |
+
"language_model.model.layers.24.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 790 |
+
"language_model.model.layers.24.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 791 |
+
"language_model.model.layers.24.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 792 |
+
"language_model.model.layers.24.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 793 |
+
"language_model.model.layers.25.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 794 |
+
"language_model.model.layers.25.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 795 |
+
"language_model.model.layers.25.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 796 |
+
"language_model.model.layers.25.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 797 |
+
"language_model.model.layers.25.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 798 |
+
"language_model.model.layers.25.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 799 |
+
"language_model.model.layers.25.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 800 |
+
"language_model.model.layers.25.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 801 |
+
"language_model.model.layers.25.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 802 |
+
"language_model.model.layers.25.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 803 |
+
"language_model.model.layers.25.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 804 |
+
"language_model.model.layers.26.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 805 |
+
"language_model.model.layers.26.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 806 |
+
"language_model.model.layers.26.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 807 |
+
"language_model.model.layers.26.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 808 |
+
"language_model.model.layers.26.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 809 |
+
"language_model.model.layers.26.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 810 |
+
"language_model.model.layers.26.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 811 |
+
"language_model.model.layers.26.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 812 |
+
"language_model.model.layers.26.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 813 |
+
"language_model.model.layers.26.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 814 |
+
"language_model.model.layers.26.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 815 |
+
"language_model.model.layers.27.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 816 |
+
"language_model.model.layers.27.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 817 |
+
"language_model.model.layers.27.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 818 |
+
"language_model.model.layers.27.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 819 |
+
"language_model.model.layers.27.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 820 |
+
"language_model.model.layers.27.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 821 |
+
"language_model.model.layers.27.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
|
| 822 |
+
"language_model.model.layers.27.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
|
| 823 |
+
"language_model.model.layers.27.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
|
| 824 |
+
"language_model.model.layers.27.input_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 825 |
+
"language_model.model.layers.27.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
|
| 826 |
+
"language_model.model.layers.28.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
|
| 827 |
+
"language_model.model.layers.28.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
|
| 828 |
+
"language_model.model.layers.28.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
|
| 829 |
+
"language_model.model.layers.28.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
|
| 830 |
+
"language_model.model.layers.28.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
|
| 831 |
+
"language_model.model.layers.28.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
|
| 832 |
+
"language_model.model.layers.28.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
|
| 833 |
+
"language_model.model.layers.28.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
|
| 834 |
+
"language_model.model.layers.28.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
|
| 835 |
+
"language_model.model.layers.28.input_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 836 |
+
"language_model.model.layers.28.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 837 |
+
"language_model.model.layers.29.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
|
| 838 |
+
"language_model.model.layers.29.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
|
| 839 |
+
"language_model.model.layers.29.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
|
| 840 |
+
"language_model.model.layers.29.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
|
| 841 |
+
"language_model.model.layers.29.self_attn.q_norm.weight": "model-00003-of-00003.safetensors",
|
| 842 |
+
"language_model.model.layers.29.self_attn.k_norm.weight": "model-00003-of-00003.safetensors",
|
| 843 |
+
"language_model.model.layers.29.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
|
| 844 |
+
"language_model.model.layers.29.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
|
| 845 |
+
"language_model.model.layers.29.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
|
| 846 |
+
"language_model.model.layers.29.input_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 847 |
+
"language_model.model.layers.29.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 848 |
+
"language_model.model.layers.30.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
|
| 849 |
+
"language_model.model.layers.30.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
|
| 850 |
+
"language_model.model.layers.30.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
|
| 851 |
+
"language_model.model.layers.30.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
|
| 852 |
+
"language_model.model.layers.30.self_attn.q_norm.weight": "model-00003-of-00003.safetensors",
|
| 853 |
+
"language_model.model.layers.30.self_attn.k_norm.weight": "model-00003-of-00003.safetensors",
|
| 854 |
+
"language_model.model.layers.30.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
|
| 855 |
+
"language_model.model.layers.30.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
|
| 856 |
+
"language_model.model.layers.30.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
|
| 857 |
+
"language_model.model.layers.30.input_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 858 |
+
"language_model.model.layers.30.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 859 |
+
"language_model.model.layers.31.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
|
| 860 |
+
"language_model.model.layers.31.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
|
| 861 |
+
"language_model.model.layers.31.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
|
| 862 |
+
"language_model.model.layers.31.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
|
| 863 |
+
"language_model.model.layers.31.self_attn.q_norm.weight": "model-00003-of-00003.safetensors",
|
| 864 |
+
"language_model.model.layers.31.self_attn.k_norm.weight": "model-00003-of-00003.safetensors",
|
| 865 |
+
"language_model.model.layers.31.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
|
| 866 |
+
"language_model.model.layers.31.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
|
| 867 |
+
"language_model.model.layers.31.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
|
| 868 |
+
"language_model.model.layers.31.input_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 869 |
+
"language_model.model.layers.31.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 870 |
+
"language_model.model.layers.32.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
|
| 871 |
+
"language_model.model.layers.32.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
|
| 872 |
+
"language_model.model.layers.32.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
|
| 873 |
+
"language_model.model.layers.32.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
|
| 874 |
+
"language_model.model.layers.32.self_attn.q_norm.weight": "model-00003-of-00003.safetensors",
|
| 875 |
+
"language_model.model.layers.32.self_attn.k_norm.weight": "model-00003-of-00003.safetensors",
|
| 876 |
+
"language_model.model.layers.32.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
|
| 877 |
+
"language_model.model.layers.32.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
|
| 878 |
+
"language_model.model.layers.32.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
|
| 879 |
+
"language_model.model.layers.32.input_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 880 |
+
"language_model.model.layers.32.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 881 |
+
"language_model.model.layers.33.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
|
| 882 |
+
"language_model.model.layers.33.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
|
| 883 |
+
"language_model.model.layers.33.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
|
| 884 |
+
"language_model.model.layers.33.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
|
| 885 |
+
"language_model.model.layers.33.self_attn.q_norm.weight": "model-00003-of-00003.safetensors",
|
| 886 |
+
"language_model.model.layers.33.self_attn.k_norm.weight": "model-00003-of-00003.safetensors",
|
| 887 |
+
"language_model.model.layers.33.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
|
| 888 |
+
"language_model.model.layers.33.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
|
| 889 |
+
"language_model.model.layers.33.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
|
| 890 |
+
"language_model.model.layers.33.input_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 891 |
+
"language_model.model.layers.33.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 892 |
+
"language_model.model.layers.34.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
|
| 893 |
+
"language_model.model.layers.34.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
|
| 894 |
+
"language_model.model.layers.34.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
|
| 895 |
+
"language_model.model.layers.34.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
|
| 896 |
+
"language_model.model.layers.34.self_attn.q_norm.weight": "model-00003-of-00003.safetensors",
|
| 897 |
+
"language_model.model.layers.34.self_attn.k_norm.weight": "model-00003-of-00003.safetensors",
|
| 898 |
+
"language_model.model.layers.34.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
|
| 899 |
+
"language_model.model.layers.34.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
|
| 900 |
+
"language_model.model.layers.34.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
|
| 901 |
+
"language_model.model.layers.34.input_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 902 |
+
"language_model.model.layers.34.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 903 |
+
"language_model.model.layers.35.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
|
| 904 |
+
"language_model.model.layers.35.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
|
| 905 |
+
"language_model.model.layers.35.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
|
| 906 |
+
"language_model.model.layers.35.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
|
| 907 |
+
"language_model.model.layers.35.self_attn.q_norm.weight": "model-00003-of-00003.safetensors",
|
| 908 |
+
"language_model.model.layers.35.self_attn.k_norm.weight": "model-00003-of-00003.safetensors",
|
| 909 |
+
"language_model.model.layers.35.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
|
| 910 |
+
"language_model.model.layers.35.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
|
| 911 |
+
"language_model.model.layers.35.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
|
| 912 |
+
"language_model.model.layers.35.input_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 913 |
+
"language_model.model.layers.35.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
|
| 914 |
+
"language_model.model.norm.weight": "model-00003-of-00003.safetensors"
|
| 915 |
+
}
|
| 916 |
+
}
|
modeling_jepa_llm.py
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""JEPA-LLM: frozen V-JEPA 2.1 ViT-g video encoder -> spectral-equalisation bridge (MLP) -> Qwen3-4B-Instruct-2507.
|
| 2 |
+
|
| 3 |
+
Inference path (the same computation as the evaluation code the model was measured with):
|
| 4 |
+
video [1, 3, 32, 384, 384] -> V-JEPA 2.1 encoder, 4 levels [1, 16 * 24 * 24, 4, 1408]
|
| 5 |
+
-> per-level parameter-free LayerNorm (fp32) -> 3 x 3 patch average pooling to 8 x 8 cells per tubelet
|
| 6 |
+
([1, 16 * 64 = 1024, 4, 1408], stored in bf16)
|
| 7 |
+
-> equalisation (fp32): centre, project on the top 2048 principal directions of frozen V-JEPA, unit variance
|
| 8 |
+
-> MLP bridge (LayerNorm, Linear 2048 -> 2048, GELU, Linear 2048 -> 2560) + learned (tubelet, row, column) position,
|
| 9 |
+
real-time (seconds) and cell-geometry codes -> 1024 video tokens
|
| 10 |
+
-> spliced into the prompt at the evidence positions of the LLM's input embeddings.
|
| 11 |
+
Multiple choice: the logits of the option letters at the first answer position (no generation).
|
| 12 |
+
"""
|
| 13 |
+
import math
|
| 14 |
+
|
| 15 |
+
import torch
|
| 16 |
+
import torch.nn.functional as F
|
| 17 |
+
from torch import nn
|
| 18 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, PreTrainedModel
|
| 19 |
+
|
| 20 |
+
from .configuration_jepa_llm import JepaLlmConfig
|
| 21 |
+
from .processing_jepa_llm import (CHAT_TEMPLATE, IGNORE, VIS, build_generation_prompt, build_scoring_example, letter_ids,
|
| 22 |
+
load_video, mc_prompt)
|
| 23 |
+
from .vjepa2_1_encoder import vjepa2_1_vit_giant_384
|
| 24 |
+
|
| 25 |
+
OBSERVED = 0
|
| 26 |
+
GRID = 24 # 384 / 16 patches per side
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
def pool_regions(states: torch.Tensor, n_tubelets: int, cells: int, regions: torch.Tensor, grid: int = GRID):
|
| 30 |
+
"""[B, n_tub * grid * grid, L, D] -> (pooled [B, n_tub * cells^2, L, D], coords [K, 3] (t, y, x), geometry [B, K, 4]
|
| 31 |
+
= (cy, cx, h, w) of each cell as a fraction of the frame). regions [B, 4] = patch-grid (y0, y1, x0, x1)."""
|
| 32 |
+
b, n, l, d = states.shape
|
| 33 |
+
x = states.view(b, n_tubelets, grid, grid, l * d)
|
| 34 |
+
out, geo = [], []
|
| 35 |
+
for i in range(b):
|
| 36 |
+
y0, y1, x0, x1 = [int(v) for v in regions[i]]
|
| 37 |
+
sub = x[i, :, y0:y1, x0:x1].permute(0, 3, 1, 2)
|
| 38 |
+
p = F.adaptive_avg_pool2d(sub, cells)
|
| 39 |
+
out.append(p.permute(0, 2, 3, 1).reshape(n_tubelets * cells * cells, l, d))
|
| 40 |
+
ch, cw = (y1 - y0) / cells, (x1 - x0) / cells
|
| 41 |
+
cy = (y0 + (torch.arange(cells) + 0.5) * ch) / grid
|
| 42 |
+
cx = (x0 + (torch.arange(cells) + 0.5) * cw) / grid
|
| 43 |
+
g = torch.stack(torch.meshgrid(cy, cx, indexing="ij"), -1).reshape(-1, 2)
|
| 44 |
+
g = torch.cat([g, torch.tensor([[ch / grid, cw / grid]]).expand(len(g), 2)], -1)
|
| 45 |
+
geo.append(g.repeat(n_tubelets, 1))
|
| 46 |
+
tt, yy, xx = torch.meshgrid(torch.arange(n_tubelets), torch.arange(cells), torch.arange(cells), indexing="ij")
|
| 47 |
+
return torch.stack(out), torch.stack([tt, yy, xx], -1).reshape(-1, 3), torch.stack(geo).to(states.device)
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def time_features(seconds: torch.Tensor, dim: int) -> torch.Tensor:
|
| 51 |
+
"""sinusoidal encoding of real timestamps (seconds), periods from 0.1 s to ~1000 s"""
|
| 52 |
+
half = dim // 2
|
| 53 |
+
freqs = torch.exp(-math.log(1e4) * torch.arange(half, device=seconds.device, dtype=torch.float32) / half) * 10.0
|
| 54 |
+
ang = seconds.float().unsqueeze(-1) * freqs
|
| 55 |
+
return torch.cat([ang.sin(), ang.cos()], -1)
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
class SpectralStats(nn.Module):
|
| 59 |
+
"""Equalisation statistics of frozen V-JEPA (pooled 4-level cell states): mean [5632], top-k principal directions
|
| 60 |
+
[5632, k], per-direction scale [k] (eigenvalue^-1/2). Always fp32: the small directions are scaled up by ~100x, so bf16
|
| 61 |
+
statistics would not reproduce the model. Casting the model (`.to(torch.bfloat16)`, `.half()`) moves these buffers to
|
| 62 |
+
the new device but keeps them fp32."""
|
| 63 |
+
|
| 64 |
+
def __init__(self, in_dim: int, k: int):
|
| 65 |
+
super().__init__()
|
| 66 |
+
self.register_buffer("mean", torch.zeros(in_dim, dtype=torch.float32))
|
| 67 |
+
self.register_buffer("basis", torch.zeros(in_dim, k, dtype=torch.float32))
|
| 68 |
+
self.register_buffer("scale", torch.zeros(k, dtype=torch.float32))
|
| 69 |
+
|
| 70 |
+
def _apply(self, fn, recurse=True):
|
| 71 |
+
for name, buf in self._buffers.items():
|
| 72 |
+
if buf is None:
|
| 73 |
+
continue
|
| 74 |
+
new = fn(buf)
|
| 75 |
+
if new.dtype != buf.dtype and buf.dtype == torch.float32:
|
| 76 |
+
new = buf.to(device=new.device)
|
| 77 |
+
self._buffers[name] = new
|
| 78 |
+
return self
|
| 79 |
+
|
| 80 |
+
def forward(self, pooled: torch.Tensor) -> torch.Tensor:
|
| 81 |
+
b, n = pooled.shape[:2]
|
| 82 |
+
x = pooled.reshape(b, n, -1).float() - self.mean.float()
|
| 83 |
+
return (x @ self.basis.float()) * self.scale.float()
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
class SpectralBridge(nn.Module):
|
| 87 |
+
"""equalised V-JEPA cell states -> LLM-width video tokens (MLP mode) + position / time / geometry codes"""
|
| 88 |
+
|
| 89 |
+
def __init__(self, in_dim: int, k: int, hidden: int, out_dim: int, max_tubelets: int = 64, max_cells: int = 8, time_dim: int = 64):
|
| 90 |
+
super().__init__()
|
| 91 |
+
self.spectral = SpectralStats(in_dim, k)
|
| 92 |
+
self.inp = nn.ModuleDict({str(OBSERVED): nn.Sequential(nn.LayerNorm(k), nn.Linear(k, hidden))})
|
| 93 |
+
self.out = nn.Sequential(nn.GELU(), nn.Linear(hidden, out_dim))
|
| 94 |
+
self.t_emb = nn.Embedding(max_tubelets, out_dim)
|
| 95 |
+
self.y_emb = nn.Embedding(max_cells, out_dim)
|
| 96 |
+
self.x_emb = nn.Embedding(max_cells, out_dim)
|
| 97 |
+
self.kind_emb = nn.Embedding(2, out_dim)
|
| 98 |
+
self.time_proj = nn.Linear(time_dim, out_dim)
|
| 99 |
+
self.geom_proj = nn.Linear(4, out_dim)
|
| 100 |
+
self.time_dim = time_dim
|
| 101 |
+
|
| 102 |
+
def forward(self, pooled, coords, seconds, geometry):
|
| 103 |
+
"""pooled [B, K, L, D], coords [K, 3], seconds [B, K], geometry [B, K, 4] -> [B, K, out_dim]"""
|
| 104 |
+
inp = self.inp[str(OBSERVED)]
|
| 105 |
+
x = self.spectral(pooled)
|
| 106 |
+
h = self.out(inp(x.to(inp[1].weight.dtype)))
|
| 107 |
+
if coords.dim() == 2:
|
| 108 |
+
coords = coords.unsqueeze(0)
|
| 109 |
+
pos = self.t_emb(coords[..., 0]) + self.y_emb(coords[..., 1]) + self.x_emb(coords[..., 2])
|
| 110 |
+
code = pos.to(h.dtype) + self.kind_emb.weight[OBSERVED].to(h.dtype) \
|
| 111 |
+
+ self.time_proj(time_features(seconds, self.time_dim).to(self.time_proj.weight.dtype)).to(h.dtype)
|
| 112 |
+
code = code + self.geom_proj(geometry.to(self.geom_proj.weight.dtype)).to(h.dtype)
|
| 113 |
+
return h + code
|
| 114 |
+
|
| 115 |
+
|
| 116 |
+
class JepaLlmPreTrainedModel(PreTrainedModel):
|
| 117 |
+
config_class = JepaLlmConfig
|
| 118 |
+
base_model_prefix = ""
|
| 119 |
+
supports_gradient_checkpointing = False
|
| 120 |
+
_no_split_modules = ["Block", "Qwen3DecoderLayer"]
|
| 121 |
+
_supports_sdpa = True
|
| 122 |
+
_keep_in_fp32_modules_strict = ["spectral"]
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
class JepaLlmModel(JepaLlmPreTrainedModel):
|
| 126 |
+
"""Video question answering with a frozen V-JEPA 2.1 encoder and Qwen3-4B-Instruct-2507.
|
| 127 |
+
|
| 128 |
+
model = AutoModel.from_pretrained(path, trust_remote_code=True, torch_dtype=torch.bfloat16).to("cuda").eval()
|
| 129 |
+
model.chat("clip.mp4", "Describe what happens.")
|
| 130 |
+
model.choose("clip.mp4", "What does the person do?", ["opens a door", "closes a door"]) # -> (index, scores)
|
| 131 |
+
"""
|
| 132 |
+
_tied_weights_keys = {"language_model.lm_head.weight": "language_model.model.embed_tokens.weight"}
|
| 133 |
+
|
| 134 |
+
def __init__(self, config: JepaLlmConfig):
|
| 135 |
+
super().__init__(config)
|
| 136 |
+
self.vision_encoder = vjepa2_1_vit_giant_384(**(config.vision_config or {}))
|
| 137 |
+
hidden = config.text_config.hidden_size
|
| 138 |
+
self.bridge = SpectralBridge(config.vision_levels * config.vision_level_dim, config.spectral_k, config.bridge_hidden, hidden,
|
| 139 |
+
max_tubelets=config.max_tubelets, max_cells=max(4, config.evidence_cells), time_dim=config.time_dim)
|
| 140 |
+
self.language_model = AutoModelForCausalLM.from_config(config.text_config)
|
| 141 |
+
self._tokenizer = None
|
| 142 |
+
self._rope_mode = None
|
| 143 |
+
self.post_init()
|
| 144 |
+
|
| 145 |
+
def _prepare_rope(self):
|
| 146 |
+
"""rope_inv_freq_bf16 (config): round the LLM's rotary frequencies to bf16, as casting the whole model to bf16
|
| 147 |
+
does (the evaluation setup); otherwise restore fp32 frequencies computed from the config. Idempotent."""
|
| 148 |
+
want = bool(getattr(self.config, "rope_inv_freq_bf16", True))
|
| 149 |
+
if self._rope_mode == want:
|
| 150 |
+
return
|
| 151 |
+
for mod in self.language_model.modules():
|
| 152 |
+
if type(mod).__name__.endswith("RotaryEmbedding") and isinstance(getattr(mod, "inv_freq", None), torch.Tensor):
|
| 153 |
+
if not hasattr(mod, "_inv_freq_fp32"):
|
| 154 |
+
if getattr(mod, "rope_type", "default") == "default" and hasattr(mod, "compute_default_rope_parameters"):
|
| 155 |
+
inv, _ = mod.compute_default_rope_parameters(mod.config, torch.device("cpu")) # fp32, as at init
|
| 156 |
+
else:
|
| 157 |
+
inv = mod.inv_freq.detach().float().cpu()
|
| 158 |
+
mod._inv_freq_fp32 = inv.float()
|
| 159 |
+
for name in ("inv_freq", "original_inv_freq"):
|
| 160 |
+
if isinstance(mod._buffers.get(name), torch.Tensor):
|
| 161 |
+
dev = mod._buffers[name].device
|
| 162 |
+
src = mod._inv_freq_fp32.to(dev)
|
| 163 |
+
mod._buffers[name] = src.to(torch.bfloat16) if want else src.clone()
|
| 164 |
+
self._rope_mode = want
|
| 165 |
+
|
| 166 |
+
# ---- tokenizer --------------------------------------------------------------------------------------------------
|
| 167 |
+
@property
|
| 168 |
+
def tokenizer(self):
|
| 169 |
+
if self._tokenizer is None:
|
| 170 |
+
self.set_tokenizer(AutoTokenizer.from_pretrained(self.name_or_path, trust_remote_code=True))
|
| 171 |
+
return self._tokenizer
|
| 172 |
+
|
| 173 |
+
def set_tokenizer(self, tok):
|
| 174 |
+
tok.chat_template = CHAT_TEMPLATE # the template the model was trained with
|
| 175 |
+
self._tokenizer = tok
|
| 176 |
+
return tok
|
| 177 |
+
|
| 178 |
+
# ---- video -> tokens ----------------------------------------------------------------------------------------------
|
| 179 |
+
def load_video(self, video_path: str, start_sec=None, end_sec=None):
|
| 180 |
+
"""-> (frames [3, 32, 384, 384] float32 normalised, frame times [32] seconds) on the CPU"""
|
| 181 |
+
return load_video(video_path, self.config.num_frames, self.config.image_size, start_sec, end_sec)
|
| 182 |
+
|
| 183 |
+
@torch.no_grad()
|
| 184 |
+
def encode_video(self, video: torch.Tensor, frame_times: torch.Tensor) -> torch.Tensor:
|
| 185 |
+
"""video [B, 3, T, 384, 384] (normalised), frame_times [B, T] seconds -> video tokens [B, T/2 * 64, hidden]"""
|
| 186 |
+
if video.dim() == 4:
|
| 187 |
+
video, frame_times = video.unsqueeze(0), frame_times.unsqueeze(0)
|
| 188 |
+
dev, dt = self.device, self.vision_encoder.patch_embed.proj.weight.dtype
|
| 189 |
+
video, frame_times = video.to(dev, dt), frame_times.to(dev)
|
| 190 |
+
z = self.vision_encoder(video, training=True) # [B, N, 4 * 1408]
|
| 191 |
+
b, n = z.shape[:2]
|
| 192 |
+
z = z.view(b, n, self.config.vision_levels, -1)
|
| 193 |
+
zn = F.layer_norm(z.float(), z.shape[-1:]) # each level, no affine
|
| 194 |
+
n_tub = frame_times.shape[-1] // 2
|
| 195 |
+
cells = self.config.evidence_cells
|
| 196 |
+
pooled, coords, geom = pool_regions(zn, n_tub, cells, torch.tensor([[0, GRID, 0, GRID]] * b))
|
| 197 |
+
pooled = pooled.to(torch.bfloat16).to(dev, self.bridge.inp[str(OBSERVED)][1].weight.dtype) # as the evaluation cache
|
| 198 |
+
sec = frame_times.float().view(b, n_tub, 2).mean(-1).repeat_interleave(cells * cells, dim=1)
|
| 199 |
+
return self.bridge(pooled, coords.to(dev), sec, geom)
|
| 200 |
+
|
| 201 |
+
def _evidence(self, video, start_sec=None, end_sec=None, evidence=None):
|
| 202 |
+
if evidence is not None:
|
| 203 |
+
return evidence.to(self.device)
|
| 204 |
+
if isinstance(video, str):
|
| 205 |
+
frames, times = self.load_video(video, start_sec, end_sec)
|
| 206 |
+
else:
|
| 207 |
+
frames, times = video
|
| 208 |
+
return self.encode_video(frames, times)
|
| 209 |
+
|
| 210 |
+
def _embed(self, input_ids, vis_mask, ev):
|
| 211 |
+
emb = self.language_model.get_input_embeddings()(input_ids)
|
| 212 |
+
return emb.masked_scatter(vis_mask.unsqueeze(-1), ev.to(emb.dtype))
|
| 213 |
+
|
| 214 |
+
# ---- multiple choice ----------------------------------------------------------------------------------------------
|
| 215 |
+
@torch.no_grad()
|
| 216 |
+
def choose(self, video, question: str, options, start_sec=None, end_sec=None, evidence=None):
|
| 217 |
+
"""Multiple choice by option-letter likelihood. video: a file path, or (frames, frame_times) from load_video.
|
| 218 |
+
-> (index of the chosen option, [score per option]) where the scores are the LLM's logits of "A", "B", ... at the
|
| 219 |
+
first answer position for the prompt "{question}\\nA. ...\\nB. ...\\nAnswer with the option's letter from the
|
| 220 |
+
given choices directly." """
|
| 221 |
+
tok = self.tokenizer
|
| 222 |
+
self._prepare_rope()
|
| 223 |
+
ev = self._evidence(video, start_sec, end_sec, evidence)
|
| 224 |
+
ex = build_scoring_example(tok, f"{VIS}\n{mc_prompt(question, options)}", ev.shape[1])
|
| 225 |
+
dev = self.device
|
| 226 |
+
ids = torch.tensor([ex["input_ids"]], device=dev)
|
| 227 |
+
lab = torch.tensor([ex["labels"]], device=dev)
|
| 228 |
+
vis = torch.tensor([ex["vis_mask"]], device=dev).bool()
|
| 229 |
+
last = self.language_model.model(inputs_embeds=self._embed(ids, vis, ev), attention_mask=torch.ones_like(ids),
|
| 230 |
+
use_cache=False).last_hidden_state
|
| 231 |
+
sel = lab[:, 1:] != IGNORE
|
| 232 |
+
logits = self.language_model.lm_head(last[:, :-1][sel]).float() # every answer position, as in training
|
| 233 |
+
scores = logits[0, letter_ids(tok, len(options))] # the first answer position
|
| 234 |
+
return int(scores.argmax()), scores.tolist()
|
| 235 |
+
|
| 236 |
+
# ---- free generation ----------------------------------------------------------------------------------------------
|
| 237 |
+
@torch.no_grad()
|
| 238 |
+
def chat(self, video, question: str, max_new_tokens: int = 256, start_sec=None, end_sec=None, evidence=None) -> str:
|
| 239 |
+
"""Greedy answer to a free-form question about the video (single turn)."""
|
| 240 |
+
tok = self.tokenizer
|
| 241 |
+
self._prepare_rope()
|
| 242 |
+
ev = self._evidence(video, start_sec, end_sec, evidence)
|
| 243 |
+
p = build_generation_prompt(tok, f"{VIS}\n{question}", ev.shape[1])
|
| 244 |
+
dev = self.device
|
| 245 |
+
ids = torch.tensor([p["input_ids"]], device=dev)
|
| 246 |
+
vis = torch.tensor([p["vis_mask"]], device=dev).bool()
|
| 247 |
+
llm = self.language_model
|
| 248 |
+
out = llm(inputs_embeds=self._embed(ids, vis, ev), use_cache=True)
|
| 249 |
+
stop = {tok.eos_token_id, *(tok.convert_tokens_to_ids(t) for t in ("<|im_end|>",) if t in tok.get_vocab())}
|
| 250 |
+
gen = []
|
| 251 |
+
for _ in range(max_new_tokens):
|
| 252 |
+
nxt = int(out.logits[0, -1].argmax())
|
| 253 |
+
if nxt in stop:
|
| 254 |
+
break
|
| 255 |
+
gen.append(nxt)
|
| 256 |
+
out = llm(input_ids=torch.tensor([[nxt]], device=dev), past_key_values=out.past_key_values, use_cache=True)
|
| 257 |
+
return tok.decode(gen, skip_special_tokens=True)
|
| 258 |
+
|
| 259 |
+
def forward(self, input_ids, vis_mask=None, video=None, frame_times=None, evidence=None, attention_mask=None, **kw):
|
| 260 |
+
"""Plain forward of the LLM with the video tokens spliced in at `vis_mask` positions (returns the CausalLM output)."""
|
| 261 |
+
self._prepare_rope()
|
| 262 |
+
if evidence is None and video is not None:
|
| 263 |
+
evidence = self.encode_video(video, frame_times)
|
| 264 |
+
if evidence is None:
|
| 265 |
+
return self.language_model(input_ids=input_ids, attention_mask=attention_mask, **kw)
|
| 266 |
+
emb = self._embed(input_ids, vis_mask.bool(), evidence)
|
| 267 |
+
return self.language_model(inputs_embeds=emb, attention_mask=attention_mask, **kw)
|
processing_jepa_llm.py
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Video decoding / frame sampling and prompt building for JEPA-LLM (identical to the evaluation path of the model).
|
| 2 |
+
|
| 3 |
+
Video: `num_frames` (32) frame times at the slot centres of the clip, t_i = t0 + (i + 0.5) * (t1 - t0) / 32, rounded to the
|
| 4 |
+
nearest source frame; frames are resized (short side 384, bicubic with antialias, only if needed), centre-cropped to
|
| 5 |
+
384 x 384 and ImageNet-normalised. Frame times (seconds) are kept: the model receives them.
|
| 6 |
+
Prompt: one user turn "<evidence>\\n{question}" (multiple choice: options as "A. ...", then the instruction line), Qwen3
|
| 7 |
+
chat template without a system prompt; the evidence positions are replaced by the 1024 video tokens.
|
| 8 |
+
"""
|
| 9 |
+
import numpy as np
|
| 10 |
+
import torch
|
| 11 |
+
import torch.nn.functional as F
|
| 12 |
+
|
| 13 |
+
VIS = "<|jepa_evidence|>"
|
| 14 |
+
IGNORE = -100
|
| 15 |
+
LETTERS = "ABCDEFGHIJ"
|
| 16 |
+
MC_SUFFIX = "Answer with the option's letter from the given choices directly."
|
| 17 |
+
IMAGENET_MEAN = (0.485, 0.456, 0.406)
|
| 18 |
+
IMAGENET_STD = (0.229, 0.224, 0.225)
|
| 19 |
+
# the chat template the model was trained and evaluated with (no system prompt, no thinking block)
|
| 20 |
+
CHAT_TEMPLATE = (
|
| 21 |
+
"{%- for message in messages -%}\n"
|
| 22 |
+
"{{- '<|im_start|>' + message['role'] + '\\n' + message['content'] + '<|im_end|>\\n' -}}\n"
|
| 23 |
+
"{%- endfor -%}\n"
|
| 24 |
+
"{%- if add_generation_prompt -%}{{- '<|im_start|>assistant\\n' -}}{%- endif -%}\n"
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
# ---- video ----------------------------------------------------------------------------------------------------------
|
| 29 |
+
def sample_times(duration: float, num_frames: int) -> np.ndarray:
|
| 30 |
+
"""uniform sampling: num_frames distinct times at the slot centres of [0, duration]"""
|
| 31 |
+
return (np.arange(num_frames) + 0.5) * duration / num_frames
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
def load_video(path: str, num_frames: int = 32, size: int = 384, start_sec=None, end_sec=None):
|
| 35 |
+
"""-> (video [3, T, size, size] float32 ImageNet-normalised, frame_times [T] float32 seconds).
|
| 36 |
+
start_sec / end_sec: optional visible span (seconds); a missing bound means the start / end of the video."""
|
| 37 |
+
try:
|
| 38 |
+
import decord
|
| 39 |
+
except ImportError as e: # pip install eva-decord (the `decord` module)
|
| 40 |
+
raise ImportError("JEPA-LLM video loading needs decord: pip install eva-decord==0.6.1") from e
|
| 41 |
+
vr = decord.VideoReader(path, num_threads=1)
|
| 42 |
+
fps = float(vr.get_avg_fps())
|
| 43 |
+
n = len(vr)
|
| 44 |
+
if start_sec is not None or end_sec is not None:
|
| 45 |
+
t0 = max(0.0, float(start_sec or 0.0))
|
| 46 |
+
t1 = min(n / fps, float(end_sec) if end_sec is not None else n / fps)
|
| 47 |
+
times = t0 + sample_times(max(t1 - t0, 0.0), num_frames)
|
| 48 |
+
else:
|
| 49 |
+
times = sample_times(n / fps, num_frames)
|
| 50 |
+
idx = np.clip(np.round(np.asarray(times) * fps).astype(int), 0, n - 1)
|
| 51 |
+
frames = torch.from_numpy(vr.get_batch(idx.tolist()).asnumpy()).permute(3, 0, 1, 2).float() / 255 # [3, T, H, W]
|
| 52 |
+
return preprocess_frames(frames, size), torch.as_tensor(idx / fps, dtype=torch.float32)
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def preprocess_frames(frames: torch.Tensor, size: int = 384) -> torch.Tensor:
|
| 56 |
+
"""frames [3, T, H, W] in 0..1 -> short side `size` (bicubic, antialias; only if needed), centre crop, ImageNet norm."""
|
| 57 |
+
h, w = frames.shape[-2:]
|
| 58 |
+
if min(h, w) != size:
|
| 59 |
+
s = size / min(h, w)
|
| 60 |
+
frames = F.interpolate(frames.transpose(0, 1), size=(round(h * s), round(w * s)), mode="bicubic",
|
| 61 |
+
antialias=True, align_corners=False).clamp(0, 1).transpose(0, 1)
|
| 62 |
+
h, w = frames.shape[-2:]
|
| 63 |
+
x = int(min(max(round(0.5 * w - size / 2), 0), w - size))
|
| 64 |
+
y = int(min(max(round(0.5 * h - size / 2), 0), h - size))
|
| 65 |
+
frames = frames[:, :, y:y + size, x:x + size]
|
| 66 |
+
mean = torch.tensor(IMAGENET_MEAN).view(3, 1, 1, 1)
|
| 67 |
+
std = torch.tensor(IMAGENET_STD).view(3, 1, 1, 1)
|
| 68 |
+
return (frames - mean) / std
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
# ---- prompts --------------------------------------------------------------------------------------------------------
|
| 72 |
+
def mc_prompt(question: str, options) -> str:
|
| 73 |
+
opts = "\n".join(f"{LETTERS[i]}. {o}" for i, o in enumerate(options))
|
| 74 |
+
return f"{question}\n{opts}\n{MC_SUFFIX}"
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
def letter_ids(tok, n: int):
|
| 78 |
+
ids = [tok(LETTERS[i], add_special_tokens=False)["input_ids"] for i in range(n)]
|
| 79 |
+
assert all(len(x) == 1 for x in ids), "option letters must be single tokens"
|
| 80 |
+
return [x[0] for x in ids]
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
def _render(tok, messages, gen):
|
| 84 |
+
return tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=gen)
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
def build_scoring_example(tok, user_content: str, n_vis: int):
|
| 88 |
+
"""The user turn + the assistant answer "A", rendered by the chat template; labels mark the assistant span
|
| 89 |
+
(as in training). The option scores are the logits at the position that predicts the FIRST label token.
|
| 90 |
+
-> dict(input_ids, labels, vis_mask)"""
|
| 91 |
+
assert user_content.count(VIS) == 1
|
| 92 |
+
msgs = [{"role": "user", "content": user_content}, {"role": "assistant", "content": "A"}]
|
| 93 |
+
full = _render(tok, msgs, False)
|
| 94 |
+
before, through = _render(tok, msgs[:1], True), _render(tok, msgs, False)
|
| 95 |
+
if not (through.startswith(before) and full.startswith(through)):
|
| 96 |
+
raise ValueError("chat template is not prefix-stable")
|
| 97 |
+
s, e = len(before), len(through)
|
| 98 |
+
pad = tok.pad_token_id if tok.pad_token_id is not None else tok.eos_token_id
|
| 99 |
+
pre, post = full.split(VIS)
|
| 100 |
+
pre_ids = tok(pre, add_special_tokens=False)["input_ids"]
|
| 101 |
+
enc = tok(post, add_special_tokens=False, return_offsets_mapping=True)
|
| 102 |
+
shift = len(pre) + len(VIS)
|
| 103 |
+
post_labels = [tid if (b > a and s <= a + shift and b + shift <= e) else IGNORE
|
| 104 |
+
for tid, (a, b) in zip(enc["input_ids"], enc["offset_mapping"])]
|
| 105 |
+
return {"input_ids": pre_ids + [pad] * n_vis + enc["input_ids"],
|
| 106 |
+
"labels": [IGNORE] * (len(pre_ids) + n_vis) + post_labels,
|
| 107 |
+
"vis_mask": [0] * len(pre_ids) + [1] * n_vis + [0] * len(enc["input_ids"])}
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
def build_generation_prompt(tok, user_content: str, n_vis: int):
|
| 111 |
+
"""User turn with one evidence placeholder + the assistant header. -> dict(input_ids, vis_mask)"""
|
| 112 |
+
assert user_content.count(VIS) == 1
|
| 113 |
+
pad = tok.pad_token_id if tok.pad_token_id is not None else tok.eos_token_id
|
| 114 |
+
text = _render(tok, [{"role": "user", "content": user_content}], True)
|
| 115 |
+
pre, post = text.split(VIS)
|
| 116 |
+
a = tok(pre, add_special_tokens=False)["input_ids"]
|
| 117 |
+
b = tok(post, add_special_tokens=False)["input_ids"]
|
| 118 |
+
return {"input_ids": a + [pad] * n_vis + b, "vis_mask": [0] * len(a) + [1] * n_vis + [0] * len(b)}
|
requirements.txt
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Versions of the environment this export was built and tested with (Python 3.12.3, CUDA 13.0 build of torch).
|
| 2 |
+
# transformers >= 5 is required (config uses the v5 `rope_parameters` format); other versions are untested.
|
| 3 |
+
torch==2.13.0
|
| 4 |
+
transformers==5.10.4
|
| 5 |
+
safetensors==0.8.0
|
| 6 |
+
tokenizers==0.22.2
|
| 7 |
+
huggingface-hub==1.33.0
|
| 8 |
+
numpy==2.5.2
|
| 9 |
+
jinja2==3.1.6
|
| 10 |
+
eva-decord==0.6.1 # provides the `decord` module used for video decoding
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4
|
| 3 |
+
size 11422654
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"151643": {
|
| 5 |
+
"content": "<|endoftext|>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": false,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"151644": {
|
| 13 |
+
"content": "<|im_start|>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"151645": {
|
| 21 |
+
"content": "<|im_end|>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
},
|
| 28 |
+
"151646": {
|
| 29 |
+
"content": "<|object_ref_start|>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false,
|
| 34 |
+
"special": true
|
| 35 |
+
},
|
| 36 |
+
"151647": {
|
| 37 |
+
"content": "<|object_ref_end|>",
|
| 38 |
+
"lstrip": false,
|
| 39 |
+
"normalized": false,
|
| 40 |
+
"rstrip": false,
|
| 41 |
+
"single_word": false,
|
| 42 |
+
"special": true
|
| 43 |
+
},
|
| 44 |
+
"151648": {
|
| 45 |
+
"content": "<|box_start|>",
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"normalized": false,
|
| 48 |
+
"rstrip": false,
|
| 49 |
+
"single_word": false,
|
| 50 |
+
"special": true
|
| 51 |
+
},
|
| 52 |
+
"151649": {
|
| 53 |
+
"content": "<|box_end|>",
|
| 54 |
+
"lstrip": false,
|
| 55 |
+
"normalized": false,
|
| 56 |
+
"rstrip": false,
|
| 57 |
+
"single_word": false,
|
| 58 |
+
"special": true
|
| 59 |
+
},
|
| 60 |
+
"151650": {
|
| 61 |
+
"content": "<|quad_start|>",
|
| 62 |
+
"lstrip": false,
|
| 63 |
+
"normalized": false,
|
| 64 |
+
"rstrip": false,
|
| 65 |
+
"single_word": false,
|
| 66 |
+
"special": true
|
| 67 |
+
},
|
| 68 |
+
"151651": {
|
| 69 |
+
"content": "<|quad_end|>",
|
| 70 |
+
"lstrip": false,
|
| 71 |
+
"normalized": false,
|
| 72 |
+
"rstrip": false,
|
| 73 |
+
"single_word": false,
|
| 74 |
+
"special": true
|
| 75 |
+
},
|
| 76 |
+
"151652": {
|
| 77 |
+
"content": "<|vision_start|>",
|
| 78 |
+
"lstrip": false,
|
| 79 |
+
"normalized": false,
|
| 80 |
+
"rstrip": false,
|
| 81 |
+
"single_word": false,
|
| 82 |
+
"special": true
|
| 83 |
+
},
|
| 84 |
+
"151653": {
|
| 85 |
+
"content": "<|vision_end|>",
|
| 86 |
+
"lstrip": false,
|
| 87 |
+
"normalized": false,
|
| 88 |
+
"rstrip": false,
|
| 89 |
+
"single_word": false,
|
| 90 |
+
"special": true
|
| 91 |
+
},
|
| 92 |
+
"151654": {
|
| 93 |
+
"content": "<|vision_pad|>",
|
| 94 |
+
"lstrip": false,
|
| 95 |
+
"normalized": false,
|
| 96 |
+
"rstrip": false,
|
| 97 |
+
"single_word": false,
|
| 98 |
+
"special": true
|
| 99 |
+
},
|
| 100 |
+
"151655": {
|
| 101 |
+
"content": "<|image_pad|>",
|
| 102 |
+
"lstrip": false,
|
| 103 |
+
"normalized": false,
|
| 104 |
+
"rstrip": false,
|
| 105 |
+
"single_word": false,
|
| 106 |
+
"special": true
|
| 107 |
+
},
|
| 108 |
+
"151656": {
|
| 109 |
+
"content": "<|video_pad|>",
|
| 110 |
+
"lstrip": false,
|
| 111 |
+
"normalized": false,
|
| 112 |
+
"rstrip": false,
|
| 113 |
+
"single_word": false,
|
| 114 |
+
"special": true
|
| 115 |
+
},
|
| 116 |
+
"151657": {
|
| 117 |
+
"content": "<tool_call>",
|
| 118 |
+
"lstrip": false,
|
| 119 |
+
"normalized": false,
|
| 120 |
+
"rstrip": false,
|
| 121 |
+
"single_word": false,
|
| 122 |
+
"special": false
|
| 123 |
+
},
|
| 124 |
+
"151658": {
|
| 125 |
+
"content": "</tool_call>",
|
| 126 |
+
"lstrip": false,
|
| 127 |
+
"normalized": false,
|
| 128 |
+
"rstrip": false,
|
| 129 |
+
"single_word": false,
|
| 130 |
+
"special": false
|
| 131 |
+
},
|
| 132 |
+
"151659": {
|
| 133 |
+
"content": "<|fim_prefix|>",
|
| 134 |
+
"lstrip": false,
|
| 135 |
+
"normalized": false,
|
| 136 |
+
"rstrip": false,
|
| 137 |
+
"single_word": false,
|
| 138 |
+
"special": false
|
| 139 |
+
},
|
| 140 |
+
"151660": {
|
| 141 |
+
"content": "<|fim_middle|>",
|
| 142 |
+
"lstrip": false,
|
| 143 |
+
"normalized": false,
|
| 144 |
+
"rstrip": false,
|
| 145 |
+
"single_word": false,
|
| 146 |
+
"special": false
|
| 147 |
+
},
|
| 148 |
+
"151661": {
|
| 149 |
+
"content": "<|fim_suffix|>",
|
| 150 |
+
"lstrip": false,
|
| 151 |
+
"normalized": false,
|
| 152 |
+
"rstrip": false,
|
| 153 |
+
"single_word": false,
|
| 154 |
+
"special": false
|
| 155 |
+
},
|
| 156 |
+
"151662": {
|
| 157 |
+
"content": "<|fim_pad|>",
|
| 158 |
+
"lstrip": false,
|
| 159 |
+
"normalized": false,
|
| 160 |
+
"rstrip": false,
|
| 161 |
+
"single_word": false,
|
| 162 |
+
"special": false
|
| 163 |
+
},
|
| 164 |
+
"151663": {
|
| 165 |
+
"content": "<|repo_name|>",
|
| 166 |
+
"lstrip": false,
|
| 167 |
+
"normalized": false,
|
| 168 |
+
"rstrip": false,
|
| 169 |
+
"single_word": false,
|
| 170 |
+
"special": false
|
| 171 |
+
},
|
| 172 |
+
"151664": {
|
| 173 |
+
"content": "<|file_sep|>",
|
| 174 |
+
"lstrip": false,
|
| 175 |
+
"normalized": false,
|
| 176 |
+
"rstrip": false,
|
| 177 |
+
"single_word": false,
|
| 178 |
+
"special": false
|
| 179 |
+
},
|
| 180 |
+
"151665": {
|
| 181 |
+
"content": "<tool_response>",
|
| 182 |
+
"lstrip": false,
|
| 183 |
+
"normalized": false,
|
| 184 |
+
"rstrip": false,
|
| 185 |
+
"single_word": false,
|
| 186 |
+
"special": false
|
| 187 |
+
},
|
| 188 |
+
"151666": {
|
| 189 |
+
"content": "</tool_response>",
|
| 190 |
+
"lstrip": false,
|
| 191 |
+
"normalized": false,
|
| 192 |
+
"rstrip": false,
|
| 193 |
+
"single_word": false,
|
| 194 |
+
"special": false
|
| 195 |
+
},
|
| 196 |
+
"151667": {
|
| 197 |
+
"content": "<think>",
|
| 198 |
+
"lstrip": false,
|
| 199 |
+
"normalized": false,
|
| 200 |
+
"rstrip": false,
|
| 201 |
+
"single_word": false,
|
| 202 |
+
"special": false
|
| 203 |
+
},
|
| 204 |
+
"151668": {
|
| 205 |
+
"content": "</think>",
|
| 206 |
+
"lstrip": false,
|
| 207 |
+
"normalized": false,
|
| 208 |
+
"rstrip": false,
|
| 209 |
+
"single_word": false,
|
| 210 |
+
"special": false
|
| 211 |
+
}
|
| 212 |
+
},
|
| 213 |
+
"additional_special_tokens": [
|
| 214 |
+
"<|im_start|>",
|
| 215 |
+
"<|im_end|>",
|
| 216 |
+
"<|object_ref_start|>",
|
| 217 |
+
"<|object_ref_end|>",
|
| 218 |
+
"<|box_start|>",
|
| 219 |
+
"<|box_end|>",
|
| 220 |
+
"<|quad_start|>",
|
| 221 |
+
"<|quad_end|>",
|
| 222 |
+
"<|vision_start|>",
|
| 223 |
+
"<|vision_end|>",
|
| 224 |
+
"<|vision_pad|>",
|
| 225 |
+
"<|image_pad|>",
|
| 226 |
+
"<|video_pad|>"
|
| 227 |
+
],
|
| 228 |
+
"bos_token": null,
|
| 229 |
+
"clean_up_tokenization_spaces": false,
|
| 230 |
+
"eos_token": "<|im_end|>",
|
| 231 |
+
"errors": "replace",
|
| 232 |
+
"model_max_length": 1010000,
|
| 233 |
+
"pad_token": "<|endoftext|>",
|
| 234 |
+
"split_special_tokens": false,
|
| 235 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 236 |
+
"unk_token": null,
|
| 237 |
+
"add_bos_token": false
|
| 238 |
+
}
|
vjepa2_1_encoder.py
ADDED
|
@@ -0,0 +1,400 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# V-JEPA 2.1 video encoder (ViT-g/16, 384 px, RoPE), inference-only copy.
|
| 2 |
+
#
|
| 3 |
+
# Adapted from facebookresearch/vjepa2 @ 204698b:
|
| 4 |
+
# app/vjepa_2_1/models/vision_transformer.py, app/vjepa_2_1/models/utils/{modules,patch_embed}.py, src/masks/utils.py
|
| 5 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates. Licensed under the MIT License (see LICENSE_VJEPA2 in this folder).
|
| 6 |
+
#
|
| 7 |
+
# Changes from upstream (numerics of the forward pass are unchanged):
|
| 8 |
+
# - only the pieces used by the video encoder are kept; the timm / einops imports are removed;
|
| 9 |
+
# - scaled_dot_product_attention receives q and k cast to v's dtype. Upstream's RoPE rotation returns q, k in fp32
|
| 10 |
+
# while v stays in the compute dtype; upstream always ran under autocast, which does this cast implicitly. This is
|
| 11 |
+
# the same cast the JEPA-LLM training / evaluation code applies when the encoder runs in bf16 without autocast;
|
| 12 |
+
# - the deprecated `torch.backends.cuda.sdp_kernel()` context (no arguments = all kernels enabled = default) is dropped.
|
| 13 |
+
import math
|
| 14 |
+
from functools import partial
|
| 15 |
+
|
| 16 |
+
import torch
|
| 17 |
+
import torch.nn as nn
|
| 18 |
+
import torch.nn.functional as F
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
def apply_masks(x, masks, concat=True):
|
| 22 |
+
"""x [B, N, D]; masks: list of [B, K] index tensors of the patches to KEEP."""
|
| 23 |
+
all_x = []
|
| 24 |
+
for m in masks:
|
| 25 |
+
mask_keep = m.unsqueeze(-1).repeat(1, 1, x.size(-1))
|
| 26 |
+
all_x += [torch.gather(x, dim=1, index=mask_keep)]
|
| 27 |
+
if not concat:
|
| 28 |
+
return all_x
|
| 29 |
+
return torch.cat(all_x, dim=0)
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
def drop_path(x, drop_prob: float = 0.0, training: bool = False):
|
| 33 |
+
if drop_prob == 0.0 or not training:
|
| 34 |
+
return x
|
| 35 |
+
keep = 1 - drop_prob
|
| 36 |
+
shape = (x.shape[0],) + (1,) * (x.ndim - 1)
|
| 37 |
+
return x * x.new_empty(shape).bernoulli_(keep) / keep
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
def rotate_queries_or_keys(x, pos, n_registers, has_cls_first):
|
| 41 |
+
B, num_heads, N, D = x.size()
|
| 42 |
+
assert D % 2 == 0, "Embedding dimension must be a multiple of 2 for block matrix rotation"
|
| 43 |
+
|
| 44 |
+
n_cls = 1 if has_cls_first else 0
|
| 45 |
+
start_ctx = n_cls
|
| 46 |
+
end_ctx = N - n_registers
|
| 47 |
+
|
| 48 |
+
x_cls = x[..., :n_cls, :] if n_cls else None
|
| 49 |
+
x_ctx = x[..., start_ctx:end_ctx, :]
|
| 50 |
+
x_reg = x[..., end_ctx:, :] if n_registers > 0 else None
|
| 51 |
+
|
| 52 |
+
omega = torch.arange(D // 2, dtype=x.dtype, device=x.device)
|
| 53 |
+
omega /= D / 2.0
|
| 54 |
+
omega = 1.0 / 10000**omega
|
| 55 |
+
freq = torch.einsum("..., f -> ... f", pos, omega)
|
| 56 |
+
|
| 57 |
+
emb_sin = freq.sin()
|
| 58 |
+
emb_cos = freq.cos()
|
| 59 |
+
|
| 60 |
+
emb_sin = emb_sin.repeat_interleave(2, dim=-1)
|
| 61 |
+
emb_cos = emb_cos.repeat_interleave(2, dim=-1)
|
| 62 |
+
|
| 63 |
+
y = x_ctx.unflatten(-1, (-1, 2))
|
| 64 |
+
y1, y2 = y.unbind(dim=-1)
|
| 65 |
+
y = torch.stack((-y2, y1), dim=-1)
|
| 66 |
+
y = y.flatten(-2)
|
| 67 |
+
|
| 68 |
+
out_ctx = (x_ctx * emb_cos) + (y * emb_sin)
|
| 69 |
+
|
| 70 |
+
parts = []
|
| 71 |
+
if n_cls:
|
| 72 |
+
parts.append(x_cls)
|
| 73 |
+
parts.append(out_ctx)
|
| 74 |
+
if n_registers:
|
| 75 |
+
parts.append(x_reg)
|
| 76 |
+
return torch.cat(parts, dim=-2)
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
class DropPath(nn.Module):
|
| 80 |
+
def __init__(self, drop_prob=None):
|
| 81 |
+
super().__init__()
|
| 82 |
+
self.drop_prob = drop_prob
|
| 83 |
+
|
| 84 |
+
def forward(self, x):
|
| 85 |
+
return drop_path(x, self.drop_prob, self.training)
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
class MLP(nn.Module):
|
| 89 |
+
def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.0):
|
| 90 |
+
super().__init__()
|
| 91 |
+
out_features = out_features or in_features
|
| 92 |
+
hidden_features = hidden_features or in_features
|
| 93 |
+
self.fc1 = nn.Linear(in_features, hidden_features)
|
| 94 |
+
self.act = act_layer()
|
| 95 |
+
self.fc2 = nn.Linear(hidden_features, out_features)
|
| 96 |
+
self.drop = nn.Dropout(drop)
|
| 97 |
+
|
| 98 |
+
def forward(self, x):
|
| 99 |
+
x = self.fc1(x)
|
| 100 |
+
x = self.act(x)
|
| 101 |
+
x = self.drop(x)
|
| 102 |
+
x = self.fc2(x)
|
| 103 |
+
x = self.drop(x)
|
| 104 |
+
return x
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
class SwiGLUFFN(nn.Module):
|
| 108 |
+
def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.SiLU, drop=0.0, wide_silu=True):
|
| 109 |
+
super().__init__()
|
| 110 |
+
out_features = out_features or in_features
|
| 111 |
+
swiglu_hidden_features = hidden_features = hidden_features or in_features
|
| 112 |
+
if wide_silu:
|
| 113 |
+
swiglu_hidden_features = int(2 * hidden_features / 3)
|
| 114 |
+
align_as = 8
|
| 115 |
+
swiglu_hidden_features = (swiglu_hidden_features + align_as - 1) // align_as * align_as
|
| 116 |
+
self.fc1 = nn.Linear(in_features, swiglu_hidden_features)
|
| 117 |
+
self.fc2 = nn.Linear(in_features, swiglu_hidden_features)
|
| 118 |
+
self.act = act_layer()
|
| 119 |
+
self.fc3 = nn.Linear(swiglu_hidden_features, out_features)
|
| 120 |
+
|
| 121 |
+
def forward(self, x):
|
| 122 |
+
return self.fc3(F.silu(self.fc1(x)) * self.fc2(x))
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
class RoPEAttention(nn.Module):
|
| 126 |
+
def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0.0, proj_drop=0.0, use_sdpa=True,
|
| 127 |
+
grid_size=14, is_causal=False, n_registers=0, has_cls_first=False, interpolate_rope=False, patch_size=16):
|
| 128 |
+
super().__init__()
|
| 129 |
+
self.num_heads = num_heads
|
| 130 |
+
self.head_dim = head_dim = dim // num_heads
|
| 131 |
+
self.scale = qk_scale or head_dim**-0.5
|
| 132 |
+
self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
|
| 133 |
+
self.attn_drop = nn.Dropout(attn_drop)
|
| 134 |
+
self.proj = nn.Linear(dim, dim)
|
| 135 |
+
self.proj_drop_prob = proj_drop
|
| 136 |
+
self.proj_drop = nn.Dropout(proj_drop)
|
| 137 |
+
self.use_sdpa = use_sdpa
|
| 138 |
+
self.d_dim = int(2 * ((head_dim // 3) // 2))
|
| 139 |
+
self.h_dim = int(2 * ((head_dim // 3) // 2))
|
| 140 |
+
self.w_dim = int(2 * ((head_dim // 3) // 2))
|
| 141 |
+
self.grid_size = grid_size
|
| 142 |
+
self.is_causal = is_causal
|
| 143 |
+
self.n_registers = n_registers
|
| 144 |
+
self.has_cls_first = has_cls_first
|
| 145 |
+
self.interpolate_rope = interpolate_rope
|
| 146 |
+
self.pretrained_patch_size = patch_size
|
| 147 |
+
if patch_size == 14:
|
| 148 |
+
self.pretrained_grid_size = int(252 / patch_size)
|
| 149 |
+
elif patch_size == 16:
|
| 150 |
+
self.pretrained_grid_size = int(256 / patch_size)
|
| 151 |
+
|
| 152 |
+
def _get_frame_pos(self, ids, H_patches=None, W_patches=None):
|
| 153 |
+
if H_patches is None or W_patches is None:
|
| 154 |
+
tokens_per_frame = int(self.grid_size * self.grid_size)
|
| 155 |
+
else:
|
| 156 |
+
tokens_per_frame = int(H_patches * W_patches)
|
| 157 |
+
return ids // tokens_per_frame
|
| 158 |
+
|
| 159 |
+
def _get_height_pos(self, ids, H_patches=None, W_patches=None):
|
| 160 |
+
if H_patches is None or W_patches is None:
|
| 161 |
+
tokens_per_frame = int(self.grid_size * self.grid_size)
|
| 162 |
+
tokens_per_row = self.grid_size
|
| 163 |
+
else:
|
| 164 |
+
tokens_per_frame = int(H_patches * W_patches)
|
| 165 |
+
tokens_per_row = W_patches
|
| 166 |
+
frame_ids = self._get_frame_pos(ids, H_patches, W_patches)
|
| 167 |
+
ids = ids - tokens_per_frame * frame_ids
|
| 168 |
+
return ids // tokens_per_row
|
| 169 |
+
|
| 170 |
+
def separate_positions(self, ids, H_patches=None, W_patches=None):
|
| 171 |
+
if H_patches is None or W_patches is None:
|
| 172 |
+
tokens_per_frame = int(self.grid_size * self.grid_size)
|
| 173 |
+
tokens_per_row = self.grid_size
|
| 174 |
+
else:
|
| 175 |
+
tokens_per_frame = int(H_patches * W_patches)
|
| 176 |
+
tokens_per_row = W_patches
|
| 177 |
+
frame_ids = self._get_frame_pos(ids, H_patches, W_patches)
|
| 178 |
+
height_ids = self._get_height_pos(ids, H_patches, W_patches)
|
| 179 |
+
width_ids = (ids - tokens_per_frame * frame_ids) - tokens_per_row * height_ids
|
| 180 |
+
return 1.0 * frame_ids, 1.0 * height_ids, 1.0 * width_ids
|
| 181 |
+
|
| 182 |
+
def forward(self, x, mask=None, T=None, H_patches=None, W_patches=None, return_attn=False):
|
| 183 |
+
B, N, C = x.size()
|
| 184 |
+
N_ctx = N - self.n_registers
|
| 185 |
+
grid_depth = int(N_ctx // (self.grid_size * self.grid_size))
|
| 186 |
+
|
| 187 |
+
qkv = self.qkv(x).unflatten(-1, (3, self.num_heads, -1)).permute(2, 0, 3, 1, 4)
|
| 188 |
+
q, k, v = qkv[0], qkv[1], qkv[2]
|
| 189 |
+
|
| 190 |
+
if mask is not None:
|
| 191 |
+
mask = mask.unsqueeze(1).repeat(1, self.num_heads, 1)
|
| 192 |
+
d_mask, h_mask, w_mask = self.separate_positions(mask, H_patches, W_patches)
|
| 193 |
+
else:
|
| 194 |
+
if T is None or H_patches is None or W_patches is None:
|
| 195 |
+
mask = torch.arange(int(grid_depth * self.grid_size * self.grid_size), device=x.device)
|
| 196 |
+
else:
|
| 197 |
+
mask = torch.arange(int(T * H_patches * W_patches), device=x.device)
|
| 198 |
+
d_mask, h_mask, w_mask = self.separate_positions(mask, H_patches, W_patches)
|
| 199 |
+
|
| 200 |
+
if self.interpolate_rope:
|
| 201 |
+
if H_patches is None:
|
| 202 |
+
H_patches = int(self.grid_size)
|
| 203 |
+
if W_patches is None:
|
| 204 |
+
W_patches = int(self.grid_size)
|
| 205 |
+
h_mask = h_mask * (self.pretrained_grid_size - 1) / (H_patches - 1)
|
| 206 |
+
w_mask = w_mask * (self.pretrained_grid_size - 1) / (W_patches - 1)
|
| 207 |
+
|
| 208 |
+
s = 0
|
| 209 |
+
qd = rotate_queries_or_keys(q[..., s:s + self.d_dim], pos=d_mask, n_registers=self.n_registers, has_cls_first=self.has_cls_first)
|
| 210 |
+
kd = rotate_queries_or_keys(k[..., s:s + self.d_dim], pos=d_mask, n_registers=self.n_registers, has_cls_first=self.has_cls_first)
|
| 211 |
+
s += self.d_dim
|
| 212 |
+
qh = rotate_queries_or_keys(q[..., s:s + self.h_dim], pos=h_mask, n_registers=self.n_registers, has_cls_first=self.has_cls_first)
|
| 213 |
+
kh = rotate_queries_or_keys(k[..., s:s + self.h_dim], pos=h_mask, n_registers=self.n_registers, has_cls_first=self.has_cls_first)
|
| 214 |
+
s += self.h_dim
|
| 215 |
+
qw = rotate_queries_or_keys(q[..., s:s + self.w_dim], pos=w_mask, n_registers=self.n_registers, has_cls_first=self.has_cls_first)
|
| 216 |
+
kw = rotate_queries_or_keys(k[..., s:s + self.w_dim], pos=w_mask, n_registers=self.n_registers, has_cls_first=self.has_cls_first)
|
| 217 |
+
s += self.w_dim
|
| 218 |
+
|
| 219 |
+
if s < self.head_dim:
|
| 220 |
+
q = torch.cat([qd, qh, qw, q[..., s:]], dim=-1)
|
| 221 |
+
k = torch.cat([kd, kh, kw, k[..., s:]], dim=-1)
|
| 222 |
+
else:
|
| 223 |
+
q = torch.cat([qd, qh, qw], dim=-1)
|
| 224 |
+
k = torch.cat([kd, kh, kw], dim=-1)
|
| 225 |
+
|
| 226 |
+
if self.use_sdpa:
|
| 227 |
+
# q, k come back from the fp32 rotation; cast to v's dtype (what autocast does upstream)
|
| 228 |
+
x = F.scaled_dot_product_attention(q.to(v.dtype), k.to(v.dtype), v, dropout_p=self.proj_drop_prob, is_causal=self.is_causal)
|
| 229 |
+
attn = None
|
| 230 |
+
else:
|
| 231 |
+
attn = (q @ k.transpose(-2, -1)) * self.scale
|
| 232 |
+
attn = attn.softmax(dim=-1)
|
| 233 |
+
attn = self.attn_drop(attn)
|
| 234 |
+
x = attn.to(v.dtype) @ v
|
| 235 |
+
x = x.transpose(1, 2).reshape(B, N, C)
|
| 236 |
+
x = self.proj(x)
|
| 237 |
+
x = self.proj_drop(x)
|
| 238 |
+
return (x, attn) if return_attn else (x, None)
|
| 239 |
+
|
| 240 |
+
|
| 241 |
+
class Block(nn.Module):
|
| 242 |
+
def __init__(self, dim, num_heads, mlp_ratio=4.0, qkv_bias=False, qk_scale=None, drop=0.0, attn_drop=0.0, drop_path=0.0,
|
| 243 |
+
act_layer=nn.GELU, wide_silu=True, norm_layer=nn.LayerNorm, use_sdpa=True, is_causal=False, grid_size=16,
|
| 244 |
+
use_rope=False, n_registers=0, has_cls_first=False, interpolate_rope=False, patch_size=16, **kwargs):
|
| 245 |
+
super().__init__()
|
| 246 |
+
assert use_rope, "this copy only supports the RoPE encoder of V-JEPA 2.1"
|
| 247 |
+
self.norm1 = norm_layer(dim)
|
| 248 |
+
self.use_rope = use_rope
|
| 249 |
+
self.attn = RoPEAttention(dim, num_heads=num_heads, qkv_bias=qkv_bias, qk_scale=qk_scale, attn_drop=attn_drop,
|
| 250 |
+
use_sdpa=use_sdpa, is_causal=is_causal, grid_size=grid_size, proj_drop=drop,
|
| 251 |
+
n_registers=n_registers, has_cls_first=has_cls_first, interpolate_rope=interpolate_rope,
|
| 252 |
+
patch_size=patch_size)
|
| 253 |
+
self.drop_path = DropPath(drop_path) if drop_path > 0.0 else nn.Identity()
|
| 254 |
+
self.norm2 = norm_layer(dim)
|
| 255 |
+
mlp_hidden_dim = int(dim * mlp_ratio)
|
| 256 |
+
if act_layer is nn.SiLU:
|
| 257 |
+
self.mlp = SwiGLUFFN(in_features=dim, hidden_features=mlp_hidden_dim, act_layer=act_layer, wide_silu=wide_silu, drop=drop)
|
| 258 |
+
else:
|
| 259 |
+
self.mlp = MLP(in_features=dim, hidden_features=mlp_hidden_dim, act_layer=act_layer, drop=drop)
|
| 260 |
+
|
| 261 |
+
def forward(self, x, mask=None, T=None, H_patches=None, W_patches=None, return_attn=False, mode="video"):
|
| 262 |
+
y, attn = self.attn(self.norm1(x), mask=mask, T=T, H_patches=H_patches, W_patches=W_patches, return_attn=return_attn)
|
| 263 |
+
x = x + self.drop_path(y)
|
| 264 |
+
x = x + self.drop_path(self.mlp(self.norm2(x)))
|
| 265 |
+
return (x, attn) if return_attn else (x, None)
|
| 266 |
+
|
| 267 |
+
|
| 268 |
+
class PatchEmbed3D(nn.Module):
|
| 269 |
+
def __init__(self, patch_size=16, tubelet_size=2, in_chans=3, embed_dim=768):
|
| 270 |
+
super().__init__()
|
| 271 |
+
self.patch_size = patch_size
|
| 272 |
+
self.tubelet_size = tubelet_size
|
| 273 |
+
self.proj = nn.Conv3d(in_channels=in_chans, out_channels=embed_dim, kernel_size=(tubelet_size, patch_size, patch_size),
|
| 274 |
+
stride=(tubelet_size, patch_size, patch_size))
|
| 275 |
+
|
| 276 |
+
def forward(self, x, **kwargs):
|
| 277 |
+
return self.proj(x).flatten(2).transpose(1, 2)
|
| 278 |
+
|
| 279 |
+
|
| 280 |
+
class VisionTransformer(nn.Module):
|
| 281 |
+
"""V-JEPA 2.1 encoder. forward(x [B, 3, T, H, W], training=True) returns the 4 hierarchical levels (outputs of blocks
|
| 282 |
+
9 / 19 / 29 / 39, each through its own LayerNorm) concatenated on the channel axis: [B, T/2 * H/16 * W/16, 4 * 1408]."""
|
| 283 |
+
|
| 284 |
+
def __init__(self, img_size=(224, 224), patch_size=16, num_frames=1, tubelet_size=2, in_chans=3, embed_dim=768, depth=12,
|
| 285 |
+
num_heads=12, mlp_ratio=4.0, qkv_bias=True, qk_scale=None, drop_rate=0.0, attn_drop_rate=0.0, drop_path_rate=0.0,
|
| 286 |
+
norm_layer=nn.LayerNorm, init_std=0.02, out_layers=None, uniform_power=False, use_silu=False, wide_silu=True,
|
| 287 |
+
use_sdpa=True, use_activation_checkpointing=False, is_causal=False, use_rope=False, init_type: str = "default",
|
| 288 |
+
handle_nonsquare_inputs=True, img_temporal_dim_size=None, n_registers=0, has_cls_first=False,
|
| 289 |
+
interpolate_rope=False, modality_embedding=True, n_output_distillation=4, **kwargs):
|
| 290 |
+
super().__init__()
|
| 291 |
+
self.num_features = self.embed_dim = embed_dim
|
| 292 |
+
self.num_heads = num_heads
|
| 293 |
+
self.out_layers = out_layers
|
| 294 |
+
self.init_type = init_type
|
| 295 |
+
self.handle_nonsquare_inputs = handle_nonsquare_inputs
|
| 296 |
+
self.img_temporal_dim_size = img_temporal_dim_size
|
| 297 |
+
if type(img_size) is int:
|
| 298 |
+
img_size = (img_size, img_size)
|
| 299 |
+
self.img_height, self.img_width = img_size
|
| 300 |
+
self.patch_size = patch_size
|
| 301 |
+
self.num_frames = num_frames
|
| 302 |
+
self.tubelet_size = tubelet_size
|
| 303 |
+
self.is_video = num_frames > 1
|
| 304 |
+
assert self.is_video and use_rope
|
| 305 |
+
self.use_activation_checkpointing = use_activation_checkpointing
|
| 306 |
+
dpr = [drop_path_rate * i / max(depth - 1, 1) for i in range(depth)]
|
| 307 |
+
self.patch_embed = PatchEmbed3D(patch_size=patch_size, tubelet_size=tubelet_size, in_chans=in_chans, embed_dim=embed_dim)
|
| 308 |
+
self.num_patches = (num_frames // tubelet_size) * (img_size[0] // patch_size) * (img_size[1] // patch_size)
|
| 309 |
+
# still-image patch embedding of the checkpoint (kept so the official weights load strictly; unused for video)
|
| 310 |
+
self.patch_embed_img = (PatchEmbed3D(patch_size=patch_size, tubelet_size=1, in_chans=in_chans, embed_dim=embed_dim)
|
| 311 |
+
if img_temporal_dim_size is not None else None)
|
| 312 |
+
self.uniform_power = uniform_power
|
| 313 |
+
self.use_rope = use_rope
|
| 314 |
+
self.blocks = nn.ModuleList([
|
| 315 |
+
Block(use_rope=use_rope, grid_size=img_size[0] // patch_size, grid_depth=num_frames // tubelet_size, dim=embed_dim,
|
| 316 |
+
num_heads=num_heads, mlp_ratio=mlp_ratio, use_sdpa=use_sdpa, is_causal=is_causal, qkv_bias=qkv_bias,
|
| 317 |
+
qk_scale=qk_scale, drop=drop_rate, act_layer=nn.SiLU if use_silu else nn.GELU, wide_silu=wide_silu,
|
| 318 |
+
attn_drop=attn_drop_rate, drop_path=dpr[i], norm_layer=norm_layer, n_registers=n_registers,
|
| 319 |
+
has_cls_first=has_cls_first, interpolate_rope=interpolate_rope, patch_size=patch_size)
|
| 320 |
+
for i in range(depth)])
|
| 321 |
+
self.attn_out = False
|
| 322 |
+
self.init_std = init_std
|
| 323 |
+
self.apply(self._init_weights)
|
| 324 |
+
self._rescale_blocks()
|
| 325 |
+
levels = {12: [2, 5, 8, 11], 24: [5, 11, 17, 23], 40: [9, 19, 29, 39], 48: [11, 23, 37, 47]}[depth]
|
| 326 |
+
self.hierarchical_layers = levels
|
| 327 |
+
self.out_layers_distillation = levels if n_output_distillation == 4 else [levels[-1]]
|
| 328 |
+
self.norms_block = nn.ModuleList([norm_layer(embed_dim) for _ in range(len(self.hierarchical_layers))])
|
| 329 |
+
self.cls_token = None
|
| 330 |
+
self.return_hierarchical = False
|
| 331 |
+
self.modality_embedding = False
|
| 332 |
+
if modality_embedding:
|
| 333 |
+
self.img_mod_embed = nn.Parameter(torch.zeros(1, 1, embed_dim))
|
| 334 |
+
self.video_mod_embed = nn.Parameter(torch.zeros(1, 1, embed_dim))
|
| 335 |
+
self.modality_embedding = True
|
| 336 |
+
|
| 337 |
+
def _init_weights(self, m):
|
| 338 |
+
# only matters for a model built without weights; the released weights overwrite everything
|
| 339 |
+
if isinstance(m, nn.LayerNorm):
|
| 340 |
+
if m.weight is not None and not m.weight.is_meta:
|
| 341 |
+
nn.init.constant_(m.bias, 0)
|
| 342 |
+
nn.init.constant_(m.weight, 1.0)
|
| 343 |
+
return
|
| 344 |
+
if isinstance(m, (nn.Linear, nn.Conv3d)) and not m.weight.is_meta:
|
| 345 |
+
nn.init.trunc_normal_(m.weight, std=self.init_std)
|
| 346 |
+
if m.bias is not None:
|
| 347 |
+
nn.init.constant_(m.bias, 0)
|
| 348 |
+
|
| 349 |
+
def _rescale_blocks(self):
|
| 350 |
+
for layer_id, layer in enumerate(self.blocks):
|
| 351 |
+
if not layer.attn.proj.weight.is_meta:
|
| 352 |
+
layer.attn.proj.weight.data.div_(math.sqrt(2.0 * (layer_id + 1)))
|
| 353 |
+
layer.mlp.fc2.weight.data.div_(math.sqrt(2.0 * (layer_id + 1)))
|
| 354 |
+
|
| 355 |
+
def check_temporal_dim(self, shape) -> bool:
|
| 356 |
+
return self.img_temporal_dim_size is not None and shape[2] == self.img_temporal_dim_size
|
| 357 |
+
|
| 358 |
+
def forward(self, x, masks=None, training=False):
|
| 359 |
+
if masks is not None and not isinstance(masks, list):
|
| 360 |
+
masks = [masks]
|
| 361 |
+
_, _, T, H, W = x.shape
|
| 362 |
+
T = T if self.check_temporal_dim(x.shape) else T // self.tubelet_size
|
| 363 |
+
H_patches, W_patches = H // self.patch_size, W // self.patch_size
|
| 364 |
+
if not self.handle_nonsquare_inputs:
|
| 365 |
+
T = H_patches = W_patches = None
|
| 366 |
+
if self.check_temporal_dim(x.shape):
|
| 367 |
+
x = self.patch_embed_img(x)
|
| 368 |
+
mode = "img"
|
| 369 |
+
if self.modality_embedding:
|
| 370 |
+
x += self.img_mod_embed.repeat(x.shape[0], 1, 1)
|
| 371 |
+
else:
|
| 372 |
+
x = self.patch_embed(x)
|
| 373 |
+
mode = "video"
|
| 374 |
+
if self.modality_embedding:
|
| 375 |
+
x += self.video_mod_embed.repeat(x.shape[0], 1, 1)
|
| 376 |
+
if masks is not None:
|
| 377 |
+
x = apply_masks(x, masks)
|
| 378 |
+
masks = torch.cat(masks, dim=0)
|
| 379 |
+
outs, hier = [], []
|
| 380 |
+
for i, blk in enumerate(self.blocks):
|
| 381 |
+
x, _ = blk(x, mask=masks, T=T, H_patches=H_patches, W_patches=W_patches, return_attn=self.attn_out, mode=mode)
|
| 382 |
+
if self.out_layers is not None and i in self.out_layers:
|
| 383 |
+
outs.append(self.norms_block[self.hierarchical_layers.index(i)](x))
|
| 384 |
+
if i in self.out_layers_distillation:
|
| 385 |
+
hier.append(self.norms_block[self.hierarchical_layers.index(i)](x))
|
| 386 |
+
if self.out_layers is not None:
|
| 387 |
+
return outs
|
| 388 |
+
if training or self.return_hierarchical:
|
| 389 |
+
return torch.cat(hier, dim=2)
|
| 390 |
+
return self.norms_block[-1](x)
|
| 391 |
+
|
| 392 |
+
|
| 393 |
+
def vjepa2_1_vit_giant_384(**kw):
|
| 394 |
+
"""The encoder of `vjepa2_1_vit_giant_384` (checkpoint vjepa2_1_vitg_384.pt, key target_encoder): ViT-g/16 with 22
|
| 395 |
+
heads ("xformers" layout), RoPE with interpolation, 384 x 384 input, tubelet 2, 4 output levels."""
|
| 396 |
+
args = dict(patch_size=16, img_size=(384, 384), num_frames=64, tubelet_size=2, use_sdpa=True, uniform_power=False,
|
| 397 |
+
use_rope=True, img_temporal_dim_size=1, interpolate_rope=True, embed_dim=1408, depth=40, num_heads=22,
|
| 398 |
+
mlp_ratio=48 / 11, qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), n_output_distillation=4)
|
| 399 |
+
args.update(kw)
|
| 400 |
+
return VisionTransformer(**args)
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|