bramsterling commited on
Commit
4522ddc
·
verified ·
1 Parent(s): 84e2d30

Initial public commit

Browse files
README.md CHANGED
@@ -1,5 +1,274 @@
1
- ---
2
- license: other
3
- license_name: health-ai-developer-foundations
4
- license_link: https://developers.google.com/health-ai-developer-foundations/terms
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: health-ai-developer-foundations
4
+ license_link: https://developers.google.com/health-ai-developer-foundations/terms
5
+ library_name: transformers
6
+ tags:
7
+ - vision
8
+ pipeline_tag: zero-shot-image-classification
9
+ ---
10
+ # MedSigLIP Model Card
11
+
12
+ **Model documentation**:
13
+ [MedSigLIP](https://developers.google.com/health-ai-developer-foundations/medsiglip)
14
+
15
+ **Resources:**
16
+
17
+ * Model on Google Cloud [Model Garden](https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/medsiglip)
18
+ * [GitHub repository](https://github.com/google-health/medsiglip) (supporting code, Colab notebooks, discussions, and issues)
19
+ * Quick start [notebook](https://colab.research.google.com/github/google-health/medsiglip/blob/main/notebooks/quick_start_with_hugging_face.ipynb)
20
+ * Fine-tuning [notebook](https://colab.research.google.com/github/google-health/medsiglip/blob/main/notebooks/fine_tune_with_hugging_face.ipynb)
21
+ * Support: See [Contact](https://developers.google.com/health-ai-developer-foundations/medsiglip/get-started.md#contact)
22
+ * License: The use of MedSigLIP is governed by the [Health AI Developer Foundations terms of use](https://developers.google.com/health-ai-developer-foundations/terms).
23
+
24
+ **Author:** Google
25
+
26
+ **Model information**
27
+
28
+ This section describes the MedSigLIP model and how to use it.
29
+
30
+ **Description**
31
+
32
+ MedSigLIP is a variant of [SigLIP](https://arxiv.org/abs/2303.15343) (Sigmoid Loss for Language Image Pre-training) that is trained to encode medical images and text into a common embedding space. Developers can use MedSigLIP to accelerate building healthcare-based AI applications. MedSigLIP contains a 400M parameter vision encoder and 400M parameter text encoder, it supports 448x448 image resolution with up to 64 text tokens.
33
+
34
+ MedSigLIP was trained on a variety of de-identified medical image and text pairs, including chest X-rays, dermatology images, ophthalmology images, histopathology slides, and slices of CT and MRI volumes, along with associated descriptions or reports. This training data was combined with natural (non-medical) image and text pairs to retain MedSigLIP’s ability to parse natural images.
35
+
36
+ MedSigLIP is recommended for medical image interpretation applications without a need for text generation, such as data-efficient classification, zero-shot classification, and semantic image retrieval. For medical applications that require text generation, [MedGemma](http://goo.gle/medgemma) is recommended.
37
+
38
+ **How to use**
39
+
40
+ * Get started using MedSigLIP via the Hugging Face and Google Cloud Model Garden links provided above, along with its accompanying documentation and demo notebooks.
41
+
42
+ Below are some example code snippets to help you quickly get started running the MedSigLIP model locally. If you want to use the model at scale, we recommend that you create a production version using [Model Garden](https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/medsiglip).
43
+
44
+ ```
45
+ import numpy as np
46
+ from PIL import Image
47
+ import requests
48
+ from transformers import AutoProcessor, AutoModel, SiglipVisionModel
49
+ from tensorflow.image import resize as tf_resize
50
+ import torch
51
+
52
+ device = "cuda" if torch.cuda.is_available() else "cpu"
53
+
54
+ model = AutoModel.from_pretrained("google/medsiglip-448").to(device)
55
+ processor = AutoProcessor.from_pretrained("google/medsiglip-448")
56
+
57
+
58
+ # Download sample image
59
+ !wget -nc -q https://storage.googleapis.com/dx-scin-public-data/dataset/images/3445096909671059178.png
60
+ !wget -nc -q https://storage.googleapis.com/dx-scin-public-data/dataset/images/-5669089898008966381.png
61
+ imgs = [Image.open("3445096909671059178.png").convert("RGB"), Image.open("-5669089898008966381.png").convert("RGB")]
62
+
63
+ # We recommend a resizing operation with tf.image.resize to match the
64
+ # implementation with the Big Vision library
65
+ # (https://github.com/google-research/big_vision/blob/0127fb6b337ee2a27bf4e54dea79cff176527356/big_vision/pp/ops_image.py#L84)
66
+ def resize(image):
67
+ return Image.fromarray(tf_resize(images=image,
68
+ size=[448, 448],
69
+ method='bilinear',
70
+ antialias=False).numpy().astype(np.uint8))
71
+
72
+ resized_imgs = [resize(img) for img in imgs]
73
+
74
+ texts = ["a photo of an arm with no rash",
75
+ "a photo of an arm with a rash",
76
+ "a photo of a leg with no rash",
77
+ "a photo of a leg with a rash"]
78
+
79
+ inputs = processor(text=texts, images=resized_imgs, padding="max_length", return_tensors="pt").to(device)
80
+
81
+ with torch.no_grad():
82
+ outputs = model(**inputs)
83
+
84
+ logits_per_image = outputs.logits_per_image
85
+ probs = torch.softmax(logits_per_image, dim=1)
86
+
87
+ for n_img, img in enumerate(imgs):
88
+ display(img) # Note this is an IPython function that will only work in a Jupyter notebook environment
89
+ for i, label in enumerate(texts):
90
+ print(f"{probs[n_img][i]:.2%} that image is '{label}'")
91
+
92
+ # We can also get the actual embeddings
93
+ print(f"\nimage embeddings: {outputs.image_embeds}")
94
+ print(f"\ntext embeddings: {outputs.text_embeds}")
95
+ ```
96
+
97
+ **Examples**
98
+
99
+ See the following Colab notebooks for examples of how to use MedSigLIP:
100
+
101
+ * To give the model a quick try running it locally with weights from Hugging Face, see [Quick start notebook in Colab](https://colab.research.google.com/github/google-health/medsiglip/blob/main/notebooks/quick_start_with_hugging_face.ipynb).
102
+ * For an example of fine-tuning the model, see the [Fine-tuning notebook in Colab](https://colab.research.google.com/github/google-health/medsiglip/blob/main/notebooks/fine_tune_with_hugging_face.ipynb)
103
+
104
+ **Model architecture overview**
105
+
106
+ MedSigLIP is based on SigLIP-400M ([Zhai et al., 2023](https://openaccess.thecvf.com/content/ICCV2023/html/Zhai_Sigmoid_Loss_for_Language_Image_Pre-Training_ICCV_2023_paper.html)) and is the same encoder that powers image interpretation in the [MedGemma](http://goo.gle/medgemma) generative model. MedSigLIP’s image component is a 400M vision transformer and its text component is a 400M text transformer.
107
+
108
+ ## **Technical Specifications**
109
+
110
+ * Model type: Two tower encoder architecture comprised of a vision transformer and text transformer
111
+ * Image resolution: 448 x 448
112
+ * Context length: 64 tokens
113
+ * Modalities: Image, text
114
+ * Key publication: https://arxiv.org/abs/2507.05201
115
+ * Model created: July 9, 2025
116
+ * Model Version: 1.0.0
117
+
118
+
119
+ **Citation**
120
+ When using this model, please cite:
121
+ Sellergren, Andrew, et al. "MedGemma Technical Report." *arXiv preprint arXiv:2507.05201* (2025).
122
+
123
+ ```
124
+ @article{sellergren2025medgemma,
125
+ title={MedGemma Technical Report},
126
+ author={Sellergren, Andrew and Kazemzadeh, Sahar and Jaroensri, Tiam and Kiraly, Atilla and Traverse, Madeleine and Kohlberger, Timo and Xu, Shawn and Jamil, Fayaz and Hughes, Cían and Lau, Charles and others},
127
+ journal={arXiv preprint arXiv:2507.05201},
128
+ year={2025}
129
+ }
130
+ ```
131
+
132
+ **Inputs and outputs**
133
+
134
+ **Input:**
135
+
136
+ MedSigLIP accepts images and text as inputs.
137
+
138
+ * Images, normalized to values in the range (-1, 1\) and to 448 x 448 resolution
139
+ * Text string, such as a caption or candidate classification label
140
+
141
+ **Output:**
142
+
143
+ * Image embedding if input image is provided
144
+ * Text embedding if input text is provided
145
+ * Similarity score between the image and text
146
+
147
+ **Performance and validation**
148
+ MedSigLIP was evaluated across a range of medical image modalities, focusing on chest X-ray, pathology, dermatology and ophthalmology.
149
+
150
+ The following table summarizes zero-shot AUCs for Chest X-Ray Findings with Med-SigLIP and ELIXR ([Xu et al., 2023](https://arxiv.org/abs/2308.01317)), based on CXR evaluation data from ELIXR. In all cases, 518 examples were used for 2-class classification. Note that MedSigLIP accepts inputs of size 448x448 while ELIXR accepts inputs of size 1280x1280.
151
+
152
+ | Finding | Med-SigLIP Zero-Shot | ELIXR Zero-Shot\* |
153
+ | :---- | ----- | ----- |
154
+ | Enlarged Cardiomediastinum | 0.858 | 0.800 |
155
+ | Cardiomegaly | 0.904 | 0.891 |
156
+ | Lung Opacity | 0.931 | 0.888 |
157
+ | Lung Lesion | 0.822 | 0.747 |
158
+ | Consolidation | 0.880 | 0.875 |
159
+ | Edema | 0.891 | 0.880 |
160
+ | Pneumonia | 0.864 | 0.881 |
161
+ | Atelectasis | 0.836 | 0.754 |
162
+ | Pneumothorax | 0.862 | 0.800 |
163
+ | Pleural Effusion | 0.914 | 0.930 |
164
+ | Pleural Other | 0.650 | 0.729 |
165
+ | Fracture | 0.708 | 0.637 |
166
+ | Support Devices | 0.852 | 0.894 |
167
+ | **Average** | **0.844** | **0.824** |
168
+
169
+ \*Prior reported results from ([Xu et al., 2023](https://arxiv.org/abs/2308.01317))
170
+
171
+ The following table summarizes AUCs for Dermatology, Ophthalmology, and Pathology Findings with Med-SigLIP compared to existing HAI-DEF embeddingmodels (Derm Foundation and Path Foundation, [goo.gle/hai-def](http://goo.gle/hai-def)). Note that MedSigLIP accepts inputs of size 448x448 while Derm Foundation accepts inputs of size 448x448 and Path Foundation accepts inputs of size 224x224.
172
+
173
+ | Domain | Finding | Size | Num Classes | Med-SigLIP Zero-Shot | Med-SigLIP Linear Probe | HAI-DEF Linear Probe\* |
174
+ | :---- | :---- | ----- | ----- | ----- | ----- | ----- |
175
+ | Dermatology | Skin Conditions | 1612 | 79 | 0.851 | 0.881 | 0.843 |
176
+ | Ophthalmology | Diabetic Retinopathy | 3161 | 5 | 0.759 | 0.857 | N/A |
177
+ | Pathology | Invasive Breast Cancer | 5000 | 3 | 0.933 | 0.930 | 0.943 |
178
+ | | Breast NP | 5000 | 3 | 0.721 | 0.727 | 0.758 |
179
+ | | Breast TF | 5000 | 3 | 0.780 | 0.790 | 0.832 |
180
+ | | Cervical Dysplasia | 5000 | 3 | 0.889 | 0.864 | 0.898 |
181
+ | | Prostate Cancer Needles Core Biopsy | 5000 | 4 | 0.892 | 0.886 | 0.915 |
182
+ | | Radical Prostatectomy | 5000 | 4 | 0.896 | 0.887 | 0.921 |
183
+ | | TCGA Study Types | 5000 | 10 | 0.922 | 0.970 | 0.964 |
184
+ | | Tissue Types | 5000 | 16 | 0.930 | 0.972 | 0.947 |
185
+ | **Average** | | | | **0.870** | **0.878** | **0.897** |
186
+
187
+ \* HAI-DEF pathology results are based on prior reported results from [Yang et al., 2024](https://arxiv.org/abs/2405.03162).
188
+
189
+ **Data card**
190
+ **Training**
191
+ MedSigLIP was trained on a variety of de-identified medical image and text pairs, including chest X-rays, dermatology images, ophthalmology images, histopathology slides, and slices of CT and MRI volumes, along with associated descriptions or reports. This training data was combined with natural (non-medical) image and text pairs to retain MedSigLIP’s ability to parse natural images.
192
+
193
+ **Evaluation**
194
+ MedSigLIP has been evaluated on a comprehensive set of evaluation datasets on 23 tasks across 4 modalities and benchmarked against modality-specific HAI-DEF models from Google.
195
+
196
+ **Source**
197
+ MedSigLIP training utilized a combination of public and private datasets.
198
+
199
+ This model was trained on diverse public datasets including MIMIC-CXR (chest X-rays and reports), Slake-VQA, PAD-UFES-20 (skin lesion images and data), SCIN (dermatology images), TCGA (cancer genomics data), CAMELYON (lymph node histopathology images), PMC-OA (biomedical literature with images), and Mendeley Digital Knee X-Ray (knee X-rays).
200
+
201
+ Additionally, multiple diverse proprietary datasets were licensed and incorporated (described next).
202
+
203
+ **Data Ownership and Documentation**
204
+
205
+ * [MIMIC-CXR](https://physionet.org/content/mimic-cxr/2.1.0/): MIT Laboratory for Computational Physiology and Beth Israel Deaconess Medical Center (BIDMC).
206
+ * [SLAKE](https://www.med-vqa.com/slake/): The Hong Kong Polytechnic University (PolyU), with collaborators including West China Hospital of Sichuan University and Sichuan Academy of Medical Sciences / Sichuan Provincial People's Hospital.
207
+ * [PAD-UFES-20](https://pmc.ncbi.nlm.nih.gov/articles/PMC7479321/): Federal University of Espírito Santo (UFES), Brazil, through its Dermatological and Surgical Assistance Program (PAD).
208
+ * [SCIN](https://github.com/google-research-datasets/scin): A collaboration between Google Health and Stanford Medicine.
209
+ * [TCGA](https://portal.gdc.cancer.gov/) (The Cancer Genome Atlas): A joint effort of National Cancer Institute and National Human Genome Research Institute. Data from TCGA are available via the Genomic Data Commons (GDC)
210
+ * [CAMELYON](https://camelyon17.grand-challenge.org/Data/): The data was collected from Radboud University Medical Center and University Medical Center Utrecht in the Netherlands.
211
+ * [PMC-OA (PubMed Central Open Access Subset)](https://catalog.data.gov/dataset/pubmed-central-open-access-subset-pmc-oa): Maintained by the National Library of Medicine (NLM) and National Center for Biotechnology Information (NCBI), which are part of the NIH.
212
+ * [Mendeley Digital Knee X-Ray](https://data.mendeley.com/datasets/t9ndx37v5h/1): This dataset is from Rani Channamma University, and is hosted on Mendeley Data.
213
+
214
+
215
+ **In addition to the public datasets listed above, MedSigLIP was also trained on de-identified, licensed datasets or datasets collected internally at Google from consented participants.**
216
+
217
+ * **Radiology dataset 1:** De-identified dataset of different CT and MRI studies across body parts from a US-based radiology outpatient diagnostic center network.
218
+ * **Ophthalmology dataset 1 (EyePACS):** De-identified dataset of fundus images from diabetic retinopathy screening.
219
+ * **Dermatology dataset 1:** De-identified dataset of teledermatology skin condition images (both clinical and dermatoscopic) from Colombia.
220
+ * **Dermatology dataset 2:** De-identified dataset of skin cancer images (both clinical and dermatoscopic) from Australia.
221
+ * **Dermatology dataset 3:** De-identified dataset of non-diseased skin images from an internal data collection effort.
222
+ * **Pathology dataset 1:** De-identified dataset of histopathology H\&E whole slide images created in collaboration with an academic research hospital and biobank in Europe. Comprises de-identified colon, prostate, and lymph nodes.
223
+ * **Pathology dataset 2:** De-identified dataset of lung histopathology H\&E and IHC whole slide images created by a commercial biobank in the United States.
224
+ * **Pathology dataset 3:** De-identified dataset of prostate and lymph node H\&E and IHC histopathology whole slide images created by a contract research organization in the United States.
225
+ * **Pathology dataset 4:** De-identified dataset of histopathology whole slide images created in collaboration with a large, tertiary teaching hospital in the United States. Comprises a diverse set of tissue and stain types, predominantly H\&E.
226
+
227
+ ### Data citation
228
+
229
+ * **MIMIC-CXR:** Johnson, A., Pollard, T., Mark, R., Berkowitz, S., & Horng, S. (2024). MIMIC-CXR Database (version 2.1.0). PhysioNet. https://physionet.org/content/mimic-cxr/2.1.0/ *and* Johnson, Alistair E. W., Tom J. Pollard, Seth J. Berkowitz, Nathaniel R. Greenbaum, Matthew P. Lungren, Chih-Ying Deng, Roger G. Mark, and Steven Horng. 2019\. "MIMIC-CXR, a de-Identified Publicly Available Database of Chest Radiographs with Free-Text Reports." *Scientific Data 6* (1): 1–8.
230
+ * **SLAKE:** Liu, Bo, Li-Ming Zhan, Li Xu, Lin Ma, Yan Yang, and Xiao-Ming Wu. 2021.SLAKE: A Semantically-Labeled Knowledge-Enhanced Dataset for Medical Visual Question Answering." http://arxiv.org/abs/2102.09542.
231
+ * **PAD-UEFS-20:** Pacheco, Andre GC, et al. "PAD-UFES-20: A skin lesion dataset composed of patient data and clinical images collected from smartphones." Data in brief 32 (2020): 106221\.
232
+ * **SCIN:** Ward, Abbi, Jimmy Li, Julie Wang, Sriram Lakshminarasimhan, Ashley Carrick, Bilson Campana, Jay Hartford, et al. 2024\. "Creating an Empirical Dermatology Dataset Through Crowdsourcing With Web Search Advertisements." *JAMA Network Open 7* (11): e2446615–e2446615.
233
+ * **TCGA:** The results shown here are in whole or part based upon data generated by the TCGA Research Network: https://www.cancer.gov/tcga.
234
+ * **CAMELYON16:** Ehteshami Bejnordi, Babak, Mitko Veta, Paul Johannes van Diest, Bram van Ginneken, Nico Karssemeijer, Geert Litjens, Jeroen A. W. M. van der Laak, et al. 2017\. "Diagnostic Assessment of Deep Learning Algorithms for Detection of Lymph Node Metastases in Women With Breast Cancer." *JAMA 318* (22): 2199–2210.
235
+ * **Mendeley Digital Knee X-Ray:** Gornale, Shivanand; Patravali, Pooja (2020), "Digital Knee X-ray Images", Mendeley Data, V1, doi: 10.17632/t9ndx37v5h.1
236
+
237
+ ### De-identification/anonymization:
238
+
239
+ Google and partnerships utilize datasets that have been rigorously anonymized or de-identified to ensure the protection of individual research participants and patient privacy
240
+
241
+ ## Implementation information
242
+
243
+ Details about the model internals.
244
+
245
+ ### Software
246
+
247
+ Training was done using [JAX](https://github.com/jax-ml/jax).
248
+
249
+ JAX allows researchers to take advantage of the latest generation of hardware, including TPUs, for faster and more efficient training of large models.
250
+
251
+ ## Use and limitations
252
+
253
+ ### Intended use
254
+
255
+ MedSigLIP is a machine learning-based software development tool that generates numerical representations from input images and associated text. These representations are referred to as embeddings. MedSigLIP is designed for use by software developers and researchers to facilitate the creation and development of third-party healthcare applications that involve medical images and text. MedSigLIP itself does not provide any medical functionality, nor is it intended to process or interpret medical data for a medical purpose. MedSigLIP is a software development tool and is not a finished product. Developers are responsible for training, adapting, and making meaningful changes to MedSigLip to accomplish their specific intended use.
256
+
257
+ The embeddings that MedSigLIP generates can be used for downstream tasks such as classification, regression, and semantic search. Numerical scores based on calculations performed on the embeddings can be thresholded for classification, or semantic search use-cases, allowing developers to control for precision and recall. Embedding-based models enable developers to create solutions that can be more compute efficient for fine-tuning classification tasks, such as training classifiers.. Thus, MedSigLIP is recommended for applications requiring strong classification performance without the need for text generation. MedSigLIP has been specifically pre-trained on a variety of de-identified pairs of medical images and text, including chest X-rays, CT slices, MRI slices, dermatology images, ophthalmology images, and histopathology patches. MedSigLip is intended to be used by software developers, to be adapted for use in image based applications in healthcare domains such as radiology, pathology, ophthalmology, and dermatology.
258
+
259
+ ### Benefits
260
+
261
+ * Provides strong baseline medical image and text encodings.
262
+ * Lightweight model that can be used in settings with limited high-bandwidth memory accelerator access.
263
+ * MedSigLIP’s strong performance makes it efficient to adapt for downstream healthcare-based use cases, compared to models of similar size without medical data pre-training.
264
+
265
+ ### Limitations
266
+
267
+ MedSigLIP is not intended to be used without appropriate validation, adaptation, and/or making meaningful modification by developers for their specific use case. Without the above, outputs generated by the MedSigLip model are not intended to directly inform clinical diagnosis, patient management decisions, treatment recommendations, or any other direct clinical practice applications. Any software application developed using MedSigLip that is intended for a medical purpose must be independently validated and is subject to its own regulatory requirements
268
+
269
+ MedSigLIP is not intended to be used without appropriate validation, adaptation and/or making meaningful modification by developers for their specific use case. The outputs generated by MedSigLIP are not intended to directly inform clinical diagnosis, patient management decisions, treatment recommendations, or any other direct clinical practice applications. Performance benchmarks highlight baseline capabilities, but even for image and text domains that constitute a substantial portion of training data, inaccurate model output is possible. All outputs from MedSigLIP should be considered preliminary and require independent verification, clinical correlation, and further investigation through established research and development methodologies.
270
+
271
+ When adapting MedSigLIP developer should consider the following:
272
+
273
+ * **Bias in validation data:** As with any research, developers should ensure that any downstream application is validated to understand performance using data that is appropriately representative of the intended use setting for the specific application (e.g., age, sex, gender, condition, imaging device, etc).
274
+ * **Data contamination concerns**: When evaluating the generalization capabilities of a model like MedSigLIP in a medical context, there is a risk of data contamination, where the model might have inadvertently seen related medical information during its pre-training, potentially overestimating its true ability to generalize to novel medical concepts. Developers should validate MedSigLIP on datasets not publicly available or otherwise made available to non-institutional researchers to mitigate this risk.
config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "SiglipModel"
4
+ ],
5
+ "initializer_factor": 1.0,
6
+ "model_type": "siglip",
7
+ "text_config": {
8
+ "attention_dropout": 0.0,
9
+ "hidden_act": "gelu_pytorch_tanh",
10
+ "hidden_size": 1152,
11
+ "intermediate_size": 4304,
12
+ "layer_norm_eps": 1e-06,
13
+ "max_position_embeddings": 64,
14
+ "model_type": "siglip_text_model",
15
+ "num_attention_heads": 16,
16
+ "num_hidden_layers": 27,
17
+ "projection_size": 1152,
18
+ "vocab_size": 32000
19
+ },
20
+ "torch_dtype": "float32",
21
+ "transformers_version": "4.52.4",
22
+ "vision_config": {
23
+ "attention_dropout": 0.0,
24
+ "hidden_act": "gelu_pytorch_tanh",
25
+ "hidden_size": 1152,
26
+ "image_size": 448,
27
+ "intermediate_size": 4304,
28
+ "layer_norm_eps": 1e-06,
29
+ "model_type": "siglip_vision_model",
30
+ "num_attention_heads": 16,
31
+ "num_channels": 3,
32
+ "num_hidden_layers": 27,
33
+ "patch_size": 14
34
+ }
35
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e1722b8100cca8b87cfe16e42140737aa6d312854e9e6bc24dff6db70e21d72
3
+ size 3513309984
preprocessor_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_rescale": true,
4
+ "do_resize": true,
5
+ "image_mean": [0.5, 0.5, 0.5],
6
+ "image_processor_type": "SiglipImageProcessor",
7
+ "image_std": [0.5, 0.5, 0.5],
8
+ "processor_class": "SiglipProcessor",
9
+ "resample": 3,
10
+ "rescale_factor": 0.00392156862,
11
+ "size": {
12
+ "height": 448,
13
+ "width": 448
14
+ }
15
+ }
16
+
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "eos_token": {
3
+ "content": "</s>",
4
+ "lstrip": true,
5
+ "normalized": false,
6
+ "rstrip": true,
7
+ "single_word": false
8
+ },
9
+ "pad_token": {
10
+ "content": "</s>",
11
+ "lstrip": true,
12
+ "normalized": false,
13
+ "rstrip": true,
14
+ "single_word": false
15
+ },
16
+ "unk_token": {
17
+ "content": "<unk>",
18
+ "lstrip": true,
19
+ "normalized": false,
20
+ "rstrip": true,
21
+ "single_word": false
22
+ }
23
+ }
24
+
spiece.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e5036bed065526c3c212dfbe288752391797c4bb1a284aa18c9a0b23fcaf8ec
3
+ size 798330
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "1": {
4
+ "content": "</s>",
5
+ "lstrip": true,
6
+ "normalized": false,
7
+ "rstrip": true,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "2": {
12
+ "content": "<unk>",
13
+ "lstrip": true,
14
+ "normalized": false,
15
+ "rstrip": true,
16
+ "single_word": false,
17
+ "special": true
18
+ }
19
+ },
20
+ "additional_special_tokens": [],
21
+ "clean_up_tokenization_spaces": true,
22
+ "do_lower_case": true,
23
+ "eos_token": "</s>",
24
+ "extra_special_tokens": {},
25
+ "model_input_names": [
26
+ "input_ids"
27
+ ],
28
+ "model_max_length": 64,
29
+ "pad_token": "</s>",
30
+ "processor_class": "SiglipProcessor",
31
+ "sp_model_kwargs": {},
32
+ "tokenizer_class": "SiglipTokenizer",
33
+ "unk_token": "<unk>"
34
+ }
35
+