vit-gpt2-image-captioning-onnx-quantization
Browse files- vit-gpt2-image-captioning-onnx-quantization/.gitattributes +35 -0
- vit-gpt2-image-captioning-onnx-quantization/config.json +76 -0
- vit-gpt2-image-captioning-onnx-quantization/gpt2_decoder_quantized.onnx +3 -0
- vit-gpt2-image-captioning-onnx-quantization/merges.txt +0 -0
- vit-gpt2-image-captioning-onnx-quantization/model_metadata.json +26 -0
- vit-gpt2-image-captioning-onnx-quantization/preprocessor_config.json +23 -0
- vit-gpt2-image-captioning-onnx-quantization/source.txt +1 -0
- vit-gpt2-image-captioning-onnx-quantization/special_tokens_map.json +30 -0
- vit-gpt2-image-captioning-onnx-quantization/tokenizer.json +0 -0
- vit-gpt2-image-captioning-onnx-quantization/tokenizer_config.json +28 -0
- vit-gpt2-image-captioning-onnx-quantization/vit_encoder_quantized.onnx +3 -0
- vit-gpt2-image-captioning-onnx-quantization/vocab.json +0 -0
vit-gpt2-image-captioning-onnx-quantization/.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz 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
|
vit-gpt2-image-captioning-onnx-quantization/config.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"VisionEncoderDecoderModel"
|
| 4 |
+
],
|
| 5 |
+
"bos_token_id": 50256,
|
| 6 |
+
"decoder": {
|
| 7 |
+
"activation_function": "gelu_new",
|
| 8 |
+
"add_cross_attention": true,
|
| 9 |
+
"architectures": [
|
| 10 |
+
"GPT2LMHeadModel"
|
| 11 |
+
],
|
| 12 |
+
"attn_pdrop": 0.1,
|
| 13 |
+
"decoder_start_token_id": 50256,
|
| 14 |
+
"embd_pdrop": 0.1,
|
| 15 |
+
"initializer_range": 0.02,
|
| 16 |
+
"is_decoder": true,
|
| 17 |
+
"layer_norm_epsilon": 1e-05,
|
| 18 |
+
"model_type": "gpt2",
|
| 19 |
+
"n_ctx": 1024,
|
| 20 |
+
"n_embd": 768,
|
| 21 |
+
"n_head": 12,
|
| 22 |
+
"n_inner": null,
|
| 23 |
+
"n_layer": 12,
|
| 24 |
+
"n_positions": 1024,
|
| 25 |
+
"pad_token_id": 50256,
|
| 26 |
+
"reorder_and_upcast_attn": false,
|
| 27 |
+
"resid_pdrop": 0.1,
|
| 28 |
+
"scale_attn_by_inverse_layer_idx": false,
|
| 29 |
+
"scale_attn_weights": true,
|
| 30 |
+
"summary_activation": null,
|
| 31 |
+
"summary_first_dropout": 0.1,
|
| 32 |
+
"summary_proj_to_labels": true,
|
| 33 |
+
"summary_type": "cls_index",
|
| 34 |
+
"summary_use_proj": true,
|
| 35 |
+
"task_specific_params": {
|
| 36 |
+
"text-generation": {
|
| 37 |
+
"do_sample": true,
|
| 38 |
+
"max_length": 50
|
| 39 |
+
}
|
| 40 |
+
},
|
| 41 |
+
"torch_dtype": "float32",
|
| 42 |
+
"use_cache": true,
|
| 43 |
+
"vocab_size": 50257
|
| 44 |
+
},
|
| 45 |
+
"decoder_start_token_id": 50256,
|
| 46 |
+
"encoder": {
|
| 47 |
+
"architectures": [
|
| 48 |
+
"ViTModel"
|
| 49 |
+
],
|
| 50 |
+
"attention_probs_dropout_prob": 0.0,
|
| 51 |
+
"encoder_stride": 16,
|
| 52 |
+
"hidden_act": "gelu",
|
| 53 |
+
"hidden_dropout_prob": 0.0,
|
| 54 |
+
"hidden_size": 768,
|
| 55 |
+
"image_size": 224,
|
| 56 |
+
"initializer_range": 0.02,
|
| 57 |
+
"intermediate_size": 3072,
|
| 58 |
+
"layer_norm_eps": 1e-12,
|
| 59 |
+
"model_type": "vit",
|
| 60 |
+
"num_attention_heads": 12,
|
| 61 |
+
"num_channels": 3,
|
| 62 |
+
"num_hidden_layers": 12,
|
| 63 |
+
"patch_size": 16,
|
| 64 |
+
"pooler_act": "tanh",
|
| 65 |
+
"pooler_output_size": 768,
|
| 66 |
+
"qkv_bias": true,
|
| 67 |
+
"torch_dtype": "float32"
|
| 68 |
+
},
|
| 69 |
+
"eos_token_id": 50256,
|
| 70 |
+
"is_encoder_decoder": true,
|
| 71 |
+
"model_type": "vision-encoder-decoder",
|
| 72 |
+
"pad_token_id": 50256,
|
| 73 |
+
"tie_word_embeddings": false,
|
| 74 |
+
"torch_dtype": "float32",
|
| 75 |
+
"transformers_version": "4.53.3"
|
| 76 |
+
}
|
vit-gpt2-image-captioning-onnx-quantization/gpt2_decoder_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:616aa1be0a8c40fb9277e53bdc1f168aee0189d6e982bd54883bac99ad13f79d
|
| 3 |
+
size 193304270
|
vit-gpt2-image-captioning-onnx-quantization/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
vit-gpt2-image-captioning-onnx-quantization/model_metadata.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_name": "nlpconnect/vit-gpt2-image-captioning",
|
| 3 |
+
"quantized": true,
|
| 4 |
+
"input_size": [
|
| 5 |
+
224,
|
| 6 |
+
224
|
| 7 |
+
],
|
| 8 |
+
"model_files": {
|
| 9 |
+
"encoder": "vit_encoder_quantized.onnx",
|
| 10 |
+
"decoder": "gpt2_decoder_quantized.onnx"
|
| 11 |
+
},
|
| 12 |
+
"tokenizer_files": [
|
| 13 |
+
"vocab.json",
|
| 14 |
+
"merges.txt",
|
| 15 |
+
"tokenizer_config.json"
|
| 16 |
+
],
|
| 17 |
+
"feature_extractor_file": "preprocessor_config.json",
|
| 18 |
+
"special_tokens": {
|
| 19 |
+
"bos_token": "<|endoftext|>",
|
| 20 |
+
"eos_token": "<|endoftext|>",
|
| 21 |
+
"pad_token": "<|endoftext|>",
|
| 22 |
+
"bos_token_id": 50256,
|
| 23 |
+
"eos_token_id": 50256,
|
| 24 |
+
"pad_token_id": 50256
|
| 25 |
+
}
|
| 26 |
+
}
|
vit-gpt2-image-captioning-onnx-quantization/preprocessor_config.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_convert_rgb": null,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_rescale": true,
|
| 5 |
+
"do_resize": true,
|
| 6 |
+
"image_mean": [
|
| 7 |
+
0.5,
|
| 8 |
+
0.5,
|
| 9 |
+
0.5
|
| 10 |
+
],
|
| 11 |
+
"image_processor_type": "ViTImageProcessor",
|
| 12 |
+
"image_std": [
|
| 13 |
+
0.5,
|
| 14 |
+
0.5,
|
| 15 |
+
0.5
|
| 16 |
+
],
|
| 17 |
+
"resample": 2,
|
| 18 |
+
"rescale_factor": 0.00392156862745098,
|
| 19 |
+
"size": {
|
| 20 |
+
"height": 224,
|
| 21 |
+
"width": 224
|
| 22 |
+
}
|
| 23 |
+
}
|
vit-gpt2-image-captioning-onnx-quantization/source.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
https://huggingface.co/YqqAH/vit-gpt2-image-captioning-onnx-quantization
|
vit-gpt2-image-captioning-onnx-quantization/special_tokens_map.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<|endoftext|>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "<|endoftext|>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "<|endoftext|>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"unk_token": {
|
| 24 |
+
"content": "<|endoftext|>",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
}
|
| 30 |
+
}
|
vit-gpt2-image-captioning-onnx-quantization/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
vit-gpt2-image-captioning-onnx-quantization/tokenizer_config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"50256": {
|
| 5 |
+
"content": "<|endoftext|>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": false,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
}
|
| 12 |
+
},
|
| 13 |
+
"bos_token": "<|endoftext|>",
|
| 14 |
+
"clean_up_tokenization_spaces": false,
|
| 15 |
+
"eos_token": "<|endoftext|>",
|
| 16 |
+
"extra_special_tokens": {},
|
| 17 |
+
"max_length": 32,
|
| 18 |
+
"model_max_length": 1024,
|
| 19 |
+
"pad_to_multiple_of": null,
|
| 20 |
+
"pad_token": "<|endoftext|>",
|
| 21 |
+
"pad_token_type_id": 0,
|
| 22 |
+
"padding_side": "right",
|
| 23 |
+
"stride": 0,
|
| 24 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 25 |
+
"truncation_side": "right",
|
| 26 |
+
"truncation_strategy": "longest_first",
|
| 27 |
+
"unk_token": "<|endoftext|>"
|
| 28 |
+
}
|
vit-gpt2-image-captioning-onnx-quantization/vit_encoder_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:203ee97ac191fe56697dd08ad9faa09fffe1480a1128523840ef80bbd288c87a
|
| 3 |
+
size 87127104
|
vit-gpt2-image-captioning-onnx-quantization/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|