irsyad-smb commited on
Commit
e2a004e
·
verified ·
1 Parent(s): 1b4d2ee

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,3 +1,103 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - medical
7
+ - text-generation
8
+ - language-model
9
+ - biopan
10
+ - jepa
11
+ library_name: transformers
12
+ pipeline_tag: text-generation
13
+ ---
14
+
15
+ # biopan-omni-qwen3-1.7b-ehr-jepa-msk
16
+
17
+ BioPAN Omni is a text model for medical applications, trained using JEPA (Joint Embedding Predictive Architecture).
18
+
19
+ ## Model Details
20
+
21
+ - **LLM Backbone**: qwen3_1.7b
22
+ - **Vision Encoder**: None (text-only)
23
+ - **Connector**: identity
24
+ - **Model Type**: biopan_omni
25
+ - **Training Method**: JEPA + LoRA/QLoRA (merged into base model)
26
+
27
+ ## Special Tokens
28
+
29
+ This model includes special medical tokens:
30
+ - `<demographics>`, `</demographics>`
31
+ - `<conditions>`, `</conditions>`
32
+ - `<measurements>`, `</measurements>`
33
+ - `<observations>`, `</observations>`
34
+ - `<procedures>`, `</procedures>`
35
+ - `<drugs>`, `</drugs>`
36
+ - `<notes>`, `</notes>`
37
+ - `<death>`, `</death>`
38
+
39
+ ## Usage
40
+ ````python
41
+ from transformers import AutoModelForCausalLM, AutoTokenizer
42
+
43
+ # Load model
44
+ model = AutoModelForCausalLM.from_pretrained(
45
+ "standardmodelbio/biopan-omni-qwen3-1.7b-ehr-jepa-msk",
46
+ trust_remote_code=True,
47
+ device_map="auto"
48
+ )
49
+ tokenizer = AutoTokenizer.from_pretrained("standardmodelbio/biopan-omni-qwen3-1.7b-ehr-jepa-msk")
50
+
51
+ # Text inference
52
+ output = model.chat(
53
+ prompt="What are the symptoms of diabetes?",
54
+ tokenizer=tokenizer
55
+ )
56
+ print(output)
57
+ ```
58
+
59
+ ## Advanced Usage
60
+ ```python
61
+ # With generation parameters
62
+ output = model.chat(
63
+ prompt="Explain the treatment options for hypertension.",
64
+ tokenizer=tokenizer,
65
+ max_new_tokens=512,
66
+ temperature=0.7,
67
+ top_p=0.9
68
+ )
69
+
70
+ # Access hidden states
71
+ inputs = tokenizer("Your prompt here", return_tensors="pt")
72
+ outputs = model(
73
+ input_ids=inputs.input_ids.to(model.device),
74
+ output_hidden_states=True,
75
+ return_dict=True
76
+ )
77
+ hidden_states = outputs.hidden_states
78
+ ```
79
+
80
+ ## Training Details
81
+
82
+ - **Training Method**: JEPA (Joint Embedding Predictive Architecture)
83
+ - **Training Type**: LoRA/QLoRA (merged into base model)
84
+ - **JEPA Loss Weight**: 1.0
85
+ - **LM Loss Weight**: 0.5
86
+ - **Text Mask Ratio**: 0.75
87
+
88
+ ## Citation
89
+
90
+ If you use this model, please cite:
91
+ ```bibtex
92
+ @misc{biopan_omni,
93
+ author = {standardmodelbio},
94
+ title = {biopan-omni-qwen3-1.7b-ehr-jepa-msk},
95
+ year = {2025},
96
+ publisher = {HuggingFace},
97
+ url = {https://huggingface.co/standardmodelbio/biopan-omni-qwen3-1.7b-ehr-jepa-msk}
98
+ }
99
+ ```
100
+
101
+ ## License
102
+
103
+ Apache 2.0
added_tokens.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</conditions>": 151672,
3
+ "</death>": 151684,
4
+ "</demographics>": 151670,
5
+ "</drugs>": 151680,
6
+ "</measurements>": 151674,
7
+ "</notes>": 151682,
8
+ "</observations>": 151676,
9
+ "</procedures>": 151678,
10
+ "</think>": 151668,
11
+ "</tool_call>": 151658,
12
+ "</tool_response>": 151666,
13
+ "<conditions>": 151671,
14
+ "<death>": 151683,
15
+ "<demographics>": 151669,
16
+ "<drugs>": 151679,
17
+ "<measurements>": 151673,
18
+ "<notes>": 151681,
19
+ "<observations>": 151675,
20
+ "<procedures>": 151677,
21
+ "<think>": 151667,
22
+ "<tool_call>": 151657,
23
+ "<tool_response>": 151665,
24
+ "<|box_end|>": 151649,
25
+ "<|box_start|>": 151648,
26
+ "<|endoftext|>": 151643,
27
+ "<|file_sep|>": 151664,
28
+ "<|fim_middle|>": 151660,
29
+ "<|fim_pad|>": 151662,
30
+ "<|fim_prefix|>": 151659,
31
+ "<|fim_suffix|>": 151661,
32
+ "<|im_end|>": 151645,
33
+ "<|im_start|>": 151644,
34
+ "<|image_pad|>": 151655,
35
+ "<|object_ref_end|>": 151647,
36
+ "<|object_ref_start|>": 151646,
37
+ "<|quad_end|>": 151651,
38
+ "<|quad_start|>": 151650,
39
+ "<|repo_name|>": 151663,
40
+ "<|video_pad|>": 151656,
41
+ "<|vision_end|>": 151653,
42
+ "<|vision_pad|>": 151654,
43
+ "<|vision_start|>": 151652
44
+ }
config.json ADDED
@@ -0,0 +1,2129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_attn_implementation_autoset": true,
3
+ "cache_dir": null,
4
+ "connector_type": "identity",
5
+ "hidden_size": 2048,
6
+ "ignore_index": -100,
7
+ "image_aspect_ratio": "square",
8
+ "image_mask_ratio": 0.0,
9
+ "image_token_index": -200,
10
+ "instruction_format": "none",
11
+ "intermediate_size": 16384,
12
+ "jepa_loss_type": "mse",
13
+ "jepa_loss_weight": 1.0,
14
+ "llm_model_name_or_path": "qwen3_1.7b",
15
+ "lm_loss_weight": 0.5,
16
+ "mask_ratio": 0.5,
17
+ "max_target_length": 512,
18
+ "model_type": "biopan_omni",
19
+ "momentum_tau": 0.996,
20
+ "num_queries": 128,
21
+ "num_resampler_layers": 3,
22
+ "pad_token": "<|endoftext|>",
23
+ "pad_token_id": 151643,
24
+ "predictor_bottleneck_size": null,
25
+ "predictor_depth": 2,
26
+ "resampler_hidden_size": 768,
27
+ "text_config": {
28
+ "_name_or_path": "qwen3_1.7b",
29
+ "architectures": [
30
+ "Qwen3ForCausalLM"
31
+ ],
32
+ "attention_bias": false,
33
+ "attention_dropout": 0.0,
34
+ "bos_token_id": 151643,
35
+ "eos_token_id": 151645,
36
+ "head_dim": 128,
37
+ "hidden_act": "silu",
38
+ "hidden_size": 2048,
39
+ "initializer_range": 0.02,
40
+ "intermediate_size": 6144,
41
+ "max_position_embeddings": 40960,
42
+ "max_window_layers": 28,
43
+ "model_type": "qwen3",
44
+ "num_attention_heads": 16,
45
+ "num_hidden_layers": 28,
46
+ "num_key_value_heads": 8,
47
+ "rms_norm_eps": 1e-06,
48
+ "rope_scaling": null,
49
+ "rope_theta": 1000000,
50
+ "sliding_window": null,
51
+ "tie_word_embeddings": true,
52
+ "torch_dtype": "bfloat16",
53
+ "use_cache": true,
54
+ "use_sliding_window": false,
55
+ "vocab_size": 151685
56
+ },
57
+ "text_mask_ratio": 0.75,
58
+ "tokenizer_model_max_length": 3300,
59
+ "tokenizer_name_or_path": "qwen3_1.7b",
60
+ "tokenizer_padding_side": "right",
61
+ "tokenizer_use_fast": false,
62
+ "transformers_version": "4.51.3",
63
+ "tune_vision_tower_from_layer": 0,
64
+ "use_cache": true,
65
+ "vision_config": {
66
+ "_attn_implementation_autoset": true,
67
+ "_name_or_path": "mobilevit_small",
68
+ "architectures": [
69
+ "MobileViTForImageClassification"
70
+ ],
71
+ "aspp_dropout_prob": 0.1,
72
+ "aspp_out_channels": 256,
73
+ "atrous_rates": [
74
+ 6,
75
+ 12,
76
+ 18
77
+ ],
78
+ "attention_probs_dropout_prob": 0.0,
79
+ "classifier_dropout_prob": 0.1,
80
+ "conv_kernel_size": 3,
81
+ "expand_ratio": 4.0,
82
+ "hidden_act": "silu",
83
+ "hidden_dropout_prob": 0.1,
84
+ "hidden_sizes": [
85
+ 144,
86
+ 192,
87
+ 240
88
+ ],
89
+ "id2label": {
90
+ "0": "tench, Tinca tinca",
91
+ "1": "goldfish, Carassius auratus",
92
+ "2": "great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias",
93
+ "3": "tiger shark, Galeocerdo cuvieri",
94
+ "4": "hammerhead, hammerhead shark",
95
+ "5": "electric ray, crampfish, numbfish, torpedo",
96
+ "6": "stingray",
97
+ "7": "cock",
98
+ "8": "hen",
99
+ "9": "ostrich, Struthio camelus",
100
+ "10": "brambling, Fringilla montifringilla",
101
+ "11": "goldfinch, Carduelis carduelis",
102
+ "12": "house finch, linnet, Carpodacus mexicanus",
103
+ "13": "junco, snowbird",
104
+ "14": "indigo bunting, indigo finch, indigo bird, Passerina cyanea",
105
+ "15": "robin, American robin, Turdus migratorius",
106
+ "16": "bulbul",
107
+ "17": "jay",
108
+ "18": "magpie",
109
+ "19": "chickadee",
110
+ "20": "water ouzel, dipper",
111
+ "21": "kite",
112
+ "22": "bald eagle, American eagle, Haliaeetus leucocephalus",
113
+ "23": "vulture",
114
+ "24": "great grey owl, great gray owl, Strix nebulosa",
115
+ "25": "European fire salamander, Salamandra salamandra",
116
+ "26": "common newt, Triturus vulgaris",
117
+ "27": "eft",
118
+ "28": "spotted salamander, Ambystoma maculatum",
119
+ "29": "axolotl, mud puppy, Ambystoma mexicanum",
120
+ "30": "bullfrog, Rana catesbeiana",
121
+ "31": "tree frog, tree-frog",
122
+ "32": "tailed frog, bell toad, ribbed toad, tailed toad, Ascaphus trui",
123
+ "33": "loggerhead, loggerhead turtle, Caretta caretta",
124
+ "34": "leatherback turtle, leatherback, leathery turtle, Dermochelys coriacea",
125
+ "35": "mud turtle",
126
+ "36": "terrapin",
127
+ "37": "box turtle, box tortoise",
128
+ "38": "banded gecko",
129
+ "39": "common iguana, iguana, Iguana iguana",
130
+ "40": "American chameleon, anole, Anolis carolinensis",
131
+ "41": "whiptail, whiptail lizard",
132
+ "42": "agama",
133
+ "43": "frilled lizard, Chlamydosaurus kingi",
134
+ "44": "alligator lizard",
135
+ "45": "Gila monster, Heloderma suspectum",
136
+ "46": "green lizard, Lacerta viridis",
137
+ "47": "African chameleon, Chamaeleo chamaeleon",
138
+ "48": "Komodo dragon, Komodo lizard, dragon lizard, giant lizard, Varanus komodoensis",
139
+ "49": "African crocodile, Nile crocodile, Crocodylus niloticus",
140
+ "50": "American alligator, Alligator mississipiensis",
141
+ "51": "triceratops",
142
+ "52": "thunder snake, worm snake, Carphophis amoenus",
143
+ "53": "ringneck snake, ring-necked snake, ring snake",
144
+ "54": "hognose snake, puff adder, sand viper",
145
+ "55": "green snake, grass snake",
146
+ "56": "king snake, kingsnake",
147
+ "57": "garter snake, grass snake",
148
+ "58": "water snake",
149
+ "59": "vine snake",
150
+ "60": "night snake, Hypsiglena torquata",
151
+ "61": "boa constrictor, Constrictor constrictor",
152
+ "62": "rock python, rock snake, Python sebae",
153
+ "63": "Indian cobra, Naja naja",
154
+ "64": "green mamba",
155
+ "65": "sea snake",
156
+ "66": "horned viper, cerastes, sand viper, horned asp, Cerastes cornutus",
157
+ "67": "diamondback, diamondback rattlesnake, Crotalus adamanteus",
158
+ "68": "sidewinder, horned rattlesnake, Crotalus cerastes",
159
+ "69": "trilobite",
160
+ "70": "harvestman, daddy longlegs, Phalangium opilio",
161
+ "71": "scorpion",
162
+ "72": "black and gold garden spider, Argiope aurantia",
163
+ "73": "barn spider, Araneus cavaticus",
164
+ "74": "garden spider, Aranea diademata",
165
+ "75": "black widow, Latrodectus mactans",
166
+ "76": "tarantula",
167
+ "77": "wolf spider, hunting spider",
168
+ "78": "tick",
169
+ "79": "centipede",
170
+ "80": "black grouse",
171
+ "81": "ptarmigan",
172
+ "82": "ruffed grouse, partridge, Bonasa umbellus",
173
+ "83": "prairie chicken, prairie grouse, prairie fowl",
174
+ "84": "peacock",
175
+ "85": "quail",
176
+ "86": "partridge",
177
+ "87": "African grey, African gray, Psittacus erithacus",
178
+ "88": "macaw",
179
+ "89": "sulphur-crested cockatoo, Kakatoe galerita, Cacatua galerita",
180
+ "90": "lorikeet",
181
+ "91": "coucal",
182
+ "92": "bee eater",
183
+ "93": "hornbill",
184
+ "94": "hummingbird",
185
+ "95": "jacamar",
186
+ "96": "toucan",
187
+ "97": "drake",
188
+ "98": "red-breasted merganser, Mergus serrator",
189
+ "99": "goose",
190
+ "100": "black swan, Cygnus atratus",
191
+ "101": "tusker",
192
+ "102": "echidna, spiny anteater, anteater",
193
+ "103": "platypus, duckbill, duckbilled platypus, duck-billed platypus, Ornithorhynchus anatinus",
194
+ "104": "wallaby, brush kangaroo",
195
+ "105": "koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus",
196
+ "106": "wombat",
197
+ "107": "jellyfish",
198
+ "108": "sea anemone, anemone",
199
+ "109": "brain coral",
200
+ "110": "flatworm, platyhelminth",
201
+ "111": "nematode, nematode worm, roundworm",
202
+ "112": "conch",
203
+ "113": "snail",
204
+ "114": "slug",
205
+ "115": "sea slug, nudibranch",
206
+ "116": "chiton, coat-of-mail shell, sea cradle, polyplacophore",
207
+ "117": "chambered nautilus, pearly nautilus, nautilus",
208
+ "118": "Dungeness crab, Cancer magister",
209
+ "119": "rock crab, Cancer irroratus",
210
+ "120": "fiddler crab",
211
+ "121": "king crab, Alaska crab, Alaskan king crab, Alaska king crab, Paralithodes camtschatica",
212
+ "122": "American lobster, Northern lobster, Maine lobster, Homarus americanus",
213
+ "123": "spiny lobster, langouste, rock lobster, crawfish, crayfish, sea crawfish",
214
+ "124": "crayfish, crawfish, crawdad, crawdaddy",
215
+ "125": "hermit crab",
216
+ "126": "isopod",
217
+ "127": "white stork, Ciconia ciconia",
218
+ "128": "black stork, Ciconia nigra",
219
+ "129": "spoonbill",
220
+ "130": "flamingo",
221
+ "131": "little blue heron, Egretta caerulea",
222
+ "132": "American egret, great white heron, Egretta albus",
223
+ "133": "bittern",
224
+ "134": "crane",
225
+ "135": "limpkin, Aramus pictus",
226
+ "136": "European gallinule, Porphyrio porphyrio",
227
+ "137": "American coot, marsh hen, mud hen, water hen, Fulica americana",
228
+ "138": "bustard",
229
+ "139": "ruddy turnstone, Arenaria interpres",
230
+ "140": "red-backed sandpiper, dunlin, Erolia alpina",
231
+ "141": "redshank, Tringa totanus",
232
+ "142": "dowitcher",
233
+ "143": "oystercatcher, oyster catcher",
234
+ "144": "pelican",
235
+ "145": "king penguin, Aptenodytes patagonica",
236
+ "146": "albatross, mollymawk",
237
+ "147": "grey whale, gray whale, devilfish, Eschrichtius gibbosus, Eschrichtius robustus",
238
+ "148": "killer whale, killer, orca, grampus, sea wolf, Orcinus orca",
239
+ "149": "dugong, Dugong dugon",
240
+ "150": "sea lion",
241
+ "151": "Chihuahua",
242
+ "152": "Japanese spaniel",
243
+ "153": "Maltese dog, Maltese terrier, Maltese",
244
+ "154": "Pekinese, Pekingese, Peke",
245
+ "155": "Shih-Tzu",
246
+ "156": "Blenheim spaniel",
247
+ "157": "papillon",
248
+ "158": "toy terrier",
249
+ "159": "Rhodesian ridgeback",
250
+ "160": "Afghan hound, Afghan",
251
+ "161": "basset, basset hound",
252
+ "162": "beagle",
253
+ "163": "bloodhound, sleuthhound",
254
+ "164": "bluetick",
255
+ "165": "black-and-tan coonhound",
256
+ "166": "Walker hound, Walker foxhound",
257
+ "167": "English foxhound",
258
+ "168": "redbone",
259
+ "169": "borzoi, Russian wolfhound",
260
+ "170": "Irish wolfhound",
261
+ "171": "Italian greyhound",
262
+ "172": "whippet",
263
+ "173": "Ibizan hound, Ibizan Podenco",
264
+ "174": "Norwegian elkhound, elkhound",
265
+ "175": "otterhound, otter hound",
266
+ "176": "Saluki, gazelle hound",
267
+ "177": "Scottish deerhound, deerhound",
268
+ "178": "Weimaraner",
269
+ "179": "Staffordshire bullterrier, Staffordshire bull terrier",
270
+ "180": "American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier",
271
+ "181": "Bedlington terrier",
272
+ "182": "Border terrier",
273
+ "183": "Kerry blue terrier",
274
+ "184": "Irish terrier",
275
+ "185": "Norfolk terrier",
276
+ "186": "Norwich terrier",
277
+ "187": "Yorkshire terrier",
278
+ "188": "wire-haired fox terrier",
279
+ "189": "Lakeland terrier",
280
+ "190": "Sealyham terrier, Sealyham",
281
+ "191": "Airedale, Airedale terrier",
282
+ "192": "cairn, cairn terrier",
283
+ "193": "Australian terrier",
284
+ "194": "Dandie Dinmont, Dandie Dinmont terrier",
285
+ "195": "Boston bull, Boston terrier",
286
+ "196": "miniature schnauzer",
287
+ "197": "giant schnauzer",
288
+ "198": "standard schnauzer",
289
+ "199": "Scotch terrier, Scottish terrier, Scottie",
290
+ "200": "Tibetan terrier, chrysanthemum dog",
291
+ "201": "silky terrier, Sydney silky",
292
+ "202": "soft-coated wheaten terrier",
293
+ "203": "West Highland white terrier",
294
+ "204": "Lhasa, Lhasa apso",
295
+ "205": "flat-coated retriever",
296
+ "206": "curly-coated retriever",
297
+ "207": "golden retriever",
298
+ "208": "Labrador retriever",
299
+ "209": "Chesapeake Bay retriever",
300
+ "210": "German short-haired pointer",
301
+ "211": "vizsla, Hungarian pointer",
302
+ "212": "English setter",
303
+ "213": "Irish setter, red setter",
304
+ "214": "Gordon setter",
305
+ "215": "Brittany spaniel",
306
+ "216": "clumber, clumber spaniel",
307
+ "217": "English springer, English springer spaniel",
308
+ "218": "Welsh springer spaniel",
309
+ "219": "cocker spaniel, English cocker spaniel, cocker",
310
+ "220": "Sussex spaniel",
311
+ "221": "Irish water spaniel",
312
+ "222": "kuvasz",
313
+ "223": "schipperke",
314
+ "224": "groenendael",
315
+ "225": "malinois",
316
+ "226": "briard",
317
+ "227": "kelpie",
318
+ "228": "komondor",
319
+ "229": "Old English sheepdog, bobtail",
320
+ "230": "Shetland sheepdog, Shetland sheep dog, Shetland",
321
+ "231": "collie",
322
+ "232": "Border collie",
323
+ "233": "Bouvier des Flandres, Bouviers des Flandres",
324
+ "234": "Rottweiler",
325
+ "235": "German shepherd, German shepherd dog, German police dog, alsatian",
326
+ "236": "Doberman, Doberman pinscher",
327
+ "237": "miniature pinscher",
328
+ "238": "Greater Swiss Mountain dog",
329
+ "239": "Bernese mountain dog",
330
+ "240": "Appenzeller",
331
+ "241": "EntleBucher",
332
+ "242": "boxer",
333
+ "243": "bull mastiff",
334
+ "244": "Tibetan mastiff",
335
+ "245": "French bulldog",
336
+ "246": "Great Dane",
337
+ "247": "Saint Bernard, St Bernard",
338
+ "248": "Eskimo dog, husky",
339
+ "249": "malamute, malemute, Alaskan malamute",
340
+ "250": "Siberian husky",
341
+ "251": "dalmatian, coach dog, carriage dog",
342
+ "252": "affenpinscher, monkey pinscher, monkey dog",
343
+ "253": "basenji",
344
+ "254": "pug, pug-dog",
345
+ "255": "Leonberg",
346
+ "256": "Newfoundland, Newfoundland dog",
347
+ "257": "Great Pyrenees",
348
+ "258": "Samoyed, Samoyede",
349
+ "259": "Pomeranian",
350
+ "260": "chow, chow chow",
351
+ "261": "keeshond",
352
+ "262": "Brabancon griffon",
353
+ "263": "Pembroke, Pembroke Welsh corgi",
354
+ "264": "Cardigan, Cardigan Welsh corgi",
355
+ "265": "toy poodle",
356
+ "266": "miniature poodle",
357
+ "267": "standard poodle",
358
+ "268": "Mexican hairless",
359
+ "269": "timber wolf, grey wolf, gray wolf, Canis lupus",
360
+ "270": "white wolf, Arctic wolf, Canis lupus tundrarum",
361
+ "271": "red wolf, maned wolf, Canis rufus, Canis niger",
362
+ "272": "coyote, prairie wolf, brush wolf, Canis latrans",
363
+ "273": "dingo, warrigal, warragal, Canis dingo",
364
+ "274": "dhole, Cuon alpinus",
365
+ "275": "African hunting dog, hyena dog, Cape hunting dog, Lycaon pictus",
366
+ "276": "hyena, hyaena",
367
+ "277": "red fox, Vulpes vulpes",
368
+ "278": "kit fox, Vulpes macrotis",
369
+ "279": "Arctic fox, white fox, Alopex lagopus",
370
+ "280": "grey fox, gray fox, Urocyon cinereoargenteus",
371
+ "281": "tabby, tabby cat",
372
+ "282": "tiger cat",
373
+ "283": "Persian cat",
374
+ "284": "Siamese cat, Siamese",
375
+ "285": "Egyptian cat",
376
+ "286": "cougar, puma, catamount, mountain lion, painter, panther, Felis concolor",
377
+ "287": "lynx, catamount",
378
+ "288": "leopard, Panthera pardus",
379
+ "289": "snow leopard, ounce, Panthera uncia",
380
+ "290": "jaguar, panther, Panthera onca, Felis onca",
381
+ "291": "lion, king of beasts, Panthera leo",
382
+ "292": "tiger, Panthera tigris",
383
+ "293": "cheetah, chetah, Acinonyx jubatus",
384
+ "294": "brown bear, bruin, Ursus arctos",
385
+ "295": "American black bear, black bear, Ursus americanus, Euarctos americanus",
386
+ "296": "ice bear, polar bear, Ursus Maritimus, Thalarctos maritimus",
387
+ "297": "sloth bear, Melursus ursinus, Ursus ursinus",
388
+ "298": "mongoose",
389
+ "299": "meerkat, mierkat",
390
+ "300": "tiger beetle",
391
+ "301": "ladybug, ladybeetle, lady beetle, ladybird, ladybird beetle",
392
+ "302": "ground beetle, carabid beetle",
393
+ "303": "long-horned beetle, longicorn, longicorn beetle",
394
+ "304": "leaf beetle, chrysomelid",
395
+ "305": "dung beetle",
396
+ "306": "rhinoceros beetle",
397
+ "307": "weevil",
398
+ "308": "fly",
399
+ "309": "bee",
400
+ "310": "ant, emmet, pismire",
401
+ "311": "grasshopper, hopper",
402
+ "312": "cricket",
403
+ "313": "walking stick, walkingstick, stick insect",
404
+ "314": "cockroach, roach",
405
+ "315": "mantis, mantid",
406
+ "316": "cicada, cicala",
407
+ "317": "leafhopper",
408
+ "318": "lacewing, lacewing fly",
409
+ "319": "dragonfly, darning needle, devil's darning needle, sewing needle, snake feeder, snake doctor, mosquito hawk, skeeter hawk",
410
+ "320": "damselfly",
411
+ "321": "admiral",
412
+ "322": "ringlet, ringlet butterfly",
413
+ "323": "monarch, monarch butterfly, milkweed butterfly, Danaus plexippus",
414
+ "324": "cabbage butterfly",
415
+ "325": "sulphur butterfly, sulfur butterfly",
416
+ "326": "lycaenid, lycaenid butterfly",
417
+ "327": "starfish, sea star",
418
+ "328": "sea urchin",
419
+ "329": "sea cucumber, holothurian",
420
+ "330": "wood rabbit, cottontail, cottontail rabbit",
421
+ "331": "hare",
422
+ "332": "Angora, Angora rabbit",
423
+ "333": "hamster",
424
+ "334": "porcupine, hedgehog",
425
+ "335": "fox squirrel, eastern fox squirrel, Sciurus niger",
426
+ "336": "marmot",
427
+ "337": "beaver",
428
+ "338": "guinea pig, Cavia cobaya",
429
+ "339": "sorrel",
430
+ "340": "zebra",
431
+ "341": "hog, pig, grunter, squealer, Sus scrofa",
432
+ "342": "wild boar, boar, Sus scrofa",
433
+ "343": "warthog",
434
+ "344": "hippopotamus, hippo, river horse, Hippopotamus amphibius",
435
+ "345": "ox",
436
+ "346": "water buffalo, water ox, Asiatic buffalo, Bubalus bubalis",
437
+ "347": "bison",
438
+ "348": "ram, tup",
439
+ "349": "bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis",
440
+ "350": "ibex, Capra ibex",
441
+ "351": "hartebeest",
442
+ "352": "impala, Aepyceros melampus",
443
+ "353": "gazelle",
444
+ "354": "Arabian camel, dromedary, Camelus dromedarius",
445
+ "355": "llama",
446
+ "356": "weasel",
447
+ "357": "mink",
448
+ "358": "polecat, fitch, foulmart, foumart, Mustela putorius",
449
+ "359": "black-footed ferret, ferret, Mustela nigripes",
450
+ "360": "otter",
451
+ "361": "skunk, polecat, wood pussy",
452
+ "362": "badger",
453
+ "363": "armadillo",
454
+ "364": "three-toed sloth, ai, Bradypus tridactylus",
455
+ "365": "orangutan, orang, orangutang, Pongo pygmaeus",
456
+ "366": "gorilla, Gorilla gorilla",
457
+ "367": "chimpanzee, chimp, Pan troglodytes",
458
+ "368": "gibbon, Hylobates lar",
459
+ "369": "siamang, Hylobates syndactylus, Symphalangus syndactylus",
460
+ "370": "guenon, guenon monkey",
461
+ "371": "patas, hussar monkey, Erythrocebus patas",
462
+ "372": "baboon",
463
+ "373": "macaque",
464
+ "374": "langur",
465
+ "375": "colobus, colobus monkey",
466
+ "376": "proboscis monkey, Nasalis larvatus",
467
+ "377": "marmoset",
468
+ "378": "capuchin, ringtail, Cebus capucinus",
469
+ "379": "howler monkey, howler",
470
+ "380": "titi, titi monkey",
471
+ "381": "spider monkey, Ateles geoffroyi",
472
+ "382": "squirrel monkey, Saimiri sciureus",
473
+ "383": "Madagascar cat, ring-tailed lemur, Lemur catta",
474
+ "384": "indri, indris, Indri indri, Indri brevicaudatus",
475
+ "385": "Indian elephant, Elephas maximus",
476
+ "386": "African elephant, Loxodonta africana",
477
+ "387": "lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens",
478
+ "388": "giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca",
479
+ "389": "barracouta, snoek",
480
+ "390": "eel",
481
+ "391": "coho, cohoe, coho salmon, blue jack, silver salmon, Oncorhynchus kisutch",
482
+ "392": "rock beauty, Holocanthus tricolor",
483
+ "393": "anemone fish",
484
+ "394": "sturgeon",
485
+ "395": "gar, garfish, garpike, billfish, Lepisosteus osseus",
486
+ "396": "lionfish",
487
+ "397": "puffer, pufferfish, blowfish, globefish",
488
+ "398": "abacus",
489
+ "399": "abaya",
490
+ "400": "academic gown, academic robe, judge's robe",
491
+ "401": "accordion, piano accordion, squeeze box",
492
+ "402": "acoustic guitar",
493
+ "403": "aircraft carrier, carrier, flattop, attack aircraft carrier",
494
+ "404": "airliner",
495
+ "405": "airship, dirigible",
496
+ "406": "altar",
497
+ "407": "ambulance",
498
+ "408": "amphibian, amphibious vehicle",
499
+ "409": "analog clock",
500
+ "410": "apiary, bee house",
501
+ "411": "apron",
502
+ "412": "ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin",
503
+ "413": "assault rifle, assault gun",
504
+ "414": "backpack, back pack, knapsack, packsack, rucksack, haversack",
505
+ "415": "bakery, bakeshop, bakehouse",
506
+ "416": "balance beam, beam",
507
+ "417": "balloon",
508
+ "418": "ballpoint, ballpoint pen, ballpen, Biro",
509
+ "419": "Band Aid",
510
+ "420": "banjo",
511
+ "421": "bannister, banister, balustrade, balusters, handrail",
512
+ "422": "barbell",
513
+ "423": "barber chair",
514
+ "424": "barbershop",
515
+ "425": "barn",
516
+ "426": "barometer",
517
+ "427": "barrel, cask",
518
+ "428": "barrow, garden cart, lawn cart, wheelbarrow",
519
+ "429": "baseball",
520
+ "430": "basketball",
521
+ "431": "bassinet",
522
+ "432": "bassoon",
523
+ "433": "bathing cap, swimming cap",
524
+ "434": "bath towel",
525
+ "435": "bathtub, bathing tub, bath, tub",
526
+ "436": "beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon",
527
+ "437": "beacon, lighthouse, beacon light, pharos",
528
+ "438": "beaker",
529
+ "439": "bearskin, busby, shako",
530
+ "440": "beer bottle",
531
+ "441": "beer glass",
532
+ "442": "bell cote, bell cot",
533
+ "443": "bib",
534
+ "444": "bicycle-built-for-two, tandem bicycle, tandem",
535
+ "445": "bikini, two-piece",
536
+ "446": "binder, ring-binder",
537
+ "447": "binoculars, field glasses, opera glasses",
538
+ "448": "birdhouse",
539
+ "449": "boathouse",
540
+ "450": "bobsled, bobsleigh, bob",
541
+ "451": "bolo tie, bolo, bola tie, bola",
542
+ "452": "bonnet, poke bonnet",
543
+ "453": "bookcase",
544
+ "454": "bookshop, bookstore, bookstall",
545
+ "455": "bottlecap",
546
+ "456": "bow",
547
+ "457": "bow tie, bow-tie, bowtie",
548
+ "458": "brass, memorial tablet, plaque",
549
+ "459": "brassiere, bra, bandeau",
550
+ "460": "breakwater, groin, groyne, mole, bulwark, seawall, jetty",
551
+ "461": "breastplate, aegis, egis",
552
+ "462": "broom",
553
+ "463": "bucket, pail",
554
+ "464": "buckle",
555
+ "465": "bulletproof vest",
556
+ "466": "bullet train, bullet",
557
+ "467": "butcher shop, meat market",
558
+ "468": "cab, hack, taxi, taxicab",
559
+ "469": "caldron, cauldron",
560
+ "470": "candle, taper, wax light",
561
+ "471": "cannon",
562
+ "472": "canoe",
563
+ "473": "can opener, tin opener",
564
+ "474": "cardigan",
565
+ "475": "car mirror",
566
+ "476": "carousel, carrousel, merry-go-round, roundabout, whirligig",
567
+ "477": "carpenter's kit, tool kit",
568
+ "478": "carton",
569
+ "479": "car wheel",
570
+ "480": "cash machine, cash dispenser, automated teller machine, automatic teller machine, automated teller, automatic teller, ATM",
571
+ "481": "cassette",
572
+ "482": "cassette player",
573
+ "483": "castle",
574
+ "484": "catamaran",
575
+ "485": "CD player",
576
+ "486": "cello, violoncello",
577
+ "487": "cellular telephone, cellular phone, cellphone, cell, mobile phone",
578
+ "488": "chain",
579
+ "489": "chainlink fence",
580
+ "490": "chain mail, ring mail, mail, chain armor, chain armour, ring armor, ring armour",
581
+ "491": "chain saw, chainsaw",
582
+ "492": "chest",
583
+ "493": "chiffonier, commode",
584
+ "494": "chime, bell, gong",
585
+ "495": "china cabinet, china closet",
586
+ "496": "Christmas stocking",
587
+ "497": "church, church building",
588
+ "498": "cinema, movie theater, movie theatre, movie house, picture palace",
589
+ "499": "cleaver, meat cleaver, chopper",
590
+ "500": "cliff dwelling",
591
+ "501": "cloak",
592
+ "502": "clog, geta, patten, sabot",
593
+ "503": "cocktail shaker",
594
+ "504": "coffee mug",
595
+ "505": "coffeepot",
596
+ "506": "coil, spiral, volute, whorl, helix",
597
+ "507": "combination lock",
598
+ "508": "computer keyboard, keypad",
599
+ "509": "confectionery, confectionary, candy store",
600
+ "510": "container ship, containership, container vessel",
601
+ "511": "convertible",
602
+ "512": "corkscrew, bottle screw",
603
+ "513": "cornet, horn, trumpet, trump",
604
+ "514": "cowboy boot",
605
+ "515": "cowboy hat, ten-gallon hat",
606
+ "516": "cradle",
607
+ "517": "crane",
608
+ "518": "crash helmet",
609
+ "519": "crate",
610
+ "520": "crib, cot",
611
+ "521": "Crock Pot",
612
+ "522": "croquet ball",
613
+ "523": "crutch",
614
+ "524": "cuirass",
615
+ "525": "dam, dike, dyke",
616
+ "526": "desk",
617
+ "527": "desktop computer",
618
+ "528": "dial telephone, dial phone",
619
+ "529": "diaper, nappy, napkin",
620
+ "530": "digital clock",
621
+ "531": "digital watch",
622
+ "532": "dining table, board",
623
+ "533": "dishrag, dishcloth",
624
+ "534": "dishwasher, dish washer, dishwashing machine",
625
+ "535": "disk brake, disc brake",
626
+ "536": "dock, dockage, docking facility",
627
+ "537": "dogsled, dog sled, dog sleigh",
628
+ "538": "dome",
629
+ "539": "doormat, welcome mat",
630
+ "540": "drilling platform, offshore rig",
631
+ "541": "drum, membranophone, tympan",
632
+ "542": "drumstick",
633
+ "543": "dumbbell",
634
+ "544": "Dutch oven",
635
+ "545": "electric fan, blower",
636
+ "546": "electric guitar",
637
+ "547": "electric locomotive",
638
+ "548": "entertainment center",
639
+ "549": "envelope",
640
+ "550": "espresso maker",
641
+ "551": "face powder",
642
+ "552": "feather boa, boa",
643
+ "553": "file, file cabinet, filing cabinet",
644
+ "554": "fireboat",
645
+ "555": "fire engine, fire truck",
646
+ "556": "fire screen, fireguard",
647
+ "557": "flagpole, flagstaff",
648
+ "558": "flute, transverse flute",
649
+ "559": "folding chair",
650
+ "560": "football helmet",
651
+ "561": "forklift",
652
+ "562": "fountain",
653
+ "563": "fountain pen",
654
+ "564": "four-poster",
655
+ "565": "freight car",
656
+ "566": "French horn, horn",
657
+ "567": "frying pan, frypan, skillet",
658
+ "568": "fur coat",
659
+ "569": "garbage truck, dustcart",
660
+ "570": "gasmask, respirator, gas helmet",
661
+ "571": "gas pump, gasoline pump, petrol pump, island dispenser",
662
+ "572": "goblet",
663
+ "573": "go-kart",
664
+ "574": "golf ball",
665
+ "575": "golfcart, golf cart",
666
+ "576": "gondola",
667
+ "577": "gong, tam-tam",
668
+ "578": "gown",
669
+ "579": "grand piano, grand",
670
+ "580": "greenhouse, nursery, glasshouse",
671
+ "581": "grille, radiator grille",
672
+ "582": "grocery store, grocery, food market, market",
673
+ "583": "guillotine",
674
+ "584": "hair slide",
675
+ "585": "hair spray",
676
+ "586": "half track",
677
+ "587": "hammer",
678
+ "588": "hamper",
679
+ "589": "hand blower, blow dryer, blow drier, hair dryer, hair drier",
680
+ "590": "hand-held computer, hand-held microcomputer",
681
+ "591": "handkerchief, hankie, hanky, hankey",
682
+ "592": "hard disc, hard disk, fixed disk",
683
+ "593": "harmonica, mouth organ, harp, mouth harp",
684
+ "594": "harp",
685
+ "595": "harvester, reaper",
686
+ "596": "hatchet",
687
+ "597": "holster",
688
+ "598": "home theater, home theatre",
689
+ "599": "honeycomb",
690
+ "600": "hook, claw",
691
+ "601": "hoopskirt, crinoline",
692
+ "602": "horizontal bar, high bar",
693
+ "603": "horse cart, horse-cart",
694
+ "604": "hourglass",
695
+ "605": "iPod",
696
+ "606": "iron, smoothing iron",
697
+ "607": "jack-o'-lantern",
698
+ "608": "jean, blue jean, denim",
699
+ "609": "jeep, landrover",
700
+ "610": "jersey, T-shirt, tee shirt",
701
+ "611": "jigsaw puzzle",
702
+ "612": "jinrikisha, ricksha, rickshaw",
703
+ "613": "joystick",
704
+ "614": "kimono",
705
+ "615": "knee pad",
706
+ "616": "knot",
707
+ "617": "lab coat, laboratory coat",
708
+ "618": "ladle",
709
+ "619": "lampshade, lamp shade",
710
+ "620": "laptop, laptop computer",
711
+ "621": "lawn mower, mower",
712
+ "622": "lens cap, lens cover",
713
+ "623": "letter opener, paper knife, paperknife",
714
+ "624": "library",
715
+ "625": "lifeboat",
716
+ "626": "lighter, light, igniter, ignitor",
717
+ "627": "limousine, limo",
718
+ "628": "liner, ocean liner",
719
+ "629": "lipstick, lip rouge",
720
+ "630": "Loafer",
721
+ "631": "lotion",
722
+ "632": "loudspeaker, speaker, speaker unit, loudspeaker system, speaker system",
723
+ "633": "loupe, jeweler's loupe",
724
+ "634": "lumbermill, sawmill",
725
+ "635": "magnetic compass",
726
+ "636": "mailbag, postbag",
727
+ "637": "mailbox, letter box",
728
+ "638": "maillot",
729
+ "639": "maillot, tank suit",
730
+ "640": "manhole cover",
731
+ "641": "maraca",
732
+ "642": "marimba, xylophone",
733
+ "643": "mask",
734
+ "644": "matchstick",
735
+ "645": "maypole",
736
+ "646": "maze, labyrinth",
737
+ "647": "measuring cup",
738
+ "648": "medicine chest, medicine cabinet",
739
+ "649": "megalith, megalithic structure",
740
+ "650": "microphone, mike",
741
+ "651": "microwave, microwave oven",
742
+ "652": "military uniform",
743
+ "653": "milk can",
744
+ "654": "minibus",
745
+ "655": "miniskirt, mini",
746
+ "656": "minivan",
747
+ "657": "missile",
748
+ "658": "mitten",
749
+ "659": "mixing bowl",
750
+ "660": "mobile home, manufactured home",
751
+ "661": "Model T",
752
+ "662": "modem",
753
+ "663": "monastery",
754
+ "664": "monitor",
755
+ "665": "moped",
756
+ "666": "mortar",
757
+ "667": "mortarboard",
758
+ "668": "mosque",
759
+ "669": "mosquito net",
760
+ "670": "motor scooter, scooter",
761
+ "671": "mountain bike, all-terrain bike, off-roader",
762
+ "672": "mountain tent",
763
+ "673": "mouse, computer mouse",
764
+ "674": "mousetrap",
765
+ "675": "moving van",
766
+ "676": "muzzle",
767
+ "677": "nail",
768
+ "678": "neck brace",
769
+ "679": "necklace",
770
+ "680": "nipple",
771
+ "681": "notebook, notebook computer",
772
+ "682": "obelisk",
773
+ "683": "oboe, hautboy, hautbois",
774
+ "684": "ocarina, sweet potato",
775
+ "685": "odometer, hodometer, mileometer, milometer",
776
+ "686": "oil filter",
777
+ "687": "organ, pipe organ",
778
+ "688": "oscilloscope, scope, cathode-ray oscilloscope, CRO",
779
+ "689": "overskirt",
780
+ "690": "oxcart",
781
+ "691": "oxygen mask",
782
+ "692": "packet",
783
+ "693": "paddle, boat paddle",
784
+ "694": "paddlewheel, paddle wheel",
785
+ "695": "padlock",
786
+ "696": "paintbrush",
787
+ "697": "pajama, pyjama, pj's, jammies",
788
+ "698": "palace",
789
+ "699": "panpipe, pandean pipe, syrinx",
790
+ "700": "paper towel",
791
+ "701": "parachute, chute",
792
+ "702": "parallel bars, bars",
793
+ "703": "park bench",
794
+ "704": "parking meter",
795
+ "705": "passenger car, coach, carriage",
796
+ "706": "patio, terrace",
797
+ "707": "pay-phone, pay-station",
798
+ "708": "pedestal, plinth, footstall",
799
+ "709": "pencil box, pencil case",
800
+ "710": "pencil sharpener",
801
+ "711": "perfume, essence",
802
+ "712": "Petri dish",
803
+ "713": "photocopier",
804
+ "714": "pick, plectrum, plectron",
805
+ "715": "pickelhaube",
806
+ "716": "picket fence, paling",
807
+ "717": "pickup, pickup truck",
808
+ "718": "pier",
809
+ "719": "piggy bank, penny bank",
810
+ "720": "pill bottle",
811
+ "721": "pillow",
812
+ "722": "ping-pong ball",
813
+ "723": "pinwheel",
814
+ "724": "pirate, pirate ship",
815
+ "725": "pitcher, ewer",
816
+ "726": "plane, carpenter's plane, woodworking plane",
817
+ "727": "planetarium",
818
+ "728": "plastic bag",
819
+ "729": "plate rack",
820
+ "730": "plow, plough",
821
+ "731": "plunger, plumber's helper",
822
+ "732": "Polaroid camera, Polaroid Land camera",
823
+ "733": "pole",
824
+ "734": "police van, police wagon, paddy wagon, patrol wagon, wagon, black Maria",
825
+ "735": "poncho",
826
+ "736": "pool table, billiard table, snooker table",
827
+ "737": "pop bottle, soda bottle",
828
+ "738": "pot, flowerpot",
829
+ "739": "potter's wheel",
830
+ "740": "power drill",
831
+ "741": "prayer rug, prayer mat",
832
+ "742": "printer",
833
+ "743": "prison, prison house",
834
+ "744": "projectile, missile",
835
+ "745": "projector",
836
+ "746": "puck, hockey puck",
837
+ "747": "punching bag, punch bag, punching ball, punchball",
838
+ "748": "purse",
839
+ "749": "quill, quill pen",
840
+ "750": "quilt, comforter, comfort, puff",
841
+ "751": "racer, race car, racing car",
842
+ "752": "racket, racquet",
843
+ "753": "radiator",
844
+ "754": "radio, wireless",
845
+ "755": "radio telescope, radio reflector",
846
+ "756": "rain barrel",
847
+ "757": "recreational vehicle, RV, R.V.",
848
+ "758": "reel",
849
+ "759": "reflex camera",
850
+ "760": "refrigerator, icebox",
851
+ "761": "remote control, remote",
852
+ "762": "restaurant, eating house, eating place, eatery",
853
+ "763": "revolver, six-gun, six-shooter",
854
+ "764": "rifle",
855
+ "765": "rocking chair, rocker",
856
+ "766": "rotisserie",
857
+ "767": "rubber eraser, rubber, pencil eraser",
858
+ "768": "rugby ball",
859
+ "769": "rule, ruler",
860
+ "770": "running shoe",
861
+ "771": "safe",
862
+ "772": "safety pin",
863
+ "773": "saltshaker, salt shaker",
864
+ "774": "sandal",
865
+ "775": "sarong",
866
+ "776": "sax, saxophone",
867
+ "777": "scabbard",
868
+ "778": "scale, weighing machine",
869
+ "779": "school bus",
870
+ "780": "schooner",
871
+ "781": "scoreboard",
872
+ "782": "screen, CRT screen",
873
+ "783": "screw",
874
+ "784": "screwdriver",
875
+ "785": "seat belt, seatbelt",
876
+ "786": "sewing machine",
877
+ "787": "shield, buckler",
878
+ "788": "shoe shop, shoe-shop, shoe store",
879
+ "789": "shoji",
880
+ "790": "shopping basket",
881
+ "791": "shopping cart",
882
+ "792": "shovel",
883
+ "793": "shower cap",
884
+ "794": "shower curtain",
885
+ "795": "ski",
886
+ "796": "ski mask",
887
+ "797": "sleeping bag",
888
+ "798": "slide rule, slipstick",
889
+ "799": "sliding door",
890
+ "800": "slot, one-armed bandit",
891
+ "801": "snorkel",
892
+ "802": "snowmobile",
893
+ "803": "snowplow, snowplough",
894
+ "804": "soap dispenser",
895
+ "805": "soccer ball",
896
+ "806": "sock",
897
+ "807": "solar dish, solar collector, solar furnace",
898
+ "808": "sombrero",
899
+ "809": "soup bowl",
900
+ "810": "space bar",
901
+ "811": "space heater",
902
+ "812": "space shuttle",
903
+ "813": "spatula",
904
+ "814": "speedboat",
905
+ "815": "spider web, spider's web",
906
+ "816": "spindle",
907
+ "817": "sports car, sport car",
908
+ "818": "spotlight, spot",
909
+ "819": "stage",
910
+ "820": "steam locomotive",
911
+ "821": "steel arch bridge",
912
+ "822": "steel drum",
913
+ "823": "stethoscope",
914
+ "824": "stole",
915
+ "825": "stone wall",
916
+ "826": "stopwatch, stop watch",
917
+ "827": "stove",
918
+ "828": "strainer",
919
+ "829": "streetcar, tram, tramcar, trolley, trolley car",
920
+ "830": "stretcher",
921
+ "831": "studio couch, day bed",
922
+ "832": "stupa, tope",
923
+ "833": "submarine, pigboat, sub, U-boat",
924
+ "834": "suit, suit of clothes",
925
+ "835": "sundial",
926
+ "836": "sunglass",
927
+ "837": "sunglasses, dark glasses, shades",
928
+ "838": "sunscreen, sunblock, sun blocker",
929
+ "839": "suspension bridge",
930
+ "840": "swab, swob, mop",
931
+ "841": "sweatshirt",
932
+ "842": "swimming trunks, bathing trunks",
933
+ "843": "swing",
934
+ "844": "switch, electric switch, electrical switch",
935
+ "845": "syringe",
936
+ "846": "table lamp",
937
+ "847": "tank, army tank, armored combat vehicle, armoured combat vehicle",
938
+ "848": "tape player",
939
+ "849": "teapot",
940
+ "850": "teddy, teddy bear",
941
+ "851": "television, television system",
942
+ "852": "tennis ball",
943
+ "853": "thatch, thatched roof",
944
+ "854": "theater curtain, theatre curtain",
945
+ "855": "thimble",
946
+ "856": "thresher, thrasher, threshing machine",
947
+ "857": "throne",
948
+ "858": "tile roof",
949
+ "859": "toaster",
950
+ "860": "tobacco shop, tobacconist shop, tobacconist",
951
+ "861": "toilet seat",
952
+ "862": "torch",
953
+ "863": "totem pole",
954
+ "864": "tow truck, tow car, wrecker",
955
+ "865": "toyshop",
956
+ "866": "tractor",
957
+ "867": "trailer truck, tractor trailer, trucking rig, rig, articulated lorry, semi",
958
+ "868": "tray",
959
+ "869": "trench coat",
960
+ "870": "tricycle, trike, velocipede",
961
+ "871": "trimaran",
962
+ "872": "tripod",
963
+ "873": "triumphal arch",
964
+ "874": "trolleybus, trolley coach, trackless trolley",
965
+ "875": "trombone",
966
+ "876": "tub, vat",
967
+ "877": "turnstile",
968
+ "878": "typewriter keyboard",
969
+ "879": "umbrella",
970
+ "880": "unicycle, monocycle",
971
+ "881": "upright, upright piano",
972
+ "882": "vacuum, vacuum cleaner",
973
+ "883": "vase",
974
+ "884": "vault",
975
+ "885": "velvet",
976
+ "886": "vending machine",
977
+ "887": "vestment",
978
+ "888": "viaduct",
979
+ "889": "violin, fiddle",
980
+ "890": "volleyball",
981
+ "891": "waffle iron",
982
+ "892": "wall clock",
983
+ "893": "wallet, billfold, notecase, pocketbook",
984
+ "894": "wardrobe, closet, press",
985
+ "895": "warplane, military plane",
986
+ "896": "washbasin, handbasin, washbowl, lavabo, wash-hand basin",
987
+ "897": "washer, automatic washer, washing machine",
988
+ "898": "water bottle",
989
+ "899": "water jug",
990
+ "900": "water tower",
991
+ "901": "whiskey jug",
992
+ "902": "whistle",
993
+ "903": "wig",
994
+ "904": "window screen",
995
+ "905": "window shade",
996
+ "906": "Windsor tie",
997
+ "907": "wine bottle",
998
+ "908": "wing",
999
+ "909": "wok",
1000
+ "910": "wooden spoon",
1001
+ "911": "wool, woolen, woollen",
1002
+ "912": "worm fence, snake fence, snake-rail fence, Virginia fence",
1003
+ "913": "wreck",
1004
+ "914": "yawl",
1005
+ "915": "yurt",
1006
+ "916": "web site, website, internet site, site",
1007
+ "917": "comic book",
1008
+ "918": "crossword puzzle, crossword",
1009
+ "919": "street sign",
1010
+ "920": "traffic light, traffic signal, stoplight",
1011
+ "921": "book jacket, dust cover, dust jacket, dust wrapper",
1012
+ "922": "menu",
1013
+ "923": "plate",
1014
+ "924": "guacamole",
1015
+ "925": "consomme",
1016
+ "926": "hot pot, hotpot",
1017
+ "927": "trifle",
1018
+ "928": "ice cream, icecream",
1019
+ "929": "ice lolly, lolly, lollipop, popsicle",
1020
+ "930": "French loaf",
1021
+ "931": "bagel, beigel",
1022
+ "932": "pretzel",
1023
+ "933": "cheeseburger",
1024
+ "934": "hotdog, hot dog, red hot",
1025
+ "935": "mashed potato",
1026
+ "936": "head cabbage",
1027
+ "937": "broccoli",
1028
+ "938": "cauliflower",
1029
+ "939": "zucchini, courgette",
1030
+ "940": "spaghetti squash",
1031
+ "941": "acorn squash",
1032
+ "942": "butternut squash",
1033
+ "943": "cucumber, cuke",
1034
+ "944": "artichoke, globe artichoke",
1035
+ "945": "bell pepper",
1036
+ "946": "cardoon",
1037
+ "947": "mushroom",
1038
+ "948": "Granny Smith",
1039
+ "949": "strawberry",
1040
+ "950": "orange",
1041
+ "951": "lemon",
1042
+ "952": "fig",
1043
+ "953": "pineapple, ananas",
1044
+ "954": "banana",
1045
+ "955": "jackfruit, jak, jack",
1046
+ "956": "custard apple",
1047
+ "957": "pomegranate",
1048
+ "958": "hay",
1049
+ "959": "carbonara",
1050
+ "960": "chocolate sauce, chocolate syrup",
1051
+ "961": "dough",
1052
+ "962": "meat loaf, meatloaf",
1053
+ "963": "pizza, pizza pie",
1054
+ "964": "potpie",
1055
+ "965": "burrito",
1056
+ "966": "red wine",
1057
+ "967": "espresso",
1058
+ "968": "cup",
1059
+ "969": "eggnog",
1060
+ "970": "alp",
1061
+ "971": "bubble",
1062
+ "972": "cliff, drop, drop-off",
1063
+ "973": "coral reef",
1064
+ "974": "geyser",
1065
+ "975": "lakeside, lakeshore",
1066
+ "976": "promontory, headland, head, foreland",
1067
+ "977": "sandbar, sand bar",
1068
+ "978": "seashore, coast, seacoast, sea-coast",
1069
+ "979": "valley, vale",
1070
+ "980": "volcano",
1071
+ "981": "ballplayer, baseball player",
1072
+ "982": "groom, bridegroom",
1073
+ "983": "scuba diver",
1074
+ "984": "rapeseed",
1075
+ "985": "daisy",
1076
+ "986": "yellow lady's slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium parviflorum",
1077
+ "987": "corn",
1078
+ "988": "acorn",
1079
+ "989": "hip, rose hip, rosehip",
1080
+ "990": "buckeye, horse chestnut, conker",
1081
+ "991": "coral fungus",
1082
+ "992": "agaric",
1083
+ "993": "gyromitra",
1084
+ "994": "stinkhorn, carrion fungus",
1085
+ "995": "earthstar",
1086
+ "996": "hen-of-the-woods, hen of the woods, Polyporus frondosus, Grifola frondosa",
1087
+ "997": "bolete",
1088
+ "998": "ear, spike, capitulum",
1089
+ "999": "toilet tissue, toilet paper, bathroom tissue"
1090
+ },
1091
+ "image_size": 256,
1092
+ "initializer_range": 0.02,
1093
+ "label2id": {
1094
+ "Afghan hound, Afghan": 160,
1095
+ "African chameleon, Chamaeleo chamaeleon": 47,
1096
+ "African crocodile, Nile crocodile, Crocodylus niloticus": 49,
1097
+ "African elephant, Loxodonta africana": 386,
1098
+ "African grey, African gray, Psittacus erithacus": 87,
1099
+ "African hunting dog, hyena dog, Cape hunting dog, Lycaon pictus": 275,
1100
+ "Airedale, Airedale terrier": 191,
1101
+ "American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier": 180,
1102
+ "American alligator, Alligator mississipiensis": 50,
1103
+ "American black bear, black bear, Ursus americanus, Euarctos americanus": 295,
1104
+ "American chameleon, anole, Anolis carolinensis": 40,
1105
+ "American coot, marsh hen, mud hen, water hen, Fulica americana": 137,
1106
+ "American egret, great white heron, Egretta albus": 132,
1107
+ "American lobster, Northern lobster, Maine lobster, Homarus americanus": 122,
1108
+ "Angora, Angora rabbit": 332,
1109
+ "Appenzeller": 240,
1110
+ "Arabian camel, dromedary, Camelus dromedarius": 354,
1111
+ "Arctic fox, white fox, Alopex lagopus": 279,
1112
+ "Australian terrier": 193,
1113
+ "Band Aid": 419,
1114
+ "Bedlington terrier": 181,
1115
+ "Bernese mountain dog": 239,
1116
+ "Blenheim spaniel": 156,
1117
+ "Border collie": 232,
1118
+ "Border terrier": 182,
1119
+ "Boston bull, Boston terrier": 195,
1120
+ "Bouvier des Flandres, Bouviers des Flandres": 233,
1121
+ "Brabancon griffon": 262,
1122
+ "Brittany spaniel": 215,
1123
+ "CD player": 485,
1124
+ "Cardigan, Cardigan Welsh corgi": 264,
1125
+ "Chesapeake Bay retriever": 209,
1126
+ "Chihuahua": 151,
1127
+ "Christmas stocking": 496,
1128
+ "Crock Pot": 521,
1129
+ "Dandie Dinmont, Dandie Dinmont terrier": 194,
1130
+ "Doberman, Doberman pinscher": 236,
1131
+ "Dungeness crab, Cancer magister": 118,
1132
+ "Dutch oven": 544,
1133
+ "Egyptian cat": 285,
1134
+ "English foxhound": 167,
1135
+ "English setter": 212,
1136
+ "English springer, English springer spaniel": 217,
1137
+ "EntleBucher": 241,
1138
+ "Eskimo dog, husky": 248,
1139
+ "European fire salamander, Salamandra salamandra": 25,
1140
+ "European gallinule, Porphyrio porphyrio": 136,
1141
+ "French bulldog": 245,
1142
+ "French horn, horn": 566,
1143
+ "French loaf": 930,
1144
+ "German shepherd, German shepherd dog, German police dog, alsatian": 235,
1145
+ "German short-haired pointer": 210,
1146
+ "Gila monster, Heloderma suspectum": 45,
1147
+ "Gordon setter": 214,
1148
+ "Granny Smith": 948,
1149
+ "Great Dane": 246,
1150
+ "Great Pyrenees": 257,
1151
+ "Greater Swiss Mountain dog": 238,
1152
+ "Ibizan hound, Ibizan Podenco": 173,
1153
+ "Indian cobra, Naja naja": 63,
1154
+ "Indian elephant, Elephas maximus": 385,
1155
+ "Irish setter, red setter": 213,
1156
+ "Irish terrier": 184,
1157
+ "Irish water spaniel": 221,
1158
+ "Irish wolfhound": 170,
1159
+ "Italian greyhound": 171,
1160
+ "Japanese spaniel": 152,
1161
+ "Kerry blue terrier": 183,
1162
+ "Komodo dragon, Komodo lizard, dragon lizard, giant lizard, Varanus komodoensis": 48,
1163
+ "Labrador retriever": 208,
1164
+ "Lakeland terrier": 189,
1165
+ "Leonberg": 255,
1166
+ "Lhasa, Lhasa apso": 204,
1167
+ "Loafer": 630,
1168
+ "Madagascar cat, ring-tailed lemur, Lemur catta": 383,
1169
+ "Maltese dog, Maltese terrier, Maltese": 153,
1170
+ "Mexican hairless": 268,
1171
+ "Model T": 661,
1172
+ "Newfoundland, Newfoundland dog": 256,
1173
+ "Norfolk terrier": 185,
1174
+ "Norwegian elkhound, elkhound": 174,
1175
+ "Norwich terrier": 186,
1176
+ "Old English sheepdog, bobtail": 229,
1177
+ "Pekinese, Pekingese, Peke": 154,
1178
+ "Pembroke, Pembroke Welsh corgi": 263,
1179
+ "Persian cat": 283,
1180
+ "Petri dish": 712,
1181
+ "Polaroid camera, Polaroid Land camera": 732,
1182
+ "Pomeranian": 259,
1183
+ "Rhodesian ridgeback": 159,
1184
+ "Rottweiler": 234,
1185
+ "Saint Bernard, St Bernard": 247,
1186
+ "Saluki, gazelle hound": 176,
1187
+ "Samoyed, Samoyede": 258,
1188
+ "Scotch terrier, Scottish terrier, Scottie": 199,
1189
+ "Scottish deerhound, deerhound": 177,
1190
+ "Sealyham terrier, Sealyham": 190,
1191
+ "Shetland sheepdog, Shetland sheep dog, Shetland": 230,
1192
+ "Shih-Tzu": 155,
1193
+ "Siamese cat, Siamese": 284,
1194
+ "Siberian husky": 250,
1195
+ "Staffordshire bullterrier, Staffordshire bull terrier": 179,
1196
+ "Sussex spaniel": 220,
1197
+ "Tibetan mastiff": 244,
1198
+ "Tibetan terrier, chrysanthemum dog": 200,
1199
+ "Walker hound, Walker foxhound": 166,
1200
+ "Weimaraner": 178,
1201
+ "Welsh springer spaniel": 218,
1202
+ "West Highland white terrier": 203,
1203
+ "Windsor tie": 906,
1204
+ "Yorkshire terrier": 187,
1205
+ "abacus": 398,
1206
+ "abaya": 399,
1207
+ "academic gown, academic robe, judge's robe": 400,
1208
+ "accordion, piano accordion, squeeze box": 401,
1209
+ "acorn": 988,
1210
+ "acorn squash": 941,
1211
+ "acoustic guitar": 402,
1212
+ "admiral": 321,
1213
+ "affenpinscher, monkey pinscher, monkey dog": 252,
1214
+ "agama": 42,
1215
+ "agaric": 992,
1216
+ "aircraft carrier, carrier, flattop, attack aircraft carrier": 403,
1217
+ "airliner": 404,
1218
+ "airship, dirigible": 405,
1219
+ "albatross, mollymawk": 146,
1220
+ "alligator lizard": 44,
1221
+ "alp": 970,
1222
+ "altar": 406,
1223
+ "ambulance": 407,
1224
+ "amphibian, amphibious vehicle": 408,
1225
+ "analog clock": 409,
1226
+ "anemone fish": 393,
1227
+ "ant, emmet, pismire": 310,
1228
+ "apiary, bee house": 410,
1229
+ "apron": 411,
1230
+ "armadillo": 363,
1231
+ "artichoke, globe artichoke": 944,
1232
+ "ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin": 412,
1233
+ "assault rifle, assault gun": 413,
1234
+ "axolotl, mud puppy, Ambystoma mexicanum": 29,
1235
+ "baboon": 372,
1236
+ "backpack, back pack, knapsack, packsack, rucksack, haversack": 414,
1237
+ "badger": 362,
1238
+ "bagel, beigel": 931,
1239
+ "bakery, bakeshop, bakehouse": 415,
1240
+ "balance beam, beam": 416,
1241
+ "bald eagle, American eagle, Haliaeetus leucocephalus": 22,
1242
+ "balloon": 417,
1243
+ "ballplayer, baseball player": 981,
1244
+ "ballpoint, ballpoint pen, ballpen, Biro": 418,
1245
+ "banana": 954,
1246
+ "banded gecko": 38,
1247
+ "banjo": 420,
1248
+ "bannister, banister, balustrade, balusters, handrail": 421,
1249
+ "barbell": 422,
1250
+ "barber chair": 423,
1251
+ "barbershop": 424,
1252
+ "barn": 425,
1253
+ "barn spider, Araneus cavaticus": 73,
1254
+ "barometer": 426,
1255
+ "barracouta, snoek": 389,
1256
+ "barrel, cask": 427,
1257
+ "barrow, garden cart, lawn cart, wheelbarrow": 428,
1258
+ "baseball": 429,
1259
+ "basenji": 253,
1260
+ "basketball": 430,
1261
+ "basset, basset hound": 161,
1262
+ "bassinet": 431,
1263
+ "bassoon": 432,
1264
+ "bath towel": 434,
1265
+ "bathing cap, swimming cap": 433,
1266
+ "bathtub, bathing tub, bath, tub": 435,
1267
+ "beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon": 436,
1268
+ "beacon, lighthouse, beacon light, pharos": 437,
1269
+ "beagle": 162,
1270
+ "beaker": 438,
1271
+ "bearskin, busby, shako": 439,
1272
+ "beaver": 337,
1273
+ "bee": 309,
1274
+ "bee eater": 92,
1275
+ "beer bottle": 440,
1276
+ "beer glass": 441,
1277
+ "bell cote, bell cot": 442,
1278
+ "bell pepper": 945,
1279
+ "bib": 443,
1280
+ "bicycle-built-for-two, tandem bicycle, tandem": 444,
1281
+ "bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis": 349,
1282
+ "bikini, two-piece": 445,
1283
+ "binder, ring-binder": 446,
1284
+ "binoculars, field glasses, opera glasses": 447,
1285
+ "birdhouse": 448,
1286
+ "bison": 347,
1287
+ "bittern": 133,
1288
+ "black and gold garden spider, Argiope aurantia": 72,
1289
+ "black grouse": 80,
1290
+ "black stork, Ciconia nigra": 128,
1291
+ "black swan, Cygnus atratus": 100,
1292
+ "black widow, Latrodectus mactans": 75,
1293
+ "black-and-tan coonhound": 165,
1294
+ "black-footed ferret, ferret, Mustela nigripes": 359,
1295
+ "bloodhound, sleuthhound": 163,
1296
+ "bluetick": 164,
1297
+ "boa constrictor, Constrictor constrictor": 61,
1298
+ "boathouse": 449,
1299
+ "bobsled, bobsleigh, bob": 450,
1300
+ "bolete": 997,
1301
+ "bolo tie, bolo, bola tie, bola": 451,
1302
+ "bonnet, poke bonnet": 452,
1303
+ "book jacket, dust cover, dust jacket, dust wrapper": 921,
1304
+ "bookcase": 453,
1305
+ "bookshop, bookstore, bookstall": 454,
1306
+ "borzoi, Russian wolfhound": 169,
1307
+ "bottlecap": 455,
1308
+ "bow": 456,
1309
+ "bow tie, bow-tie, bowtie": 457,
1310
+ "box turtle, box tortoise": 37,
1311
+ "boxer": 242,
1312
+ "brain coral": 109,
1313
+ "brambling, Fringilla montifringilla": 10,
1314
+ "brass, memorial tablet, plaque": 458,
1315
+ "brassiere, bra, bandeau": 459,
1316
+ "breakwater, groin, groyne, mole, bulwark, seawall, jetty": 460,
1317
+ "breastplate, aegis, egis": 461,
1318
+ "briard": 226,
1319
+ "broccoli": 937,
1320
+ "broom": 462,
1321
+ "brown bear, bruin, Ursus arctos": 294,
1322
+ "bubble": 971,
1323
+ "bucket, pail": 463,
1324
+ "buckeye, horse chestnut, conker": 990,
1325
+ "buckle": 464,
1326
+ "bulbul": 16,
1327
+ "bull mastiff": 243,
1328
+ "bullet train, bullet": 466,
1329
+ "bulletproof vest": 465,
1330
+ "bullfrog, Rana catesbeiana": 30,
1331
+ "burrito": 965,
1332
+ "bustard": 138,
1333
+ "butcher shop, meat market": 467,
1334
+ "butternut squash": 942,
1335
+ "cab, hack, taxi, taxicab": 468,
1336
+ "cabbage butterfly": 324,
1337
+ "cairn, cairn terrier": 192,
1338
+ "caldron, cauldron": 469,
1339
+ "can opener, tin opener": 473,
1340
+ "candle, taper, wax light": 470,
1341
+ "cannon": 471,
1342
+ "canoe": 472,
1343
+ "capuchin, ringtail, Cebus capucinus": 378,
1344
+ "car mirror": 475,
1345
+ "car wheel": 479,
1346
+ "carbonara": 959,
1347
+ "cardigan": 474,
1348
+ "cardoon": 946,
1349
+ "carousel, carrousel, merry-go-round, roundabout, whirligig": 476,
1350
+ "carpenter's kit, tool kit": 477,
1351
+ "carton": 478,
1352
+ "cash machine, cash dispenser, automated teller machine, automatic teller machine, automated teller, automatic teller, ATM": 480,
1353
+ "cassette": 481,
1354
+ "cassette player": 482,
1355
+ "castle": 483,
1356
+ "catamaran": 484,
1357
+ "cauliflower": 938,
1358
+ "cello, violoncello": 486,
1359
+ "cellular telephone, cellular phone, cellphone, cell, mobile phone": 487,
1360
+ "centipede": 79,
1361
+ "chain": 488,
1362
+ "chain mail, ring mail, mail, chain armor, chain armour, ring armor, ring armour": 490,
1363
+ "chain saw, chainsaw": 491,
1364
+ "chainlink fence": 489,
1365
+ "chambered nautilus, pearly nautilus, nautilus": 117,
1366
+ "cheeseburger": 933,
1367
+ "cheetah, chetah, Acinonyx jubatus": 293,
1368
+ "chest": 492,
1369
+ "chickadee": 19,
1370
+ "chiffonier, commode": 493,
1371
+ "chime, bell, gong": 494,
1372
+ "chimpanzee, chimp, Pan troglodytes": 367,
1373
+ "china cabinet, china closet": 495,
1374
+ "chiton, coat-of-mail shell, sea cradle, polyplacophore": 116,
1375
+ "chocolate sauce, chocolate syrup": 960,
1376
+ "chow, chow chow": 260,
1377
+ "church, church building": 497,
1378
+ "cicada, cicala": 316,
1379
+ "cinema, movie theater, movie theatre, movie house, picture palace": 498,
1380
+ "cleaver, meat cleaver, chopper": 499,
1381
+ "cliff dwelling": 500,
1382
+ "cliff, drop, drop-off": 972,
1383
+ "cloak": 501,
1384
+ "clog, geta, patten, sabot": 502,
1385
+ "clumber, clumber spaniel": 216,
1386
+ "cock": 7,
1387
+ "cocker spaniel, English cocker spaniel, cocker": 219,
1388
+ "cockroach, roach": 314,
1389
+ "cocktail shaker": 503,
1390
+ "coffee mug": 504,
1391
+ "coffeepot": 505,
1392
+ "coho, cohoe, coho salmon, blue jack, silver salmon, Oncorhynchus kisutch": 391,
1393
+ "coil, spiral, volute, whorl, helix": 506,
1394
+ "collie": 231,
1395
+ "colobus, colobus monkey": 375,
1396
+ "combination lock": 507,
1397
+ "comic book": 917,
1398
+ "common iguana, iguana, Iguana iguana": 39,
1399
+ "common newt, Triturus vulgaris": 26,
1400
+ "computer keyboard, keypad": 508,
1401
+ "conch": 112,
1402
+ "confectionery, confectionary, candy store": 509,
1403
+ "consomme": 925,
1404
+ "container ship, containership, container vessel": 510,
1405
+ "convertible": 511,
1406
+ "coral fungus": 991,
1407
+ "coral reef": 973,
1408
+ "corkscrew, bottle screw": 512,
1409
+ "corn": 987,
1410
+ "cornet, horn, trumpet, trump": 513,
1411
+ "coucal": 91,
1412
+ "cougar, puma, catamount, mountain lion, painter, panther, Felis concolor": 286,
1413
+ "cowboy boot": 514,
1414
+ "cowboy hat, ten-gallon hat": 515,
1415
+ "coyote, prairie wolf, brush wolf, Canis latrans": 272,
1416
+ "cradle": 516,
1417
+ "crane": 517,
1418
+ "crash helmet": 518,
1419
+ "crate": 519,
1420
+ "crayfish, crawfish, crawdad, crawdaddy": 124,
1421
+ "crib, cot": 520,
1422
+ "cricket": 312,
1423
+ "croquet ball": 522,
1424
+ "crossword puzzle, crossword": 918,
1425
+ "crutch": 523,
1426
+ "cucumber, cuke": 943,
1427
+ "cuirass": 524,
1428
+ "cup": 968,
1429
+ "curly-coated retriever": 206,
1430
+ "custard apple": 956,
1431
+ "daisy": 985,
1432
+ "dalmatian, coach dog, carriage dog": 251,
1433
+ "dam, dike, dyke": 525,
1434
+ "damselfly": 320,
1435
+ "desk": 526,
1436
+ "desktop computer": 527,
1437
+ "dhole, Cuon alpinus": 274,
1438
+ "dial telephone, dial phone": 528,
1439
+ "diamondback, diamondback rattlesnake, Crotalus adamanteus": 67,
1440
+ "diaper, nappy, napkin": 529,
1441
+ "digital clock": 530,
1442
+ "digital watch": 531,
1443
+ "dingo, warrigal, warragal, Canis dingo": 273,
1444
+ "dining table, board": 532,
1445
+ "dishrag, dishcloth": 533,
1446
+ "dishwasher, dish washer, dishwashing machine": 534,
1447
+ "disk brake, disc brake": 535,
1448
+ "dock, dockage, docking facility": 536,
1449
+ "dogsled, dog sled, dog sleigh": 537,
1450
+ "dome": 538,
1451
+ "doormat, welcome mat": 539,
1452
+ "dough": 961,
1453
+ "dowitcher": 142,
1454
+ "dragonfly, darning needle, devil's darning needle, sewing needle, snake feeder, snake doctor, mosquito hawk, skeeter hawk": 319,
1455
+ "drake": 97,
1456
+ "drilling platform, offshore rig": 540,
1457
+ "drum, membranophone, tympan": 541,
1458
+ "drumstick": 542,
1459
+ "dugong, Dugong dugon": 149,
1460
+ "dumbbell": 543,
1461
+ "dung beetle": 305,
1462
+ "ear, spike, capitulum": 998,
1463
+ "earthstar": 995,
1464
+ "echidna, spiny anteater, anteater": 102,
1465
+ "eel": 390,
1466
+ "eft": 27,
1467
+ "eggnog": 969,
1468
+ "electric fan, blower": 545,
1469
+ "electric guitar": 546,
1470
+ "electric locomotive": 547,
1471
+ "electric ray, crampfish, numbfish, torpedo": 5,
1472
+ "entertainment center": 548,
1473
+ "envelope": 549,
1474
+ "espresso": 967,
1475
+ "espresso maker": 550,
1476
+ "face powder": 551,
1477
+ "feather boa, boa": 552,
1478
+ "fiddler crab": 120,
1479
+ "fig": 952,
1480
+ "file, file cabinet, filing cabinet": 553,
1481
+ "fire engine, fire truck": 555,
1482
+ "fire screen, fireguard": 556,
1483
+ "fireboat": 554,
1484
+ "flagpole, flagstaff": 557,
1485
+ "flamingo": 130,
1486
+ "flat-coated retriever": 205,
1487
+ "flatworm, platyhelminth": 110,
1488
+ "flute, transverse flute": 558,
1489
+ "fly": 308,
1490
+ "folding chair": 559,
1491
+ "football helmet": 560,
1492
+ "forklift": 561,
1493
+ "fountain": 562,
1494
+ "fountain pen": 563,
1495
+ "four-poster": 564,
1496
+ "fox squirrel, eastern fox squirrel, Sciurus niger": 335,
1497
+ "freight car": 565,
1498
+ "frilled lizard, Chlamydosaurus kingi": 43,
1499
+ "frying pan, frypan, skillet": 567,
1500
+ "fur coat": 568,
1501
+ "gar, garfish, garpike, billfish, Lepisosteus osseus": 395,
1502
+ "garbage truck, dustcart": 569,
1503
+ "garden spider, Aranea diademata": 74,
1504
+ "garter snake, grass snake": 57,
1505
+ "gas pump, gasoline pump, petrol pump, island dispenser": 571,
1506
+ "gasmask, respirator, gas helmet": 570,
1507
+ "gazelle": 353,
1508
+ "geyser": 974,
1509
+ "giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca": 388,
1510
+ "giant schnauzer": 197,
1511
+ "gibbon, Hylobates lar": 368,
1512
+ "go-kart": 573,
1513
+ "goblet": 572,
1514
+ "golden retriever": 207,
1515
+ "goldfinch, Carduelis carduelis": 11,
1516
+ "goldfish, Carassius auratus": 1,
1517
+ "golf ball": 574,
1518
+ "golfcart, golf cart": 575,
1519
+ "gondola": 576,
1520
+ "gong, tam-tam": 577,
1521
+ "goose": 99,
1522
+ "gorilla, Gorilla gorilla": 366,
1523
+ "gown": 578,
1524
+ "grand piano, grand": 579,
1525
+ "grasshopper, hopper": 311,
1526
+ "great grey owl, great gray owl, Strix nebulosa": 24,
1527
+ "great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias": 2,
1528
+ "green lizard, Lacerta viridis": 46,
1529
+ "green mamba": 64,
1530
+ "green snake, grass snake": 55,
1531
+ "greenhouse, nursery, glasshouse": 580,
1532
+ "grey fox, gray fox, Urocyon cinereoargenteus": 280,
1533
+ "grey whale, gray whale, devilfish, Eschrichtius gibbosus, Eschrichtius robustus": 147,
1534
+ "grille, radiator grille": 581,
1535
+ "grocery store, grocery, food market, market": 582,
1536
+ "groenendael": 224,
1537
+ "groom, bridegroom": 982,
1538
+ "ground beetle, carabid beetle": 302,
1539
+ "guacamole": 924,
1540
+ "guenon, guenon monkey": 370,
1541
+ "guillotine": 583,
1542
+ "guinea pig, Cavia cobaya": 338,
1543
+ "gyromitra": 993,
1544
+ "hair slide": 584,
1545
+ "hair spray": 585,
1546
+ "half track": 586,
1547
+ "hammer": 587,
1548
+ "hammerhead, hammerhead shark": 4,
1549
+ "hamper": 588,
1550
+ "hamster": 333,
1551
+ "hand blower, blow dryer, blow drier, hair dryer, hair drier": 589,
1552
+ "hand-held computer, hand-held microcomputer": 590,
1553
+ "handkerchief, hankie, hanky, hankey": 591,
1554
+ "hard disc, hard disk, fixed disk": 592,
1555
+ "hare": 331,
1556
+ "harmonica, mouth organ, harp, mouth harp": 593,
1557
+ "harp": 594,
1558
+ "hartebeest": 351,
1559
+ "harvester, reaper": 595,
1560
+ "harvestman, daddy longlegs, Phalangium opilio": 70,
1561
+ "hatchet": 596,
1562
+ "hay": 958,
1563
+ "head cabbage": 936,
1564
+ "hen": 8,
1565
+ "hen-of-the-woods, hen of the woods, Polyporus frondosus, Grifola frondosa": 996,
1566
+ "hermit crab": 125,
1567
+ "hip, rose hip, rosehip": 989,
1568
+ "hippopotamus, hippo, river horse, Hippopotamus amphibius": 344,
1569
+ "hog, pig, grunter, squealer, Sus scrofa": 341,
1570
+ "hognose snake, puff adder, sand viper": 54,
1571
+ "holster": 597,
1572
+ "home theater, home theatre": 598,
1573
+ "honeycomb": 599,
1574
+ "hook, claw": 600,
1575
+ "hoopskirt, crinoline": 601,
1576
+ "horizontal bar, high bar": 602,
1577
+ "hornbill": 93,
1578
+ "horned viper, cerastes, sand viper, horned asp, Cerastes cornutus": 66,
1579
+ "horse cart, horse-cart": 603,
1580
+ "hot pot, hotpot": 926,
1581
+ "hotdog, hot dog, red hot": 934,
1582
+ "hourglass": 604,
1583
+ "house finch, linnet, Carpodacus mexicanus": 12,
1584
+ "howler monkey, howler": 379,
1585
+ "hummingbird": 94,
1586
+ "hyena, hyaena": 276,
1587
+ "iPod": 605,
1588
+ "ibex, Capra ibex": 350,
1589
+ "ice bear, polar bear, Ursus Maritimus, Thalarctos maritimus": 296,
1590
+ "ice cream, icecream": 928,
1591
+ "ice lolly, lolly, lollipop, popsicle": 929,
1592
+ "impala, Aepyceros melampus": 352,
1593
+ "indigo bunting, indigo finch, indigo bird, Passerina cyanea": 14,
1594
+ "indri, indris, Indri indri, Indri brevicaudatus": 384,
1595
+ "iron, smoothing iron": 606,
1596
+ "isopod": 126,
1597
+ "jacamar": 95,
1598
+ "jack-o'-lantern": 607,
1599
+ "jackfruit, jak, jack": 955,
1600
+ "jaguar, panther, Panthera onca, Felis onca": 290,
1601
+ "jay": 17,
1602
+ "jean, blue jean, denim": 608,
1603
+ "jeep, landrover": 609,
1604
+ "jellyfish": 107,
1605
+ "jersey, T-shirt, tee shirt": 610,
1606
+ "jigsaw puzzle": 611,
1607
+ "jinrikisha, ricksha, rickshaw": 612,
1608
+ "joystick": 613,
1609
+ "junco, snowbird": 13,
1610
+ "keeshond": 261,
1611
+ "kelpie": 227,
1612
+ "killer whale, killer, orca, grampus, sea wolf, Orcinus orca": 148,
1613
+ "kimono": 614,
1614
+ "king crab, Alaska crab, Alaskan king crab, Alaska king crab, Paralithodes camtschatica": 121,
1615
+ "king penguin, Aptenodytes patagonica": 145,
1616
+ "king snake, kingsnake": 56,
1617
+ "kit fox, Vulpes macrotis": 278,
1618
+ "kite": 21,
1619
+ "knee pad": 615,
1620
+ "knot": 616,
1621
+ "koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus": 105,
1622
+ "komondor": 228,
1623
+ "kuvasz": 222,
1624
+ "lab coat, laboratory coat": 617,
1625
+ "lacewing, lacewing fly": 318,
1626
+ "ladle": 618,
1627
+ "ladybug, ladybeetle, lady beetle, ladybird, ladybird beetle": 301,
1628
+ "lakeside, lakeshore": 975,
1629
+ "lampshade, lamp shade": 619,
1630
+ "langur": 374,
1631
+ "laptop, laptop computer": 620,
1632
+ "lawn mower, mower": 621,
1633
+ "leaf beetle, chrysomelid": 304,
1634
+ "leafhopper": 317,
1635
+ "leatherback turtle, leatherback, leathery turtle, Dermochelys coriacea": 34,
1636
+ "lemon": 951,
1637
+ "lens cap, lens cover": 622,
1638
+ "leopard, Panthera pardus": 288,
1639
+ "lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens": 387,
1640
+ "letter opener, paper knife, paperknife": 623,
1641
+ "library": 624,
1642
+ "lifeboat": 625,
1643
+ "lighter, light, igniter, ignitor": 626,
1644
+ "limousine, limo": 627,
1645
+ "limpkin, Aramus pictus": 135,
1646
+ "liner, ocean liner": 628,
1647
+ "lion, king of beasts, Panthera leo": 291,
1648
+ "lionfish": 396,
1649
+ "lipstick, lip rouge": 629,
1650
+ "little blue heron, Egretta caerulea": 131,
1651
+ "llama": 355,
1652
+ "loggerhead, loggerhead turtle, Caretta caretta": 33,
1653
+ "long-horned beetle, longicorn, longicorn beetle": 303,
1654
+ "lorikeet": 90,
1655
+ "lotion": 631,
1656
+ "loudspeaker, speaker, speaker unit, loudspeaker system, speaker system": 632,
1657
+ "loupe, jeweler's loupe": 633,
1658
+ "lumbermill, sawmill": 634,
1659
+ "lycaenid, lycaenid butterfly": 326,
1660
+ "lynx, catamount": 287,
1661
+ "macaque": 373,
1662
+ "macaw": 88,
1663
+ "magnetic compass": 635,
1664
+ "magpie": 18,
1665
+ "mailbag, postbag": 636,
1666
+ "mailbox, letter box": 637,
1667
+ "maillot": 638,
1668
+ "maillot, tank suit": 639,
1669
+ "malamute, malemute, Alaskan malamute": 249,
1670
+ "malinois": 225,
1671
+ "manhole cover": 640,
1672
+ "mantis, mantid": 315,
1673
+ "maraca": 641,
1674
+ "marimba, xylophone": 642,
1675
+ "marmoset": 377,
1676
+ "marmot": 336,
1677
+ "mashed potato": 935,
1678
+ "mask": 643,
1679
+ "matchstick": 644,
1680
+ "maypole": 645,
1681
+ "maze, labyrinth": 646,
1682
+ "measuring cup": 647,
1683
+ "meat loaf, meatloaf": 962,
1684
+ "medicine chest, medicine cabinet": 648,
1685
+ "meerkat, mierkat": 299,
1686
+ "megalith, megalithic structure": 649,
1687
+ "menu": 922,
1688
+ "microphone, mike": 650,
1689
+ "microwave, microwave oven": 651,
1690
+ "military uniform": 652,
1691
+ "milk can": 653,
1692
+ "miniature pinscher": 237,
1693
+ "miniature poodle": 266,
1694
+ "miniature schnauzer": 196,
1695
+ "minibus": 654,
1696
+ "miniskirt, mini": 655,
1697
+ "minivan": 656,
1698
+ "mink": 357,
1699
+ "missile": 657,
1700
+ "mitten": 658,
1701
+ "mixing bowl": 659,
1702
+ "mobile home, manufactured home": 660,
1703
+ "modem": 662,
1704
+ "monarch, monarch butterfly, milkweed butterfly, Danaus plexippus": 323,
1705
+ "monastery": 663,
1706
+ "mongoose": 298,
1707
+ "monitor": 664,
1708
+ "moped": 665,
1709
+ "mortar": 666,
1710
+ "mortarboard": 667,
1711
+ "mosque": 668,
1712
+ "mosquito net": 669,
1713
+ "motor scooter, scooter": 670,
1714
+ "mountain bike, all-terrain bike, off-roader": 671,
1715
+ "mountain tent": 672,
1716
+ "mouse, computer mouse": 673,
1717
+ "mousetrap": 674,
1718
+ "moving van": 675,
1719
+ "mud turtle": 35,
1720
+ "mushroom": 947,
1721
+ "muzzle": 676,
1722
+ "nail": 677,
1723
+ "neck brace": 678,
1724
+ "necklace": 679,
1725
+ "nematode, nematode worm, roundworm": 111,
1726
+ "night snake, Hypsiglena torquata": 60,
1727
+ "nipple": 680,
1728
+ "notebook, notebook computer": 681,
1729
+ "obelisk": 682,
1730
+ "oboe, hautboy, hautbois": 683,
1731
+ "ocarina, sweet potato": 684,
1732
+ "odometer, hodometer, mileometer, milometer": 685,
1733
+ "oil filter": 686,
1734
+ "orange": 950,
1735
+ "orangutan, orang, orangutang, Pongo pygmaeus": 365,
1736
+ "organ, pipe organ": 687,
1737
+ "oscilloscope, scope, cathode-ray oscilloscope, CRO": 688,
1738
+ "ostrich, Struthio camelus": 9,
1739
+ "otter": 360,
1740
+ "otterhound, otter hound": 175,
1741
+ "overskirt": 689,
1742
+ "ox": 345,
1743
+ "oxcart": 690,
1744
+ "oxygen mask": 691,
1745
+ "oystercatcher, oyster catcher": 143,
1746
+ "packet": 692,
1747
+ "paddle, boat paddle": 693,
1748
+ "paddlewheel, paddle wheel": 694,
1749
+ "padlock": 695,
1750
+ "paintbrush": 696,
1751
+ "pajama, pyjama, pj's, jammies": 697,
1752
+ "palace": 698,
1753
+ "panpipe, pandean pipe, syrinx": 699,
1754
+ "paper towel": 700,
1755
+ "papillon": 157,
1756
+ "parachute, chute": 701,
1757
+ "parallel bars, bars": 702,
1758
+ "park bench": 703,
1759
+ "parking meter": 704,
1760
+ "partridge": 86,
1761
+ "passenger car, coach, carriage": 705,
1762
+ "patas, hussar monkey, Erythrocebus patas": 371,
1763
+ "patio, terrace": 706,
1764
+ "pay-phone, pay-station": 707,
1765
+ "peacock": 84,
1766
+ "pedestal, plinth, footstall": 708,
1767
+ "pelican": 144,
1768
+ "pencil box, pencil case": 709,
1769
+ "pencil sharpener": 710,
1770
+ "perfume, essence": 711,
1771
+ "photocopier": 713,
1772
+ "pick, plectrum, plectron": 714,
1773
+ "pickelhaube": 715,
1774
+ "picket fence, paling": 716,
1775
+ "pickup, pickup truck": 717,
1776
+ "pier": 718,
1777
+ "piggy bank, penny bank": 719,
1778
+ "pill bottle": 720,
1779
+ "pillow": 721,
1780
+ "pineapple, ananas": 953,
1781
+ "ping-pong ball": 722,
1782
+ "pinwheel": 723,
1783
+ "pirate, pirate ship": 724,
1784
+ "pitcher, ewer": 725,
1785
+ "pizza, pizza pie": 963,
1786
+ "plane, carpenter's plane, woodworking plane": 726,
1787
+ "planetarium": 727,
1788
+ "plastic bag": 728,
1789
+ "plate": 923,
1790
+ "plate rack": 729,
1791
+ "platypus, duckbill, duckbilled platypus, duck-billed platypus, Ornithorhynchus anatinus": 103,
1792
+ "plow, plough": 730,
1793
+ "plunger, plumber's helper": 731,
1794
+ "pole": 733,
1795
+ "polecat, fitch, foulmart, foumart, Mustela putorius": 358,
1796
+ "police van, police wagon, paddy wagon, patrol wagon, wagon, black Maria": 734,
1797
+ "pomegranate": 957,
1798
+ "poncho": 735,
1799
+ "pool table, billiard table, snooker table": 736,
1800
+ "pop bottle, soda bottle": 737,
1801
+ "porcupine, hedgehog": 334,
1802
+ "pot, flowerpot": 738,
1803
+ "potpie": 964,
1804
+ "potter's wheel": 739,
1805
+ "power drill": 740,
1806
+ "prairie chicken, prairie grouse, prairie fowl": 83,
1807
+ "prayer rug, prayer mat": 741,
1808
+ "pretzel": 932,
1809
+ "printer": 742,
1810
+ "prison, prison house": 743,
1811
+ "proboscis monkey, Nasalis larvatus": 376,
1812
+ "projectile, missile": 744,
1813
+ "projector": 745,
1814
+ "promontory, headland, head, foreland": 976,
1815
+ "ptarmigan": 81,
1816
+ "puck, hockey puck": 746,
1817
+ "puffer, pufferfish, blowfish, globefish": 397,
1818
+ "pug, pug-dog": 254,
1819
+ "punching bag, punch bag, punching ball, punchball": 747,
1820
+ "purse": 748,
1821
+ "quail": 85,
1822
+ "quill, quill pen": 749,
1823
+ "quilt, comforter, comfort, puff": 750,
1824
+ "racer, race car, racing car": 751,
1825
+ "racket, racquet": 752,
1826
+ "radiator": 753,
1827
+ "radio telescope, radio reflector": 755,
1828
+ "radio, wireless": 754,
1829
+ "rain barrel": 756,
1830
+ "ram, tup": 348,
1831
+ "rapeseed": 984,
1832
+ "recreational vehicle, RV, R.V.": 757,
1833
+ "red fox, Vulpes vulpes": 277,
1834
+ "red wine": 966,
1835
+ "red wolf, maned wolf, Canis rufus, Canis niger": 271,
1836
+ "red-backed sandpiper, dunlin, Erolia alpina": 140,
1837
+ "red-breasted merganser, Mergus serrator": 98,
1838
+ "redbone": 168,
1839
+ "redshank, Tringa totanus": 141,
1840
+ "reel": 758,
1841
+ "reflex camera": 759,
1842
+ "refrigerator, icebox": 760,
1843
+ "remote control, remote": 761,
1844
+ "restaurant, eating house, eating place, eatery": 762,
1845
+ "revolver, six-gun, six-shooter": 763,
1846
+ "rhinoceros beetle": 306,
1847
+ "rifle": 764,
1848
+ "ringlet, ringlet butterfly": 322,
1849
+ "ringneck snake, ring-necked snake, ring snake": 53,
1850
+ "robin, American robin, Turdus migratorius": 15,
1851
+ "rock beauty, Holocanthus tricolor": 392,
1852
+ "rock crab, Cancer irroratus": 119,
1853
+ "rock python, rock snake, Python sebae": 62,
1854
+ "rocking chair, rocker": 765,
1855
+ "rotisserie": 766,
1856
+ "rubber eraser, rubber, pencil eraser": 767,
1857
+ "ruddy turnstone, Arenaria interpres": 139,
1858
+ "ruffed grouse, partridge, Bonasa umbellus": 82,
1859
+ "rugby ball": 768,
1860
+ "rule, ruler": 769,
1861
+ "running shoe": 770,
1862
+ "safe": 771,
1863
+ "safety pin": 772,
1864
+ "saltshaker, salt shaker": 773,
1865
+ "sandal": 774,
1866
+ "sandbar, sand bar": 977,
1867
+ "sarong": 775,
1868
+ "sax, saxophone": 776,
1869
+ "scabbard": 777,
1870
+ "scale, weighing machine": 778,
1871
+ "schipperke": 223,
1872
+ "school bus": 779,
1873
+ "schooner": 780,
1874
+ "scoreboard": 781,
1875
+ "scorpion": 71,
1876
+ "screen, CRT screen": 782,
1877
+ "screw": 783,
1878
+ "screwdriver": 784,
1879
+ "scuba diver": 983,
1880
+ "sea anemone, anemone": 108,
1881
+ "sea cucumber, holothurian": 329,
1882
+ "sea lion": 150,
1883
+ "sea slug, nudibranch": 115,
1884
+ "sea snake": 65,
1885
+ "sea urchin": 328,
1886
+ "seashore, coast, seacoast, sea-coast": 978,
1887
+ "seat belt, seatbelt": 785,
1888
+ "sewing machine": 786,
1889
+ "shield, buckler": 787,
1890
+ "shoe shop, shoe-shop, shoe store": 788,
1891
+ "shoji": 789,
1892
+ "shopping basket": 790,
1893
+ "shopping cart": 791,
1894
+ "shovel": 792,
1895
+ "shower cap": 793,
1896
+ "shower curtain": 794,
1897
+ "siamang, Hylobates syndactylus, Symphalangus syndactylus": 369,
1898
+ "sidewinder, horned rattlesnake, Crotalus cerastes": 68,
1899
+ "silky terrier, Sydney silky": 201,
1900
+ "ski": 795,
1901
+ "ski mask": 796,
1902
+ "skunk, polecat, wood pussy": 361,
1903
+ "sleeping bag": 797,
1904
+ "slide rule, slipstick": 798,
1905
+ "sliding door": 799,
1906
+ "slot, one-armed bandit": 800,
1907
+ "sloth bear, Melursus ursinus, Ursus ursinus": 297,
1908
+ "slug": 114,
1909
+ "snail": 113,
1910
+ "snorkel": 801,
1911
+ "snow leopard, ounce, Panthera uncia": 289,
1912
+ "snowmobile": 802,
1913
+ "snowplow, snowplough": 803,
1914
+ "soap dispenser": 804,
1915
+ "soccer ball": 805,
1916
+ "sock": 806,
1917
+ "soft-coated wheaten terrier": 202,
1918
+ "solar dish, solar collector, solar furnace": 807,
1919
+ "sombrero": 808,
1920
+ "sorrel": 339,
1921
+ "soup bowl": 809,
1922
+ "space bar": 810,
1923
+ "space heater": 811,
1924
+ "space shuttle": 812,
1925
+ "spaghetti squash": 940,
1926
+ "spatula": 813,
1927
+ "speedboat": 814,
1928
+ "spider monkey, Ateles geoffroyi": 381,
1929
+ "spider web, spider's web": 815,
1930
+ "spindle": 816,
1931
+ "spiny lobster, langouste, rock lobster, crawfish, crayfish, sea crawfish": 123,
1932
+ "spoonbill": 129,
1933
+ "sports car, sport car": 817,
1934
+ "spotlight, spot": 818,
1935
+ "spotted salamander, Ambystoma maculatum": 28,
1936
+ "squirrel monkey, Saimiri sciureus": 382,
1937
+ "stage": 819,
1938
+ "standard poodle": 267,
1939
+ "standard schnauzer": 198,
1940
+ "starfish, sea star": 327,
1941
+ "steam locomotive": 820,
1942
+ "steel arch bridge": 821,
1943
+ "steel drum": 822,
1944
+ "stethoscope": 823,
1945
+ "stingray": 6,
1946
+ "stinkhorn, carrion fungus": 994,
1947
+ "stole": 824,
1948
+ "stone wall": 825,
1949
+ "stopwatch, stop watch": 826,
1950
+ "stove": 827,
1951
+ "strainer": 828,
1952
+ "strawberry": 949,
1953
+ "street sign": 919,
1954
+ "streetcar, tram, tramcar, trolley, trolley car": 829,
1955
+ "stretcher": 830,
1956
+ "studio couch, day bed": 831,
1957
+ "stupa, tope": 832,
1958
+ "sturgeon": 394,
1959
+ "submarine, pigboat, sub, U-boat": 833,
1960
+ "suit, suit of clothes": 834,
1961
+ "sulphur butterfly, sulfur butterfly": 325,
1962
+ "sulphur-crested cockatoo, Kakatoe galerita, Cacatua galerita": 89,
1963
+ "sundial": 835,
1964
+ "sunglass": 836,
1965
+ "sunglasses, dark glasses, shades": 837,
1966
+ "sunscreen, sunblock, sun blocker": 838,
1967
+ "suspension bridge": 839,
1968
+ "swab, swob, mop": 840,
1969
+ "sweatshirt": 841,
1970
+ "swimming trunks, bathing trunks": 842,
1971
+ "swing": 843,
1972
+ "switch, electric switch, electrical switch": 844,
1973
+ "syringe": 845,
1974
+ "tabby, tabby cat": 281,
1975
+ "table lamp": 846,
1976
+ "tailed frog, bell toad, ribbed toad, tailed toad, Ascaphus trui": 32,
1977
+ "tank, army tank, armored combat vehicle, armoured combat vehicle": 847,
1978
+ "tape player": 848,
1979
+ "tarantula": 76,
1980
+ "teapot": 849,
1981
+ "teddy, teddy bear": 850,
1982
+ "television, television system": 851,
1983
+ "tench, Tinca tinca": 0,
1984
+ "tennis ball": 852,
1985
+ "terrapin": 36,
1986
+ "thatch, thatched roof": 853,
1987
+ "theater curtain, theatre curtain": 854,
1988
+ "thimble": 855,
1989
+ "three-toed sloth, ai, Bradypus tridactylus": 364,
1990
+ "thresher, thrasher, threshing machine": 856,
1991
+ "throne": 857,
1992
+ "thunder snake, worm snake, Carphophis amoenus": 52,
1993
+ "tick": 78,
1994
+ "tiger beetle": 300,
1995
+ "tiger cat": 282,
1996
+ "tiger shark, Galeocerdo cuvieri": 3,
1997
+ "tiger, Panthera tigris": 292,
1998
+ "tile roof": 858,
1999
+ "timber wolf, grey wolf, gray wolf, Canis lupus": 269,
2000
+ "titi, titi monkey": 380,
2001
+ "toaster": 859,
2002
+ "tobacco shop, tobacconist shop, tobacconist": 860,
2003
+ "toilet seat": 861,
2004
+ "toilet tissue, toilet paper, bathroom tissue": 999,
2005
+ "torch": 862,
2006
+ "totem pole": 863,
2007
+ "toucan": 96,
2008
+ "tow truck, tow car, wrecker": 864,
2009
+ "toy poodle": 265,
2010
+ "toy terrier": 158,
2011
+ "toyshop": 865,
2012
+ "tractor": 866,
2013
+ "traffic light, traffic signal, stoplight": 920,
2014
+ "trailer truck, tractor trailer, trucking rig, rig, articulated lorry, semi": 867,
2015
+ "tray": 868,
2016
+ "tree frog, tree-frog": 31,
2017
+ "trench coat": 869,
2018
+ "triceratops": 51,
2019
+ "tricycle, trike, velocipede": 870,
2020
+ "trifle": 927,
2021
+ "trilobite": 69,
2022
+ "trimaran": 871,
2023
+ "tripod": 872,
2024
+ "triumphal arch": 873,
2025
+ "trolleybus, trolley coach, trackless trolley": 874,
2026
+ "trombone": 875,
2027
+ "tub, vat": 876,
2028
+ "turnstile": 877,
2029
+ "tusker": 101,
2030
+ "typewriter keyboard": 878,
2031
+ "umbrella": 879,
2032
+ "unicycle, monocycle": 880,
2033
+ "upright, upright piano": 881,
2034
+ "vacuum, vacuum cleaner": 882,
2035
+ "valley, vale": 979,
2036
+ "vase": 883,
2037
+ "vault": 884,
2038
+ "velvet": 885,
2039
+ "vending machine": 886,
2040
+ "vestment": 887,
2041
+ "viaduct": 888,
2042
+ "vine snake": 59,
2043
+ "violin, fiddle": 889,
2044
+ "vizsla, Hungarian pointer": 211,
2045
+ "volcano": 980,
2046
+ "volleyball": 890,
2047
+ "vulture": 23,
2048
+ "waffle iron": 891,
2049
+ "walking stick, walkingstick, stick insect": 313,
2050
+ "wall clock": 892,
2051
+ "wallaby, brush kangaroo": 104,
2052
+ "wallet, billfold, notecase, pocketbook": 893,
2053
+ "wardrobe, closet, press": 894,
2054
+ "warplane, military plane": 895,
2055
+ "warthog": 343,
2056
+ "washbasin, handbasin, washbowl, lavabo, wash-hand basin": 896,
2057
+ "washer, automatic washer, washing machine": 897,
2058
+ "water bottle": 898,
2059
+ "water buffalo, water ox, Asiatic buffalo, Bubalus bubalis": 346,
2060
+ "water jug": 899,
2061
+ "water ouzel, dipper": 20,
2062
+ "water snake": 58,
2063
+ "water tower": 900,
2064
+ "weasel": 356,
2065
+ "web site, website, internet site, site": 916,
2066
+ "weevil": 307,
2067
+ "whippet": 172,
2068
+ "whiptail, whiptail lizard": 41,
2069
+ "whiskey jug": 901,
2070
+ "whistle": 902,
2071
+ "white stork, Ciconia ciconia": 127,
2072
+ "white wolf, Arctic wolf, Canis lupus tundrarum": 270,
2073
+ "wig": 903,
2074
+ "wild boar, boar, Sus scrofa": 342,
2075
+ "window screen": 904,
2076
+ "window shade": 905,
2077
+ "wine bottle": 907,
2078
+ "wing": 908,
2079
+ "wire-haired fox terrier": 188,
2080
+ "wok": 909,
2081
+ "wolf spider, hunting spider": 77,
2082
+ "wombat": 106,
2083
+ "wood rabbit, cottontail, cottontail rabbit": 330,
2084
+ "wooden spoon": 910,
2085
+ "wool, woolen, woollen": 911,
2086
+ "worm fence, snake fence, snake-rail fence, Virginia fence": 912,
2087
+ "wreck": 913,
2088
+ "yawl": 914,
2089
+ "yellow lady's slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium parviflorum": 986,
2090
+ "yurt": 915,
2091
+ "zebra": 340,
2092
+ "zucchini, courgette": 939
2093
+ },
2094
+ "layer_norm_eps": 1e-05,
2095
+ "mlp_ratio": 2.0,
2096
+ "model_name_or_path": "mobilevit_small",
2097
+ "model_name_or_path2": "",
2098
+ "model_type": "mobilevit",
2099
+ "neck_hidden_sizes": [
2100
+ 16,
2101
+ 32,
2102
+ 64,
2103
+ 96,
2104
+ 128,
2105
+ 160,
2106
+ 640
2107
+ ],
2108
+ "num_attention_heads": 4,
2109
+ "num_channels": 3,
2110
+ "output_stride": 32,
2111
+ "patch_size": 2,
2112
+ "qkv_bias": true,
2113
+ "semantic_loss_ignore_index": 255,
2114
+ "torch_dtype": "float32"
2115
+ },
2116
+ "vision_feature_layer": -2,
2117
+ "vision_feature_select_strategy": "patch",
2118
+ "vision_hidden_size": null,
2119
+ "vision_model_name_or_path": "",
2120
+ "vision_model_name_or_path2": "",
2121
+ "vocab_size": 151685,
2122
+ "architectures": [
2123
+ "BioPANOmniForConditionalGeneration"
2124
+ ],
2125
+ "auto_map": {
2126
+ "AutoConfig": "modeling_biopan_omni.BioPANOmniConfig",
2127
+ "AutoModelForCausalLM": "modeling_biopan_omni.BioPANOmniForConditionalGeneration"
2128
+ }
2129
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "eos_token_id": 151645,
4
+ "max_new_tokens": 512,
5
+ "do_sample": false,
6
+ "pad_token_id": 151643
7
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb814b1a4d22b0ad10d5f923e1f1995d3d5316db6cd58f2fc880e6234209f0f8
3
+ size 3658396544
modeling_biopan_omni.py ADDED
@@ -0,0 +1,908 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ BioPAN Omni Standalone Model for HuggingFace
3
+ =============================================
4
+
5
+ A model-agnostic multimodal LLM that supports multiple backends:
6
+ - LLM: Llama, Qwen2, Qwen3, Phi
7
+ - Vision: CLIP, SigLIP, DINOv2, MobileViT
8
+ - Connector: Identity, Linear, MLP, Resampler
9
+
10
+ Usage:
11
+ from transformers import AutoModelForCausalLM, AutoTokenizer
12
+
13
+ model = AutoModelForCausalLM.from_pretrained("your-repo", trust_remote_code=True)
14
+ tokenizer = AutoTokenizer.from_pretrained("your-repo")
15
+
16
+ # Multimodal
17
+ output = model.chat(
18
+ prompt="<image>\nDescribe this image.",
19
+ image="path/to/image.jpg",
20
+ tokenizer=tokenizer
21
+ )
22
+
23
+ # Text-only
24
+ output = model.chat(
25
+ prompt="What is the capital of France?",
26
+ tokenizer=tokenizer
27
+ )
28
+ """
29
+
30
+ import re
31
+ import requests
32
+ from PIL import Image
33
+ from io import BytesIO
34
+ from dataclasses import dataclass
35
+ from typing import List, Tuple, Optional, Union
36
+
37
+ import torch
38
+ import torch.nn as nn
39
+
40
+ from transformers import (
41
+ PreTrainedModel,
42
+ PretrainedConfig,
43
+ AutoConfig,
44
+ AutoModelForCausalLM,
45
+ GenerationMixin,
46
+ StoppingCriteria,
47
+ # LLM backends
48
+ LlamaForCausalLM,
49
+ Qwen2ForCausalLM,
50
+ Qwen3ForCausalLM,
51
+ PhiForCausalLM,
52
+ # Vision backends
53
+ CLIPVisionModel,
54
+ CLIPImageProcessor,
55
+ SiglipVisionModel,
56
+ SiglipImageProcessor,
57
+ Dinov2Model,
58
+ MobileViTModel,
59
+ AutoImageProcessor,
60
+ )
61
+ from transformers.modeling_outputs import CausalLMOutputWithPast
62
+ from transformers.generation.utils import GenerateOutput
63
+
64
+ # =============================================================================
65
+ # CONSTANTS
66
+ # =============================================================================
67
+
68
+ IGNORE_INDEX = -100
69
+ IMAGE_TOKEN_INDEX = -200
70
+ DEFAULT_IMAGE_TOKEN = "<image>"
71
+
72
+ # =============================================================================
73
+ # BACKEND MAPPINGS
74
+ # =============================================================================
75
+
76
+ LLM_MAPPING = {
77
+ "llama": LlamaForCausalLM,
78
+ "qwen2": Qwen2ForCausalLM,
79
+ "qwen3": Qwen3ForCausalLM, # Qwen3 uses Qwen2 architecture
80
+ "phi": PhiForCausalLM,
81
+ }
82
+
83
+ VISION_TOWER_MAPPING = {
84
+ "clip": (CLIPVisionModel, CLIPImageProcessor),
85
+ "siglip": (SiglipVisionModel, SiglipImageProcessor),
86
+ "dinov2": (Dinov2Model, AutoImageProcessor),
87
+ "mobilevit": (MobileViTModel, AutoImageProcessor),
88
+ }
89
+
90
+ # =============================================================================
91
+ # TEMPLATE CLASSES
92
+ # =============================================================================
93
+
94
+ @dataclass
95
+ class LlamaTemplate:
96
+ """Template for Llama/Vicuna models"""
97
+ system: str = "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. "
98
+ user_format: str = "USER: {content} "
99
+ assistant_format: str = "ASSISTANT: {content}</s>"
100
+ image_format: str = "<image>\n{content}"
101
+ stop_str: str = "</s>"
102
+
103
+ def format_chat(self, prompt: str, has_image: bool = False) -> str:
104
+ if has_image:
105
+ clean_prompt = prompt.replace(DEFAULT_IMAGE_TOKEN, '').strip()
106
+ formatted = self.image_format.format(content=clean_prompt)
107
+ else:
108
+ formatted = prompt
109
+ return self.system + self.user_format.format(content=formatted) + "ASSISTANT:"
110
+
111
+
112
+ @dataclass
113
+ class Qwen2Template:
114
+ """Template for Qwen2 base models"""
115
+ system: str = "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. "
116
+ user_format: str = "USER: {content} "
117
+ assistant_format: str = "ASSISTANT: {content}<|endoftext|>"
118
+ image_format: str = "<image>\n{content}"
119
+ stop_str: str = "<|endoftext|>"
120
+
121
+ def format_chat(self, prompt: str, has_image: bool = False) -> str:
122
+ if has_image:
123
+ clean_prompt = prompt.replace(DEFAULT_IMAGE_TOKEN, '').strip()
124
+ formatted = self.image_format.format(content=clean_prompt)
125
+ else:
126
+ formatted = prompt
127
+ return self.system + self.user_format.format(content=formatted) + "ASSISTANT:"
128
+
129
+
130
+ @dataclass
131
+ class Qwen3Template:
132
+ """Template for Qwen3 base models"""
133
+ system: str = "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. "
134
+ user_format: str = "USER: {content} "
135
+ assistant_format: str = "ASSISTANT: {content}<|im_end|>"
136
+ image_format: str = "<image>\n{content}"
137
+ stop_str: str = "<|im_end|>"
138
+
139
+ def format_chat(self, prompt: str, has_image: bool = False) -> str:
140
+ if has_image:
141
+ clean_prompt = prompt.replace(DEFAULT_IMAGE_TOKEN, '').strip()
142
+ formatted = self.image_format.format(content=clean_prompt)
143
+ else:
144
+ formatted = prompt
145
+ return self.system + self.user_format.format(content=formatted) + "ASSISTANT:"
146
+
147
+
148
+ @dataclass
149
+ class PhiTemplate:
150
+ """Template for Phi models"""
151
+ system: str = "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. "
152
+ user_format: str = "USER: {content} "
153
+ assistant_format: str = "ASSISTANT: {content}<|endoftext|>"
154
+ image_format: str = "<image>\n{content}"
155
+ stop_str: str = "<|endoftext|>"
156
+
157
+ def format_chat(self, prompt: str, has_image: bool = False) -> str:
158
+ if has_image:
159
+ clean_prompt = prompt.replace(DEFAULT_IMAGE_TOKEN, '').strip()
160
+ formatted = self.image_format.format(content=clean_prompt)
161
+ else:
162
+ formatted = prompt
163
+ return self.system + self.user_format.format(content=formatted) + "ASSISTANT:"
164
+
165
+
166
+ TEMPLATE_MAPPING = {
167
+ "llama": LlamaTemplate,
168
+ "qwen2": Qwen2Template,
169
+ "qwen3": Qwen3Template,
170
+ "phi": PhiTemplate,
171
+ }
172
+
173
+ # =============================================================================
174
+ # HELPER FUNCTIONS
175
+ # =============================================================================
176
+
177
+ def load_image(image_file: str) -> Image.Image:
178
+ """Load image from URL or file path"""
179
+ if image_file.startswith("http") or image_file.startswith("https"):
180
+ response = requests.get(image_file, timeout=30)
181
+ image = Image.open(BytesIO(response.content)).convert("RGB")
182
+ else:
183
+ image = Image.open(image_file).convert("RGB")
184
+ return image
185
+
186
+
187
+ def expand2square(pil_img: Image.Image, background_color: tuple) -> Image.Image:
188
+ """Expand image to square with padding"""
189
+ width, height = pil_img.size
190
+ if width == height:
191
+ return pil_img
192
+ elif width > height:
193
+ result = Image.new(pil_img.mode, (width, width), background_color)
194
+ result.paste(pil_img, (0, (width - height) // 2))
195
+ return result
196
+ else:
197
+ result = Image.new(pil_img.mode, (height, height), background_color)
198
+ result.paste(pil_img, ((height - width) // 2, 0))
199
+ return result
200
+
201
+
202
+ def process_images(images: List[Image.Image], image_processor, model_cfg) -> torch.Tensor:
203
+ """Process images for the vision tower"""
204
+ image_aspect_ratio = getattr(model_cfg, "image_aspect_ratio", None)
205
+ new_images = []
206
+ if image_aspect_ratio == 'pad':
207
+ for image in images:
208
+ image = expand2square(image, tuple(int(x*255) for x in image_processor.image_mean))
209
+ image = image_processor.preprocess(image, return_tensors='pt')['pixel_values'][0]
210
+ new_images.append(image)
211
+ else:
212
+ return image_processor(images, return_tensors='pt')['pixel_values']
213
+ if all(x.shape == new_images[0].shape for x in new_images):
214
+ new_images = torch.stack(new_images, dim=0)
215
+ return new_images
216
+
217
+
218
+ def tokenizer_image_token(
219
+ prompt: str,
220
+ tokenizer,
221
+ image_token_index: int = IMAGE_TOKEN_INDEX,
222
+ return_tensors: str = None
223
+ ):
224
+ """Tokenize prompt with image token placeholders"""
225
+ def _insert_separator(X, sep):
226
+ return [ele for sublist in zip(X, [sep]*len(X)) for ele in sublist][:-1]
227
+
228
+ prompt_chunks = [tokenizer(chunk).input_ids for chunk in prompt.split('<image>')]
229
+
230
+ input_ids = []
231
+ offset = 0
232
+ if len(prompt_chunks) > 0 and len(prompt_chunks[0]) > 0 and prompt_chunks[0][0] == tokenizer.bos_token_id:
233
+ offset = 1
234
+ input_ids.append(prompt_chunks[0][0])
235
+
236
+ for x in _insert_separator(prompt_chunks, [image_token_index] * (offset + 1)):
237
+ input_ids.extend(x[offset:])
238
+
239
+ if return_tensors is not None:
240
+ if return_tensors == 'pt':
241
+ return torch.tensor(input_ids, dtype=torch.long)
242
+ raise ValueError(f'Unsupported tensor type: {return_tensors}')
243
+ return input_ids
244
+
245
+
246
+ class KeywordsStoppingCriteria(StoppingCriteria):
247
+ """Stop generation when specific keywords are generated"""
248
+ def __init__(self, keywords, tokenizer, input_ids):
249
+ self.keywords = keywords
250
+ self.keyword_ids = []
251
+ self.max_keyword_len = 0
252
+ for keyword in keywords:
253
+ cur_keyword_ids = tokenizer(keyword).input_ids
254
+ if len(cur_keyword_ids) > 1 and cur_keyword_ids[0] == tokenizer.bos_token_id:
255
+ cur_keyword_ids = cur_keyword_ids[1:]
256
+ if len(cur_keyword_ids) > self.max_keyword_len:
257
+ self.max_keyword_len = len(cur_keyword_ids)
258
+ self.keyword_ids.append(torch.tensor(cur_keyword_ids))
259
+ self.tokenizer = tokenizer
260
+ self.start_len = input_ids.shape[1]
261
+
262
+ def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
263
+ offset = min(input_ids.shape[1] - self.start_len, self.max_keyword_len)
264
+ self.keyword_ids = [keyword_id.to(input_ids.device) for keyword_id in self.keyword_ids]
265
+ for keyword_id in self.keyword_ids:
266
+ if (input_ids[0, -keyword_id.shape[0]:] == keyword_id).all():
267
+ return True
268
+ return False
269
+
270
+ # =============================================================================
271
+ # VISION TOWER
272
+ # =============================================================================
273
+
274
+ class VisionTower(nn.Module):
275
+ """Vision encoder that supports multiple backends"""
276
+ def __init__(self, config):
277
+ super().__init__()
278
+ vision_name = config.vision_model_name_or_path.lower()
279
+
280
+ # Detect vision backend
281
+ self.backend = None
282
+ for key in VISION_TOWER_MAPPING:
283
+ if key in vision_name:
284
+ self.backend = key
285
+ break
286
+
287
+ if self.backend is None:
288
+ raise ValueError(f"Unsupported vision tower: {vision_name}")
289
+
290
+ model_class, processor_class = VISION_TOWER_MAPPING[self.backend]
291
+ self._vision_tower = model_class(config.vision_config)
292
+ self._image_processor = processor_class.from_pretrained(config.vision_config.model_name_or_path)
293
+ self.config = config
294
+
295
+ def forward(self, x: torch.Tensor, **kwargs) -> torch.Tensor:
296
+ image_features = self._vision_tower(x, output_hidden_states=True)
297
+ image_features = image_features.hidden_states[kwargs.get('vision_feature_layer', -2)]
298
+
299
+ if kwargs.get('vision_feature_select_strategy', 'patch') == 'patch':
300
+ image_features = image_features[:, 1:]
301
+ elif kwargs.get('vision_feature_select_strategy', 'patch') == 'cls_patch':
302
+ image_features = image_features
303
+ else:
304
+ raise ValueError(f"Unexpected select feature: {kwargs.get('vision_feature_select_strategy')}")
305
+
306
+ return image_features
307
+
308
+ # =============================================================================
309
+ # CONNECTORS
310
+ # =============================================================================
311
+
312
+ class IdentityConnector(nn.Module):
313
+ """Identity connector (pass-through)"""
314
+ def __init__(self, config):
315
+ super().__init__()
316
+ self._connector = nn.Identity()
317
+
318
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
319
+ return self._connector(x)
320
+
321
+
322
+ class LinearConnector(nn.Module):
323
+ """Linear projection connector"""
324
+ def __init__(self, config):
325
+ super().__init__()
326
+ self._connector = nn.Linear(config.vision_hidden_size, config.hidden_size)
327
+
328
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
329
+ return self._connector(x)
330
+
331
+
332
+ class MLPConnector(nn.Module):
333
+ """MLP connector with configurable depth"""
334
+ def __init__(self, config):
335
+ super().__init__()
336
+ mlp_gelu_match = re.match(r'^mlp(\d+)x_gelu$', config.connector_type)
337
+ mlp_depth = int(mlp_gelu_match.group(1))
338
+
339
+ modules = [nn.Linear(config.vision_hidden_size, config.hidden_size)]
340
+ for _ in range(1, mlp_depth):
341
+ modules.append(nn.GELU())
342
+ modules.append(nn.Linear(config.hidden_size, config.hidden_size))
343
+
344
+ self._connector = nn.Sequential(*modules)
345
+
346
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
347
+ return self._connector(x)
348
+
349
+
350
+ class ResamplerConnector(nn.Module):
351
+ """Perceiver resampler connector"""
352
+ def __init__(self, config):
353
+ super().__init__()
354
+ dim = config.hidden_size
355
+ depth = config.num_resampler_layers
356
+ num_latents = config.num_queries
357
+
358
+ self.latents = nn.Parameter(torch.randn(num_latents, dim))
359
+ self.linear = nn.Linear(config.vision_hidden_size, config.hidden_size)
360
+
361
+ self.layers = nn.ModuleList([])
362
+ for _ in range(depth):
363
+ self.layers.append(nn.ModuleList([
364
+ nn.MultiheadAttention(dim, num_heads=8, batch_first=True),
365
+ nn.Sequential(
366
+ nn.LayerNorm(dim),
367
+ nn.Linear(dim, dim * 4),
368
+ nn.GELU(),
369
+ nn.Linear(dim * 4, dim)
370
+ )
371
+ ]))
372
+ self.norm = nn.LayerNorm(dim)
373
+
374
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
375
+ b = x.shape[0]
376
+ x = self.linear(x)
377
+ latents = self.latents.unsqueeze(0).expand(b, -1, -1)
378
+
379
+ for attn, ff in self.layers:
380
+ latents = latents + attn(latents, x, x)[0]
381
+ latents = latents + ff(latents)
382
+
383
+ return self.norm(latents)
384
+
385
+
386
+ def build_connector(config):
387
+ """Factory function to build connector based on config"""
388
+ connector_type = config.connector_type.lower()
389
+
390
+ if connector_type == 'identity':
391
+ return IdentityConnector(config)
392
+ elif connector_type == 'linear':
393
+ return LinearConnector(config)
394
+ elif 'mlp' in connector_type and 'gelu' in connector_type:
395
+ return MLPConnector(config)
396
+ elif connector_type == 'resampler':
397
+ return ResamplerConnector(config)
398
+ else:
399
+ raise ValueError(f"Unsupported connector type: {connector_type}")
400
+
401
+ # =============================================================================
402
+ # CONFIGURATION
403
+ # =============================================================================
404
+
405
+ class BioPANOmniConfig(PretrainedConfig):
406
+ model_type = "biopan_omni"
407
+
408
+ def __init__(
409
+ self,
410
+ llm_model_name_or_path: str = '',
411
+ tokenizer_name_or_path: str = None,
412
+ vision_model_name_or_path: str = '',
413
+ connector_type: str = 'identity',
414
+ text_config: dict = None,
415
+ hidden_size: int = 2048,
416
+ vocab_size: int = 32000,
417
+ pad_token: str = None,
418
+ pad_token_id: int = None,
419
+ tokenizer_padding_side: str = 'right',
420
+ tokenizer_model_max_length: int = 2048,
421
+ vision_config: dict = None,
422
+ vision_hidden_size: int = None,
423
+ vision_feature_layer: int = -2,
424
+ vision_feature_select_strategy: str = 'patch',
425
+ image_aspect_ratio: str = 'square',
426
+ resampler_hidden_size: int = None,
427
+ num_queries: int = None,
428
+ num_resampler_layers: int = None,
429
+ use_cache: bool = False,
430
+ **kwargs
431
+ ):
432
+ self.llm_model_name_or_path = llm_model_name_or_path
433
+ self.tokenizer_name_or_path = tokenizer_name_or_path or llm_model_name_or_path
434
+ self.vision_model_name_or_path = vision_model_name_or_path
435
+ self.connector_type = connector_type
436
+
437
+ self.hidden_size = hidden_size
438
+ self.vocab_size = vocab_size
439
+ self.pad_token = pad_token
440
+ self.pad_token_id = pad_token_id
441
+ self.tokenizer_padding_side = tokenizer_padding_side
442
+ self.tokenizer_model_max_length = tokenizer_model_max_length
443
+
444
+ self.vision_feature_layer = vision_feature_layer
445
+ self.vision_feature_select_strategy = vision_feature_select_strategy
446
+ self.image_aspect_ratio = image_aspect_ratio
447
+ self.resampler_hidden_size = resampler_hidden_size
448
+ self.num_queries = num_queries
449
+ self.num_resampler_layers = num_resampler_layers
450
+ self.use_cache = use_cache
451
+
452
+ # Load nested configs
453
+ if text_config is not None:
454
+ self.text_config = AutoConfig.for_model(**text_config)
455
+ else:
456
+ self.text_config = None
457
+
458
+ if vision_config is not None:
459
+ self.vision_config = AutoConfig.for_model(**vision_config)
460
+ else:
461
+ self.vision_config = None
462
+
463
+ if self.text_config is not None:
464
+ self.hidden_size = getattr(self.text_config, 'hidden_size', hidden_size)
465
+ self.vocab_size = getattr(self.text_config, 'vocab_size', vocab_size)
466
+
467
+ if self.vision_config is not None:
468
+ self.vision_hidden_size = getattr(self.vision_config, 'hidden_size', vision_hidden_size)
469
+ else:
470
+ self.vision_hidden_size = vision_hidden_size
471
+
472
+ super().__init__(**kwargs)
473
+
474
+ # =============================================================================
475
+ # MAIN MODEL
476
+ # =============================================================================
477
+
478
+ class BioPANOmniPreTrainedModel(PreTrainedModel):
479
+ config_class = BioPANOmniConfig
480
+ base_model_prefix = "model"
481
+ supports_gradient_checkpointing = True
482
+ _no_split_modules = ["BioPANOmniVisionAttention"]
483
+ _skip_keys_device_placement = "past_key_values"
484
+ _supports_flash_attn_2 = True
485
+
486
+ def _init_weights(self, module):
487
+ std = getattr(self.config, "initializer_range", 0.02)
488
+ if isinstance(module, (nn.Linear, nn.Conv2d)):
489
+ module.weight.data.normal_(mean=0.0, std=std)
490
+ if module.bias is not None:
491
+ module.bias.data.zero_()
492
+ elif isinstance(module, nn.Embedding):
493
+ module.weight.data.normal_(mean=0.0, std=std)
494
+
495
+
496
+ class BioPANOmniForConditionalGeneration(BioPANOmniPreTrainedModel, GenerationMixin):
497
+ def __init__(self, config: BioPANOmniConfig):
498
+ super().__init__(config)
499
+
500
+ # Detect LLM backend from text_config
501
+ llm_type = config.text_config.model_type.lower()
502
+ if llm_type not in LLM_MAPPING:
503
+ raise ValueError(f"Unsupported LLM type: {llm_type}. Supported: {list(LLM_MAPPING.keys())}")
504
+
505
+ llm_class = LLM_MAPPING[llm_type]
506
+ self.language_model = llm_class(config.text_config)
507
+
508
+ # Get template for this LLM type
509
+ template_class = TEMPLATE_MAPPING.get(llm_type, LlamaTemplate)
510
+ self.template = template_class()
511
+
512
+ # Vision tower and connector (optional for text-only)
513
+ if config.vision_model_name_or_path:
514
+ self.vision_tower = VisionTower(config)
515
+ self.connector = build_connector(config)
516
+ else:
517
+ self.vision_tower = None
518
+ self.connector = None
519
+
520
+ self.post_init()
521
+
522
+ def get_input_embeddings(self):
523
+ return self.language_model.get_input_embeddings()
524
+
525
+ def set_input_embeddings(self, value):
526
+ self.language_model.set_input_embeddings(value)
527
+
528
+ def get_output_embeddings(self):
529
+ return self.language_model.get_output_embeddings()
530
+
531
+ def set_output_embeddings(self, new_embeddings):
532
+ self.language_model.set_output_embeddings(new_embeddings)
533
+
534
+ def tie_weights(self):
535
+ return self.language_model.tie_weights()
536
+
537
+ def resize_token_embeddings(self, new_num_tokens: Optional[int] = None, pad_to_multiple_of=None) -> nn.Embedding:
538
+ model_embeds = self.language_model.resize_token_embeddings(new_num_tokens, pad_to_multiple_of)
539
+ self.config.text_config.vocab_size = model_embeds.num_embeddings
540
+ self.config.vocab_size = model_embeds.num_embeddings
541
+ return model_embeds
542
+
543
+ def encode_images(self, images: torch.Tensor) -> torch.Tensor:
544
+ """Encode images through vision tower and connector"""
545
+ kwargs = {
546
+ 'vision_feature_layer': self.config.vision_feature_layer,
547
+ 'vision_feature_select_strategy': self.config.vision_feature_select_strategy
548
+ }
549
+ images = images.to(device=self.device, dtype=self.dtype)
550
+ image_features = self.vision_tower(images, **kwargs)
551
+ image_features = self.connector(image_features)
552
+ return image_features
553
+
554
+ def prepare_inputs_labels_for_multimodal(
555
+ self, input_ids, position_ids, attention_mask, past_key_values, labels, images, image_sizes=None
556
+ ):
557
+ """Prepare inputs by inserting image features into the embedding sequence"""
558
+ vision_tower = self.vision_tower
559
+ if vision_tower is None or images is None or input_ids.shape[1] == 1:
560
+ return input_ids, position_ids, attention_mask, past_key_values, None, labels
561
+
562
+ image_features = self.encode_images(images)
563
+
564
+ # Handle dummy tensors
565
+ _labels = labels
566
+ _position_ids = position_ids
567
+ _attention_mask = attention_mask
568
+
569
+ if attention_mask is None:
570
+ attention_mask = torch.ones_like(input_ids, dtype=torch.bool)
571
+ else:
572
+ attention_mask = attention_mask.bool()
573
+ if position_ids is None:
574
+ position_ids = torch.arange(0, input_ids.shape[1], dtype=torch.long, device=input_ids.device)
575
+ if labels is None:
576
+ labels = torch.full_like(input_ids, IGNORE_INDEX)
577
+
578
+ # Remove padding
579
+ _input_ids = input_ids
580
+ input_ids = [cur_input_ids[cur_attention_mask] for cur_input_ids, cur_attention_mask in zip(input_ids, attention_mask)]
581
+ labels = [cur_labels[cur_attention_mask] for cur_labels, cur_attention_mask in zip(labels, attention_mask)]
582
+
583
+ new_input_embeds = []
584
+ new_labels = []
585
+ cur_image_idx = 0
586
+
587
+ for batch_idx, cur_input_ids in enumerate(input_ids):
588
+ num_images = (cur_input_ids == IMAGE_TOKEN_INDEX).sum()
589
+ if num_images == 0:
590
+ cur_image_features = image_features[cur_image_idx]
591
+ cur_input_embeds = self.language_model.get_input_embeddings()(cur_input_ids)
592
+ cur_input_embeds = torch.cat([cur_input_embeds, cur_image_features[0:0]], dim=0)
593
+ new_input_embeds.append(cur_input_embeds)
594
+ new_labels.append(labels[batch_idx])
595
+ cur_image_idx += 1
596
+ continue
597
+
598
+ image_token_indices = [-1] + torch.where(cur_input_ids == IMAGE_TOKEN_INDEX)[0].tolist() + [cur_input_ids.shape[0]]
599
+ cur_input_ids_noim = []
600
+ cur_labels = labels[batch_idx]
601
+ cur_labels_noim = []
602
+
603
+ for i in range(len(image_token_indices) - 1):
604
+ cur_input_ids_noim.append(cur_input_ids[image_token_indices[i]+1:image_token_indices[i+1]])
605
+ cur_labels_noim.append(cur_labels[image_token_indices[i]+1:image_token_indices[i+1]])
606
+
607
+ split_sizes = [x.shape[0] for x in cur_labels_noim]
608
+ cur_input_embeds = self.language_model.get_input_embeddings()(torch.cat(cur_input_ids_noim))
609
+ cur_input_embeds_no_im = torch.split(cur_input_embeds, split_sizes, dim=0)
610
+
611
+ cur_new_input_embeds = []
612
+ cur_new_labels = []
613
+
614
+ for i in range(num_images + 1):
615
+ cur_new_input_embeds.append(cur_input_embeds_no_im[i])
616
+ cur_new_labels.append(cur_labels_noim[i])
617
+ if i < num_images:
618
+ cur_image_features = image_features[cur_image_idx]
619
+ cur_image_idx += 1
620
+ cur_new_input_embeds.append(cur_image_features)
621
+ cur_new_labels.append(torch.full((cur_image_features.shape[0],), IGNORE_INDEX, device=cur_labels.device, dtype=cur_labels.dtype))
622
+
623
+ cur_new_input_embeds = [x.to(self.device) for x in cur_new_input_embeds]
624
+ cur_new_input_embeds = torch.cat(cur_new_input_embeds)
625
+ cur_new_labels = torch.cat(cur_new_labels)
626
+
627
+ new_input_embeds.append(cur_new_input_embeds)
628
+ new_labels.append(cur_new_labels)
629
+
630
+ # Truncate to max length
631
+ tokenizer_model_max_length = getattr(self.config, 'tokenizer_model_max_length', None)
632
+ if tokenizer_model_max_length is not None:
633
+ new_input_embeds = [x[:tokenizer_model_max_length] for x in new_input_embeds]
634
+ new_labels = [x[:tokenizer_model_max_length] for x in new_labels]
635
+
636
+ # Pad and stack
637
+ max_len = max(x.shape[0] for x in new_input_embeds)
638
+ batch_size = len(new_input_embeds)
639
+
640
+ new_input_embeds_padded = []
641
+ new_labels_padded = torch.full((batch_size, max_len), IGNORE_INDEX, dtype=new_labels[0].dtype, device=new_labels[0].device)
642
+ attention_mask = torch.zeros((batch_size, max_len), dtype=_attention_mask.dtype if _attention_mask is not None else torch.bool, device=new_labels[0].device)
643
+ position_ids = torch.zeros((batch_size, max_len), dtype=torch.long, device=new_labels[0].device)
644
+
645
+ for i, (cur_new_embed, cur_new_labels) in enumerate(zip(new_input_embeds, new_labels)):
646
+ cur_len = cur_new_embed.shape[0]
647
+ padding_side = getattr(self.config, 'tokenizer_padding_side', 'right')
648
+
649
+ if padding_side == "left":
650
+ new_input_embeds_padded.append(torch.cat((
651
+ torch.zeros((max_len - cur_len, cur_new_embed.shape[1]), dtype=cur_new_embed.dtype, device=cur_new_embed.device),
652
+ cur_new_embed
653
+ ), dim=0))
654
+ if cur_len > 0:
655
+ new_labels_padded[i, -cur_len:] = cur_new_labels
656
+ attention_mask[i, -cur_len:] = True
657
+ position_ids[i, -cur_len:] = torch.arange(0, cur_len, dtype=position_ids.dtype, device=position_ids.device)
658
+ else:
659
+ new_input_embeds_padded.append(torch.cat((
660
+ cur_new_embed,
661
+ torch.zeros((max_len - cur_len, cur_new_embed.shape[1]), dtype=cur_new_embed.dtype, device=cur_new_embed.device)
662
+ ), dim=0))
663
+ if cur_len > 0:
664
+ new_labels_padded[i, :cur_len] = cur_new_labels
665
+ attention_mask[i, :cur_len] = True
666
+ position_ids[i, :cur_len] = torch.arange(0, cur_len, dtype=position_ids.dtype, device=position_ids.device)
667
+
668
+ new_input_embeds = torch.stack(new_input_embeds_padded, dim=0)
669
+
670
+ if _labels is None:
671
+ new_labels = None
672
+ else:
673
+ new_labels = new_labels_padded
674
+
675
+ if _attention_mask is None:
676
+ attention_mask = None
677
+
678
+ if _position_ids is None:
679
+ position_ids = None
680
+
681
+ return None, position_ids, attention_mask, past_key_values, new_input_embeds, new_labels
682
+
683
+ def forward(
684
+ self,
685
+ input_ids: torch.LongTensor = None,
686
+ attention_mask: Optional[torch.Tensor] = None,
687
+ position_ids: Optional[torch.LongTensor] = None,
688
+ past_key_values: Optional[List[torch.FloatTensor]] = None,
689
+ inputs_embeds: Optional[torch.FloatTensor] = None,
690
+ labels: Optional[torch.LongTensor] = None,
691
+ use_cache: Optional[bool] = None,
692
+ output_attentions: Optional[bool] = None,
693
+ output_hidden_states: Optional[bool] = None,
694
+ images: Optional[torch.FloatTensor] = None,
695
+ image_sizes: Optional[List[List[int]]] = None,
696
+ return_dict: Optional[bool] = None,
697
+ ) -> Union[Tuple, CausalLMOutputWithPast]:
698
+
699
+ use_cache = use_cache if use_cache is not None else self.config.use_cache
700
+
701
+ if inputs_embeds is None:
702
+ (
703
+ input_ids,
704
+ position_ids,
705
+ attention_mask,
706
+ past_key_values,
707
+ inputs_embeds,
708
+ labels
709
+ ) = self.prepare_inputs_labels_for_multimodal(
710
+ input_ids,
711
+ position_ids,
712
+ attention_mask,
713
+ past_key_values,
714
+ labels,
715
+ images,
716
+ image_sizes
717
+ )
718
+
719
+ return self.language_model.forward(
720
+ input_ids=input_ids,
721
+ attention_mask=attention_mask,
722
+ position_ids=position_ids,
723
+ past_key_values=past_key_values,
724
+ inputs_embeds=inputs_embeds,
725
+ labels=labels,
726
+ use_cache=use_cache,
727
+ output_attentions=output_attentions,
728
+ output_hidden_states=output_hidden_states,
729
+ return_dict=return_dict
730
+ )
731
+
732
+ @torch.no_grad()
733
+ def generate(
734
+ self,
735
+ inputs: Optional[torch.Tensor] = None,
736
+ images: Optional[torch.Tensor] = None,
737
+ image_sizes: Optional[torch.Tensor] = None,
738
+ **kwargs,
739
+ ) -> Union[GenerateOutput, torch.LongTensor]:
740
+
741
+ position_ids = kwargs.pop("position_ids", None)
742
+ attention_mask = kwargs.pop("attention_mask", None)
743
+
744
+ if "inputs_embeds" in kwargs:
745
+ raise NotImplementedError("`inputs_embeds` is not supported")
746
+
747
+ if images is not None:
748
+ (
749
+ inputs,
750
+ position_ids,
751
+ attention_mask,
752
+ _,
753
+ inputs_embeds,
754
+ _
755
+ ) = self.prepare_inputs_labels_for_multimodal(
756
+ inputs,
757
+ position_ids,
758
+ attention_mask,
759
+ None,
760
+ None,
761
+ images,
762
+ image_sizes=image_sizes
763
+ )
764
+ else:
765
+ inputs_embeds = self.language_model.get_input_embeddings()(inputs)
766
+
767
+ return self.language_model.generate(
768
+ position_ids=position_ids,
769
+ attention_mask=attention_mask,
770
+ inputs_embeds=inputs_embeds,
771
+ **kwargs
772
+ )
773
+
774
+ def prepare_inputs_for_generation(self, input_ids, past_key_values=None, inputs_embeds=None, **kwargs):
775
+ images = kwargs.pop("images", None)
776
+ image_sizes = kwargs.pop("image_sizes", None)
777
+ inputs = self.language_model.prepare_inputs_for_generation(
778
+ input_ids, past_key_values=past_key_values, inputs_embeds=inputs_embeds, **kwargs
779
+ )
780
+ if images is not None:
781
+ inputs['images'] = images
782
+ if image_sizes is not None:
783
+ inputs['image_sizes'] = image_sizes
784
+ return inputs
785
+
786
+ def chat(
787
+ self,
788
+ prompt: str,
789
+ tokenizer,
790
+ image: str = None,
791
+ max_new_tokens: int = 512,
792
+ num_beams: int = 1,
793
+ top_p: float = None,
794
+ temperature: float = 0,
795
+ ) -> str:
796
+ """
797
+ Chat interface for both text-only and multimodal inference.
798
+
799
+ Args:
800
+ prompt: User prompt. Include <image> token for multimodal.
801
+ tokenizer: Tokenizer for the model.
802
+ image: Path or URL to image (required if <image> in prompt).
803
+ max_new_tokens: Maximum tokens to generate.
804
+ num_beams: Beam search width.
805
+ top_p: Nucleus sampling parameter.
806
+ temperature: Sampling temperature.
807
+
808
+ Returns:
809
+ Generated text response.
810
+ """
811
+ # Detect if multimodal based on <image> token
812
+ has_image = DEFAULT_IMAGE_TOKEN in prompt
813
+
814
+ if has_image:
815
+ if image is None:
816
+ raise ValueError("Prompt contains <image> token but no image provided")
817
+ if self.vision_tower is None:
818
+ raise ValueError("Model has no vision tower but prompt contains <image> token")
819
+
820
+ # Format prompt using template
821
+ formatted_prompt = self.template.format_chat(prompt, has_image)
822
+
823
+ # Process image if needed
824
+ image_tensor = None
825
+ if has_image:
826
+ pil_image = load_image(image)
827
+ image_tensor = process_images([pil_image], self.vision_tower._image_processor, self.config)
828
+ if isinstance(image_tensor, list):
829
+ image_tensor = torch.stack(image_tensor).to(self.device)
830
+ else:
831
+ image_tensor = image_tensor.to(self.device)
832
+
833
+ # Tokenize
834
+ input_ids = tokenizer_image_token(formatted_prompt, tokenizer, IMAGE_TOKEN_INDEX, return_tensors="pt")
835
+ if input_ids.dim() == 1:
836
+ input_ids = input_ids.unsqueeze(0)
837
+ input_ids = input_ids.to(self.device)
838
+ input_len = input_ids.shape[1]
839
+
840
+ # Build list of stop token ids (model-agnostic)
841
+ eos_token_ids = []
842
+
843
+ # Add primary eos_token_id
844
+ if tokenizer.eos_token_id is not None:
845
+ eos_token_ids.append(tokenizer.eos_token_id)
846
+
847
+ # Add common stop tokens that might exist
848
+ stop_tokens = ["<|im_end|>", "<|endoftext|>", "</s>", "<|eot_id|>"]
849
+ for token in stop_tokens:
850
+ token_id = tokenizer.convert_tokens_to_ids(token)
851
+ # Only add if token exists (not UNK) and not already in list
852
+ if token_id != tokenizer.unk_token_id and token_id not in eos_token_ids:
853
+ eos_token_ids.append(token_id)
854
+
855
+ # Stopping criteria for string-based stopping
856
+ stop_str = self.template.stop_str
857
+ stopping_criteria = KeywordsStoppingCriteria([stop_str], tokenizer, input_ids)
858
+
859
+ # Build generation kwargs
860
+ gen_kwargs = {
861
+ "max_new_tokens": max_new_tokens,
862
+ "num_beams": num_beams,
863
+ "use_cache": True,
864
+ "pad_token_id": tokenizer.pad_token_id if tokenizer.pad_token_id is not None else tokenizer.eos_token_id,
865
+ "eos_token_id": eos_token_ids if len(eos_token_ids) > 1 else eos_token_ids[0] if eos_token_ids else None,
866
+ "stopping_criteria": [stopping_criteria],
867
+ }
868
+
869
+ # Add sampling parameters only if needed
870
+ if temperature > 0:
871
+ gen_kwargs["do_sample"] = True
872
+ gen_kwargs["temperature"] = temperature
873
+ if top_p is not None:
874
+ gen_kwargs["top_p"] = top_p
875
+ else:
876
+ gen_kwargs["do_sample"] = False
877
+
878
+ # Generate
879
+ with torch.inference_mode():
880
+ output_ids = self.generate(
881
+ input_ids,
882
+ images=image_tensor,
883
+ **gen_kwargs
884
+ )
885
+
886
+ # Decode only the generated tokens (remove prompt)
887
+ generated_ids = output_ids[:, input_len:]
888
+ outputs = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
889
+ outputs = outputs.strip()
890
+
891
+ # Remove stop string if present at end
892
+ if outputs.endswith(stop_str):
893
+ outputs = outputs[:-len(stop_str)].strip()
894
+
895
+ # Also remove common stop patterns
896
+ for pattern in ["</s>", "<|im_end|>", "<|endoftext|>", "<|eot_id|>"]:
897
+ if outputs.endswith(pattern):
898
+ outputs = outputs[:-len(pattern)].strip()
899
+
900
+ return outputs
901
+
902
+
903
+ # =============================================================================
904
+ # REGISTER WITH AUTO CLASSES
905
+ # =============================================================================
906
+
907
+ AutoConfig.register("biopan_omni", BioPANOmniConfig)
908
+ AutoModelForCausalLM.register(BioPANOmniConfig, BioPANOmniForConditionalGeneration)
special_tokens_map.json ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ {
4
+ "content": "<demographics>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ },
10
+ {
11
+ "content": "</demographics>",
12
+ "lstrip": false,
13
+ "normalized": false,
14
+ "rstrip": false,
15
+ "single_word": false
16
+ },
17
+ {
18
+ "content": "<conditions>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ {
25
+ "content": "</conditions>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ },
31
+ {
32
+ "content": "<measurements>",
33
+ "lstrip": false,
34
+ "normalized": false,
35
+ "rstrip": false,
36
+ "single_word": false
37
+ },
38
+ {
39
+ "content": "</measurements>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": false,
43
+ "single_word": false
44
+ },
45
+ {
46
+ "content": "<observations>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false
51
+ },
52
+ {
53
+ "content": "</observations>",
54
+ "lstrip": false,
55
+ "normalized": false,
56
+ "rstrip": false,
57
+ "single_word": false
58
+ },
59
+ {
60
+ "content": "<procedures>",
61
+ "lstrip": false,
62
+ "normalized": false,
63
+ "rstrip": false,
64
+ "single_word": false
65
+ },
66
+ {
67
+ "content": "</procedures>",
68
+ "lstrip": false,
69
+ "normalized": false,
70
+ "rstrip": false,
71
+ "single_word": false
72
+ },
73
+ {
74
+ "content": "<drugs>",
75
+ "lstrip": false,
76
+ "normalized": false,
77
+ "rstrip": false,
78
+ "single_word": false
79
+ },
80
+ {
81
+ "content": "</drugs>",
82
+ "lstrip": false,
83
+ "normalized": false,
84
+ "rstrip": false,
85
+ "single_word": false
86
+ },
87
+ {
88
+ "content": "<notes>",
89
+ "lstrip": false,
90
+ "normalized": false,
91
+ "rstrip": false,
92
+ "single_word": false
93
+ },
94
+ {
95
+ "content": "</notes>",
96
+ "lstrip": false,
97
+ "normalized": false,
98
+ "rstrip": false,
99
+ "single_word": false
100
+ },
101
+ {
102
+ "content": "<death>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false
107
+ },
108
+ {
109
+ "content": "</death>",
110
+ "lstrip": false,
111
+ "normalized": false,
112
+ "rstrip": false,
113
+ "single_word": false
114
+ }
115
+ ],
116
+ "eos_token": {
117
+ "content": "<|im_end|>",
118
+ "lstrip": false,
119
+ "normalized": false,
120
+ "rstrip": false,
121
+ "single_word": false
122
+ },
123
+ "pad_token": {
124
+ "content": "<|endoftext|>",
125
+ "lstrip": false,
126
+ "normalized": false,
127
+ "rstrip": false,
128
+ "single_word": false
129
+ },
130
+ "unk_token": "<|endoftext|>"
131
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,372 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "151643": {
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "151644": {
14
+ "content": "<|im_start|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "151645": {
22
+ "content": "<|im_end|>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "151646": {
30
+ "content": "<|object_ref_start|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "151647": {
38
+ "content": "<|object_ref_end|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "151648": {
46
+ "content": "<|box_start|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "151649": {
54
+ "content": "<|box_end|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "151650": {
62
+ "content": "<|quad_start|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "151651": {
70
+ "content": "<|quad_end|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "151652": {
78
+ "content": "<|vision_start|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "151653": {
86
+ "content": "<|vision_end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "151654": {
94
+ "content": "<|vision_pad|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "151655": {
102
+ "content": "<|image_pad|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "151656": {
110
+ "content": "<|video_pad|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "151657": {
118
+ "content": "<tool_call>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": false
124
+ },
125
+ "151658": {
126
+ "content": "</tool_call>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": false
132
+ },
133
+ "151659": {
134
+ "content": "<|fim_prefix|>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": false
140
+ },
141
+ "151660": {
142
+ "content": "<|fim_middle|>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": false
148
+ },
149
+ "151661": {
150
+ "content": "<|fim_suffix|>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": false
156
+ },
157
+ "151662": {
158
+ "content": "<|fim_pad|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": false
164
+ },
165
+ "151663": {
166
+ "content": "<|repo_name|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": false
172
+ },
173
+ "151664": {
174
+ "content": "<|file_sep|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": false
180
+ },
181
+ "151665": {
182
+ "content": "<tool_response>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": false
188
+ },
189
+ "151666": {
190
+ "content": "</tool_response>",
191
+ "lstrip": false,
192
+ "normalized": false,
193
+ "rstrip": false,
194
+ "single_word": false,
195
+ "special": false
196
+ },
197
+ "151667": {
198
+ "content": "<think>",
199
+ "lstrip": false,
200
+ "normalized": false,
201
+ "rstrip": false,
202
+ "single_word": false,
203
+ "special": false
204
+ },
205
+ "151668": {
206
+ "content": "</think>",
207
+ "lstrip": false,
208
+ "normalized": false,
209
+ "rstrip": false,
210
+ "single_word": false,
211
+ "special": false
212
+ },
213
+ "151669": {
214
+ "content": "<demographics>",
215
+ "lstrip": false,
216
+ "normalized": false,
217
+ "rstrip": false,
218
+ "single_word": false,
219
+ "special": true
220
+ },
221
+ "151670": {
222
+ "content": "</demographics>",
223
+ "lstrip": false,
224
+ "normalized": false,
225
+ "rstrip": false,
226
+ "single_word": false,
227
+ "special": true
228
+ },
229
+ "151671": {
230
+ "content": "<conditions>",
231
+ "lstrip": false,
232
+ "normalized": false,
233
+ "rstrip": false,
234
+ "single_word": false,
235
+ "special": true
236
+ },
237
+ "151672": {
238
+ "content": "</conditions>",
239
+ "lstrip": false,
240
+ "normalized": false,
241
+ "rstrip": false,
242
+ "single_word": false,
243
+ "special": true
244
+ },
245
+ "151673": {
246
+ "content": "<measurements>",
247
+ "lstrip": false,
248
+ "normalized": false,
249
+ "rstrip": false,
250
+ "single_word": false,
251
+ "special": true
252
+ },
253
+ "151674": {
254
+ "content": "</measurements>",
255
+ "lstrip": false,
256
+ "normalized": false,
257
+ "rstrip": false,
258
+ "single_word": false,
259
+ "special": true
260
+ },
261
+ "151675": {
262
+ "content": "<observations>",
263
+ "lstrip": false,
264
+ "normalized": false,
265
+ "rstrip": false,
266
+ "single_word": false,
267
+ "special": true
268
+ },
269
+ "151676": {
270
+ "content": "</observations>",
271
+ "lstrip": false,
272
+ "normalized": false,
273
+ "rstrip": false,
274
+ "single_word": false,
275
+ "special": true
276
+ },
277
+ "151677": {
278
+ "content": "<procedures>",
279
+ "lstrip": false,
280
+ "normalized": false,
281
+ "rstrip": false,
282
+ "single_word": false,
283
+ "special": true
284
+ },
285
+ "151678": {
286
+ "content": "</procedures>",
287
+ "lstrip": false,
288
+ "normalized": false,
289
+ "rstrip": false,
290
+ "single_word": false,
291
+ "special": true
292
+ },
293
+ "151679": {
294
+ "content": "<drugs>",
295
+ "lstrip": false,
296
+ "normalized": false,
297
+ "rstrip": false,
298
+ "single_word": false,
299
+ "special": true
300
+ },
301
+ "151680": {
302
+ "content": "</drugs>",
303
+ "lstrip": false,
304
+ "normalized": false,
305
+ "rstrip": false,
306
+ "single_word": false,
307
+ "special": true
308
+ },
309
+ "151681": {
310
+ "content": "<notes>",
311
+ "lstrip": false,
312
+ "normalized": false,
313
+ "rstrip": false,
314
+ "single_word": false,
315
+ "special": true
316
+ },
317
+ "151682": {
318
+ "content": "</notes>",
319
+ "lstrip": false,
320
+ "normalized": false,
321
+ "rstrip": false,
322
+ "single_word": false,
323
+ "special": true
324
+ },
325
+ "151683": {
326
+ "content": "<death>",
327
+ "lstrip": false,
328
+ "normalized": false,
329
+ "rstrip": false,
330
+ "single_word": false,
331
+ "special": true
332
+ },
333
+ "151684": {
334
+ "content": "</death>",
335
+ "lstrip": false,
336
+ "normalized": false,
337
+ "rstrip": false,
338
+ "single_word": false,
339
+ "special": true
340
+ }
341
+ },
342
+ "additional_special_tokens": [
343
+ "<demographics>",
344
+ "</demographics>",
345
+ "<conditions>",
346
+ "</conditions>",
347
+ "<measurements>",
348
+ "</measurements>",
349
+ "<observations>",
350
+ "</observations>",
351
+ "<procedures>",
352
+ "</procedures>",
353
+ "<drugs>",
354
+ "</drugs>",
355
+ "<notes>",
356
+ "</notes>",
357
+ "<death>",
358
+ "</death>"
359
+ ],
360
+ "bos_token": null,
361
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\\n\\n' }}\n {%- endif %}\n {{- \"# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0].content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if message.content is string %}\n {%- set content = message.content %}\n {%- else %}\n {%- set content = '' %}\n {%- endif %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- if loop.index0 > ns.last_query_index %}\n {%- if loop.last or (not loop.last and reasoning_content) %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- endif %}\n{%- endif %}",
362
+ "clean_up_tokenization_spaces": false,
363
+ "eos_token": "<|im_end|>",
364
+ "errors": "replace",
365
+ "extra_special_tokens": {},
366
+ "model_max_length": 3300,
367
+ "pad_token": "<|endoftext|>",
368
+ "padding_side": "right",
369
+ "split_special_tokens": false,
370
+ "tokenizer_class": "Qwen2Tokenizer",
371
+ "unk_token": "<|endoftext|>"
372
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff