Upload folder using huggingface_hub
Browse files- added_tokens.json +5 -0
- config.json +74 -0
- connector/config.json +5 -0
- connector/pytorch_model.bin +3 -0
- final_ckpt/added_tokens.json +5 -0
- final_ckpt/config.json +74 -0
- final_ckpt/generation_config.json +7 -0
- final_ckpt/merges.txt +0 -0
- final_ckpt/model.safetensors +3 -0
- final_ckpt/special_tokens_map.json +21 -0
- final_ckpt/tokenizer_config.json +44 -0
- final_ckpt/training_args.bin +3 -0
- final_ckpt/vocab.json +0 -0
- generation_config.json +7 -0
- language_model/.gitattributes +35 -0
- language_model/LICENSE +202 -0
- language_model/README.md +93 -0
- language_model/config.json +22 -0
- language_model/generation_config.json +14 -0
- language_model/merges.txt +0 -0
- language_model/pytorch_model.bin +3 -0
- language_model/tokenizer.json +0 -0
- language_model/tokenizer_config.json +40 -0
- language_model/vocab.json +0 -0
- log.txt +3 -0
- merges.txt +0 -0
- res.log +0 -0
- res.progress +0 -0
- runs/Jan07_10-55-04_VM-0-21-tencentos/events.out.tfevents.1736218593.VM-0-21-tencentos.105.0 +3 -0
- special_tokens_map.json +21 -0
- tokenizer_config.json +44 -0
- trainer_state.json +0 -0
- training_args.bin +3 -0
- vision_tower/.gitattributes +35 -0
- vision_tower/README.md +112 -0
- vision_tower/config.json +15 -0
- vision_tower/preprocessor_config.json +24 -0
- vision_tower/pytorch_model.bin +3 -0
- vision_tower/special_tokens_map.json +23 -0
- vision_tower/spiece.model +3 -0
- vision_tower/tokenizer_config.json +33 -0
- vocab.json +0 -0
added_tokens.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<|endoftext|>": 151643,
|
| 3 |
+
"<|im_end|>": 151645,
|
| 4 |
+
"<|im_start|>": 151644
|
| 5 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"TinyLlavaForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"cache_dir": null,
|
| 6 |
+
"connector_hidden_size": 2560,
|
| 7 |
+
"connector_mlp_bias": false,
|
| 8 |
+
"connector_target_size": 896,
|
| 9 |
+
"connector_type": "mlp2x_gelu",
|
| 10 |
+
"hidden_size": 1536,
|
| 11 |
+
"ignore_index": -100,
|
| 12 |
+
"image_aspect_ratio": "square",
|
| 13 |
+
"image_token_index": -200,
|
| 14 |
+
"llm_model_name_or_path": "/data_train/code/mllm/dingbowen/project_data_governance/TinyLLaVA_Factory/outputs/distill_kdlm_all_top10-pretrain-siglip-qwen2-1d5b-sharegpt4v/language_model",
|
| 15 |
+
"model_type": "tinyllava",
|
| 16 |
+
"num_queries": 128,
|
| 17 |
+
"num_resampler_layers": 3,
|
| 18 |
+
"pad_token": "<|endoftext|>",
|
| 19 |
+
"pad_token_id": 151643,
|
| 20 |
+
"resampler_hidden_size": 768,
|
| 21 |
+
"text_config": {
|
| 22 |
+
"_name_or_path": "/data_train/code/mllm/dingbowen/project_data_governance/TinyLLaVA_Factory/outputs/distill_kdlm_all_top10-pretrain-siglip-qwen2-1d5b-sharegpt4v/language_model",
|
| 23 |
+
"architectures": [
|
| 24 |
+
"Qwen2ForCausalLM"
|
| 25 |
+
],
|
| 26 |
+
"bos_token_id": 151643,
|
| 27 |
+
"eos_token_id": 151645,
|
| 28 |
+
"hidden_size": 1536,
|
| 29 |
+
"intermediate_size": 8960,
|
| 30 |
+
"max_position_embeddings": 32768,
|
| 31 |
+
"max_window_layers": 28,
|
| 32 |
+
"model_type": "qwen2",
|
| 33 |
+
"num_attention_heads": 12,
|
| 34 |
+
"num_hidden_layers": 28,
|
| 35 |
+
"num_key_value_heads": 2,
|
| 36 |
+
"rope_theta": 1000000.0,
|
| 37 |
+
"sliding_window": 32768,
|
| 38 |
+
"tie_word_embeddings": true,
|
| 39 |
+
"torch_dtype": "bfloat16",
|
| 40 |
+
"use_sliding_window": false,
|
| 41 |
+
"vocab_size": 151936
|
| 42 |
+
},
|
| 43 |
+
"tokenizer_model_max_length": 2048,
|
| 44 |
+
"tokenizer_name_or_path": "/data_train/code/mllm/dingbowen/project_data_governance/TinyLLaVA_Factory/outputs/distill_kdlm_all_top10-pretrain-siglip-qwen2-1d5b-sharegpt4v/language_model",
|
| 45 |
+
"tokenizer_padding_side": "right",
|
| 46 |
+
"tokenizer_use_fast": false,
|
| 47 |
+
"torch_dtype": "bfloat16",
|
| 48 |
+
"transformers_version": "4.40.1",
|
| 49 |
+
"tune_type_connector": "full",
|
| 50 |
+
"tune_type_llm": "full",
|
| 51 |
+
"tune_type_vision_tower": "full",
|
| 52 |
+
"tune_vision_tower_from_layer": 0,
|
| 53 |
+
"use_cache": false,
|
| 54 |
+
"vision_config": {
|
| 55 |
+
"_name_or_path": "/data_train/code/mllm/dingbowen/project_data_governance/TinyLLaVA_Factory/outputs/distill_kdlm_all_top10-pretrain-siglip-qwen2-1d5b-sharegpt4v/vision_tower",
|
| 56 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 57 |
+
"hidden_size": 1152,
|
| 58 |
+
"image_size": 384,
|
| 59 |
+
"intermediate_size": 4304,
|
| 60 |
+
"layer_norm_eps": 1e-06,
|
| 61 |
+
"model_name_or_path": "/data_train/code/mllm/dingbowen/project_data_governance/TinyLLaVA_Factory/outputs/distill_kdlm_all_top10-pretrain-siglip-qwen2-1d5b-sharegpt4v/vision_tower",
|
| 62 |
+
"model_name_or_path2": "",
|
| 63 |
+
"model_type": "siglip_vision_model",
|
| 64 |
+
"num_attention_heads": 16,
|
| 65 |
+
"num_hidden_layers": 27,
|
| 66 |
+
"patch_size": 14
|
| 67 |
+
},
|
| 68 |
+
"vision_feature_layer": -2,
|
| 69 |
+
"vision_feature_select_strategy": "patch",
|
| 70 |
+
"vision_hidden_size": 1152,
|
| 71 |
+
"vision_model_name_or_path": "/data_train/code/mllm/dingbowen/project_data_governance/TinyLLaVA_Factory/outputs/distill_kdlm_all_top10-pretrain-siglip-qwen2-1d5b-sharegpt4v/vision_tower",
|
| 72 |
+
"vision_model_name_or_path2": "",
|
| 73 |
+
"vocab_size": 151936
|
| 74 |
+
}
|
connector/config.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"connector_type": "mlp2x_gelu",
|
| 3 |
+
"hidden_size": 1536,
|
| 4 |
+
"connector_target_size": 896
|
| 5 |
+
}
|
connector/pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c37ddeace38102b299f204dc287992a42f667b8b72f85afeab3bc9be27c1eb95
|
| 3 |
+
size 8265728
|
final_ckpt/added_tokens.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<|endoftext|>": 151643,
|
| 3 |
+
"<|im_end|>": 151645,
|
| 4 |
+
"<|im_start|>": 151644
|
| 5 |
+
}
|
final_ckpt/config.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"TinyLlavaForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"cache_dir": null,
|
| 6 |
+
"connector_hidden_size": 2560,
|
| 7 |
+
"connector_mlp_bias": false,
|
| 8 |
+
"connector_target_size": 896,
|
| 9 |
+
"connector_type": "mlp2x_gelu",
|
| 10 |
+
"hidden_size": 1536,
|
| 11 |
+
"ignore_index": -100,
|
| 12 |
+
"image_aspect_ratio": "square",
|
| 13 |
+
"image_token_index": -200,
|
| 14 |
+
"llm_model_name_or_path": "/data_train/code/mllm/dingbowen/project_data_governance/TinyLLaVA_Factory/outputs/distill_kdlm_all_top10-pretrain-siglip-qwen2-1d5b-sharegpt4v/language_model",
|
| 15 |
+
"model_type": "tinyllava",
|
| 16 |
+
"num_queries": 128,
|
| 17 |
+
"num_resampler_layers": 3,
|
| 18 |
+
"pad_token": "<|endoftext|>",
|
| 19 |
+
"pad_token_id": 151643,
|
| 20 |
+
"resampler_hidden_size": 768,
|
| 21 |
+
"text_config": {
|
| 22 |
+
"_name_or_path": "/data_train/code/mllm/dingbowen/project_data_governance/TinyLLaVA_Factory/outputs/distill_kdlm_all_top10-pretrain-siglip-qwen2-1d5b-sharegpt4v/language_model",
|
| 23 |
+
"architectures": [
|
| 24 |
+
"Qwen2ForCausalLM"
|
| 25 |
+
],
|
| 26 |
+
"bos_token_id": 151643,
|
| 27 |
+
"eos_token_id": 151645,
|
| 28 |
+
"hidden_size": 1536,
|
| 29 |
+
"intermediate_size": 8960,
|
| 30 |
+
"max_position_embeddings": 32768,
|
| 31 |
+
"max_window_layers": 28,
|
| 32 |
+
"model_type": "qwen2",
|
| 33 |
+
"num_attention_heads": 12,
|
| 34 |
+
"num_hidden_layers": 28,
|
| 35 |
+
"num_key_value_heads": 2,
|
| 36 |
+
"rope_theta": 1000000.0,
|
| 37 |
+
"sliding_window": 32768,
|
| 38 |
+
"tie_word_embeddings": true,
|
| 39 |
+
"torch_dtype": "bfloat16",
|
| 40 |
+
"use_sliding_window": false,
|
| 41 |
+
"vocab_size": 151936
|
| 42 |
+
},
|
| 43 |
+
"tokenizer_model_max_length": 2048,
|
| 44 |
+
"tokenizer_name_or_path": "/data_train/code/mllm/dingbowen/project_data_governance/TinyLLaVA_Factory/outputs/distill_kdlm_all_top10-pretrain-siglip-qwen2-1d5b-sharegpt4v/language_model",
|
| 45 |
+
"tokenizer_padding_side": "right",
|
| 46 |
+
"tokenizer_use_fast": false,
|
| 47 |
+
"torch_dtype": "bfloat16",
|
| 48 |
+
"transformers_version": "4.40.1",
|
| 49 |
+
"tune_type_connector": "full",
|
| 50 |
+
"tune_type_llm": "full",
|
| 51 |
+
"tune_type_vision_tower": "full",
|
| 52 |
+
"tune_vision_tower_from_layer": 0,
|
| 53 |
+
"use_cache": false,
|
| 54 |
+
"vision_config": {
|
| 55 |
+
"_name_or_path": "/data_train/code/mllm/dingbowen/project_data_governance/TinyLLaVA_Factory/outputs/distill_kdlm_all_top10-pretrain-siglip-qwen2-1d5b-sharegpt4v/vision_tower",
|
| 56 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 57 |
+
"hidden_size": 1152,
|
| 58 |
+
"image_size": 384,
|
| 59 |
+
"intermediate_size": 4304,
|
| 60 |
+
"layer_norm_eps": 1e-06,
|
| 61 |
+
"model_name_or_path": "/data_train/code/mllm/dingbowen/project_data_governance/TinyLLaVA_Factory/outputs/distill_kdlm_all_top10-pretrain-siglip-qwen2-1d5b-sharegpt4v/vision_tower",
|
| 62 |
+
"model_name_or_path2": "",
|
| 63 |
+
"model_type": "siglip_vision_model",
|
| 64 |
+
"num_attention_heads": 16,
|
| 65 |
+
"num_hidden_layers": 27,
|
| 66 |
+
"patch_size": 14
|
| 67 |
+
},
|
| 68 |
+
"vision_feature_layer": -2,
|
| 69 |
+
"vision_feature_select_strategy": "patch",
|
| 70 |
+
"vision_hidden_size": 1152,
|
| 71 |
+
"vision_model_name_or_path": "/data_train/code/mllm/dingbowen/project_data_governance/TinyLLaVA_Factory/outputs/distill_kdlm_all_top10-pretrain-siglip-qwen2-1d5b-sharegpt4v/vision_tower",
|
| 72 |
+
"vision_model_name_or_path2": "",
|
| 73 |
+
"vocab_size": 151936
|
| 74 |
+
}
|
final_ckpt/generation_config.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 151643,
|
| 4 |
+
"eos_token_id": 151645,
|
| 5 |
+
"transformers_version": "4.40.1",
|
| 6 |
+
"use_cache": false
|
| 7 |
+
}
|
final_ckpt/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
final_ckpt/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7664977f35b4b4202a11d2eedfad7b63b4b264ca6e093b665981e5740f890b01
|
| 3 |
+
size 4419003112
|
final_ckpt/special_tokens_map.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|im_start|>",
|
| 4 |
+
"<|im_end|>"
|
| 5 |
+
],
|
| 6 |
+
"eos_token": {
|
| 7 |
+
"content": "<|im_end|>",
|
| 8 |
+
"lstrip": false,
|
| 9 |
+
"normalized": false,
|
| 10 |
+
"rstrip": false,
|
| 11 |
+
"single_word": false
|
| 12 |
+
},
|
| 13 |
+
"pad_token": {
|
| 14 |
+
"content": "<|endoftext|>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": false,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false
|
| 19 |
+
},
|
| 20 |
+
"unk_token": "<|endoftext|>"
|
| 21 |
+
}
|
final_ckpt/tokenizer_config.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"151643": {
|
| 5 |
+
"content": "<|endoftext|>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": false,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"151644": {
|
| 13 |
+
"content": "<|im_start|>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"151645": {
|
| 21 |
+
"content": "<|im_end|>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"additional_special_tokens": [
|
| 30 |
+
"<|im_start|>",
|
| 31 |
+
"<|im_end|>"
|
| 32 |
+
],
|
| 33 |
+
"bos_token": null,
|
| 34 |
+
"chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
| 35 |
+
"clean_up_tokenization_spaces": false,
|
| 36 |
+
"eos_token": "<|im_end|>",
|
| 37 |
+
"errors": "replace",
|
| 38 |
+
"model_max_length": 2048,
|
| 39 |
+
"pad_token": "<|endoftext|>",
|
| 40 |
+
"padding_side": "right",
|
| 41 |
+
"split_special_tokens": false,
|
| 42 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 43 |
+
"unk_token": "<|endoftext|>"
|
| 44 |
+
}
|
final_ckpt/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6d5e776d75b339ff44f7216d00aa1ef7115ee052788c99b746e35b8a78854c79
|
| 3 |
+
size 6712
|
final_ckpt/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
generation_config.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 151643,
|
| 4 |
+
"eos_token_id": 151645,
|
| 5 |
+
"transformers_version": "4.40.1",
|
| 6 |
+
"use_cache": false
|
| 7 |
+
}
|
language_model/.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
language_model/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright 2024 Alibaba Cloud
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
language_model/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- chat
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# Qwen2-1.5B-Instruct
|
| 11 |
+
|
| 12 |
+
## Introduction
|
| 13 |
+
|
| 14 |
+
Qwen2 is the new series of Qwen large language models. For Qwen2, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters, including a Mixture-of-Experts model. This repo contains the instruction-tuned 1.5B Qwen2 model.
|
| 15 |
+
|
| 16 |
+
Compared with the state-of-the-art opensource language models, including the previous released Qwen1.5, Qwen2 has generally surpassed most opensource models and demonstrated competitiveness against proprietary models across a series of benchmarks targeting for language understanding, language generation, multilingual capability, coding, mathematics, reasoning, etc.
|
| 17 |
+
|
| 18 |
+
For more details, please refer to our [blog](https://qwenlm.github.io/blog/qwen2/), [GitHub](https://github.com/QwenLM/Qwen2), and [Documentation](https://qwen.readthedocs.io/en/latest/).
|
| 19 |
+
<br>
|
| 20 |
+
|
| 21 |
+
## Model Details
|
| 22 |
+
Qwen2 is a language model series including decoder language models of different model sizes. For each size, we release the base language model and the aligned chat model. It is based on the Transformer architecture with SwiGLU activation, attention QKV bias, group query attention, etc. Additionally, we have an improved tokenizer adaptive to multiple natural languages and codes.
|
| 23 |
+
|
| 24 |
+
## Training details
|
| 25 |
+
We pretrained the models with a large amount of data, and we post-trained the models with both supervised finetuning and direct preference optimization.
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
## Requirements
|
| 29 |
+
The code of Qwen2 has been in the latest Hugging face transformers and we advise you to install `transformers>=4.37.0`, or you might encounter the following error:
|
| 30 |
+
```
|
| 31 |
+
KeyError: 'qwen2'
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
## Quickstart
|
| 35 |
+
|
| 36 |
+
Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
|
| 37 |
+
|
| 38 |
+
```python
|
| 39 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 40 |
+
device = "cuda" # the device to load the model onto
|
| 41 |
+
|
| 42 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 43 |
+
"Qwen/Qwen2-1.5B-Instruct",
|
| 44 |
+
torch_dtype="auto",
|
| 45 |
+
device_map="auto"
|
| 46 |
+
)
|
| 47 |
+
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2-1.5B-Instruct")
|
| 48 |
+
|
| 49 |
+
prompt = "Give me a short introduction to large language model."
|
| 50 |
+
messages = [
|
| 51 |
+
{"role": "system", "content": "You are a helpful assistant."},
|
| 52 |
+
{"role": "user", "content": prompt}
|
| 53 |
+
]
|
| 54 |
+
text = tokenizer.apply_chat_template(
|
| 55 |
+
messages,
|
| 56 |
+
tokenize=False,
|
| 57 |
+
add_generation_prompt=True
|
| 58 |
+
)
|
| 59 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(device)
|
| 60 |
+
|
| 61 |
+
generated_ids = model.generate(
|
| 62 |
+
model_inputs.input_ids,
|
| 63 |
+
max_new_tokens=512
|
| 64 |
+
)
|
| 65 |
+
generated_ids = [
|
| 66 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
| 67 |
+
]
|
| 68 |
+
|
| 69 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
## Evaluation
|
| 73 |
+
|
| 74 |
+
We briefly compare Qwen2-1.5B-Instruct with Qwen1.5-1.8B-Chat. The results are as follows:
|
| 75 |
+
|
| 76 |
+
| Datasets | Qwen1.5-0.5B-Chat | **Qwen2-0.5B-Instruct** | Qwen1.5-1.8B-Chat | **Qwen2-1.5B-Instruct** |
|
| 77 |
+
| :--- | :---: | :---: | :---: | :---: |
|
| 78 |
+
| MMLU | 35.0 | **37.9** | 43.7 | **52.4** |
|
| 79 |
+
| HumanEval | 9.1 | **17.1** | 25.0 | **37.8** |
|
| 80 |
+
| GSM8K | 11.3 | **40.1** | 35.3 | **61.6** |
|
| 81 |
+
| C-Eval | 37.2 | **45.2** | 55.3 | **63.8** |
|
| 82 |
+
| IFEval (Prompt Strict-Acc.) | 14.6 | **20.0** | 16.8 | **29.0** |
|
| 83 |
+
|
| 84 |
+
## Citation
|
| 85 |
+
|
| 86 |
+
If you find our work helpful, feel free to give us a cite.
|
| 87 |
+
|
| 88 |
+
```
|
| 89 |
+
@article{qwen2,
|
| 90 |
+
title={Qwen2 Technical Report},
|
| 91 |
+
year={2024}
|
| 92 |
+
}
|
| 93 |
+
```
|
language_model/config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "/checkpoint_save/language_model",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"Qwen2ForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"bos_token_id": 151643,
|
| 7 |
+
"eos_token_id": 151645,
|
| 8 |
+
"hidden_size": 1536,
|
| 9 |
+
"intermediate_size": 8960,
|
| 10 |
+
"max_position_embeddings": 32768,
|
| 11 |
+
"max_window_layers": 28,
|
| 12 |
+
"model_type": "qwen2",
|
| 13 |
+
"num_attention_heads": 12,
|
| 14 |
+
"num_hidden_layers": 28,
|
| 15 |
+
"num_key_value_heads": 2,
|
| 16 |
+
"rope_theta": 1000000.0,
|
| 17 |
+
"sliding_window": 32768,
|
| 18 |
+
"tie_word_embeddings": true,
|
| 19 |
+
"torch_dtype": "bfloat16",
|
| 20 |
+
"use_sliding_window": false,
|
| 21 |
+
"vocab_size": 151936
|
| 22 |
+
}
|
language_model/generation_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 151643,
|
| 3 |
+
"pad_token_id": 151643,
|
| 4 |
+
"do_sample": true,
|
| 5 |
+
"eos_token_id": [
|
| 6 |
+
151645,
|
| 7 |
+
151643
|
| 8 |
+
],
|
| 9 |
+
"repetition_penalty": 1.1,
|
| 10 |
+
"temperature": 0.7,
|
| 11 |
+
"top_p": 0.8,
|
| 12 |
+
"top_k": 20,
|
| 13 |
+
"transformers_version": "4.37.0"
|
| 14 |
+
}
|
language_model/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
language_model/pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b67fc4383b1be06e1b002fafc05bfebe3c91693ab55031ddefdf371c9f9e8368
|
| 3 |
+
size 3554285270
|
language_model/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
language_model/tokenizer_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"151643": {
|
| 5 |
+
"content": "<|endoftext|>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": false,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"151644": {
|
| 13 |
+
"content": "<|im_start|>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"151645": {
|
| 21 |
+
"content": "<|im_end|>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"additional_special_tokens": ["<|im_start|>", "<|im_end|>"],
|
| 30 |
+
"bos_token": null,
|
| 31 |
+
"chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
| 32 |
+
"clean_up_tokenization_spaces": false,
|
| 33 |
+
"eos_token": "<|im_end|>",
|
| 34 |
+
"errors": "replace",
|
| 35 |
+
"model_max_length": 32768,
|
| 36 |
+
"pad_token": "<|endoftext|>",
|
| 37 |
+
"split_special_tokens": false,
|
| 38 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 39 |
+
"unk_token": null
|
| 40 |
+
}
|
language_model/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
log.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
2025-01-07 10:56:10,222 | INFO: Total Parameters: 1976071744, Total Trainable Parameters: 1976071744
|
| 2 |
+
2025-01-07 10:56:10,230 | INFO: Trainable Parameters:
|
| 3 |
+
2025-01-07 10:56:10,243 | WARNING: Detected kernel version 5.4.119, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
res.log
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
res.progress
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
runs/Jan07_10-55-04_VM-0-21-tencentos/events.out.tfevents.1736218593.VM-0-21-tencentos.105.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:71e0dea20df4f1f2566b82d71ccd010505007a664de31da5b925a5791b53713f
|
| 3 |
+
size 1103221
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|im_start|>",
|
| 4 |
+
"<|im_end|>"
|
| 5 |
+
],
|
| 6 |
+
"eos_token": {
|
| 7 |
+
"content": "<|im_end|>",
|
| 8 |
+
"lstrip": false,
|
| 9 |
+
"normalized": false,
|
| 10 |
+
"rstrip": false,
|
| 11 |
+
"single_word": false
|
| 12 |
+
},
|
| 13 |
+
"pad_token": {
|
| 14 |
+
"content": "<|endoftext|>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": false,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false
|
| 19 |
+
},
|
| 20 |
+
"unk_token": "<|endoftext|>"
|
| 21 |
+
}
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"151643": {
|
| 5 |
+
"content": "<|endoftext|>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": false,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"151644": {
|
| 13 |
+
"content": "<|im_start|>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"151645": {
|
| 21 |
+
"content": "<|im_end|>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"additional_special_tokens": [
|
| 30 |
+
"<|im_start|>",
|
| 31 |
+
"<|im_end|>"
|
| 32 |
+
],
|
| 33 |
+
"bos_token": null,
|
| 34 |
+
"chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
| 35 |
+
"clean_up_tokenization_spaces": false,
|
| 36 |
+
"eos_token": "<|im_end|>",
|
| 37 |
+
"errors": "replace",
|
| 38 |
+
"model_max_length": 2048,
|
| 39 |
+
"pad_token": "<|endoftext|>",
|
| 40 |
+
"padding_side": "right",
|
| 41 |
+
"split_special_tokens": false,
|
| 42 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 43 |
+
"unk_token": "<|endoftext|>"
|
| 44 |
+
}
|
trainer_state.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6d5e776d75b339ff44f7216d00aa1ef7115ee052788c99b746e35b8a78854c79
|
| 3 |
+
size 6712
|
vision_tower/.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
vision_tower/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- vision
|
| 5 |
+
widget:
|
| 6 |
+
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/cat-dog-music.png
|
| 7 |
+
candidate_labels: playing music, playing sports
|
| 8 |
+
example_title: Cat & Dog
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# SigLIP (shape-optimized model)
|
| 12 |
+
|
| 13 |
+
SigLIP model pre-trained on WebLi at resolution 384x384. It was introduced in the paper [Sigmoid Loss for Language Image Pre-Training](https://arxiv.org/abs/2303.15343) by Zhai et al. and first released in [this repository](https://github.com/google-research/big_vision).
|
| 14 |
+
|
| 15 |
+
This model has the SoViT-400m architecture, which is the shape-optimized version as presented in [Getting ViT in Shape: Scaling Laws for Compute-Optimal Model Design](https://arxiv.org/abs/2305.13035) by Alabdulmohsin et al.
|
| 16 |
+
|
| 17 |
+
Disclaimer: The team releasing SigLIP did not write a model card for this model so this model card has been written by the Hugging Face team.
|
| 18 |
+
|
| 19 |
+
## Model description
|
| 20 |
+
|
| 21 |
+
SigLIP is [CLIP](https://huggingface.co/docs/transformers/model_doc/clip), a multimodal model, with a better loss function. The sigmoid loss operates solely on image-text pairs and does not require a global view of the pairwise similarities for normalization. This allows further scaling up the batch size, while also performing better at smaller batch sizes.
|
| 22 |
+
|
| 23 |
+
A TLDR of SigLIP by one of the authors can be found [here](https://twitter.com/giffmana/status/1692641733459267713).
|
| 24 |
+
|
| 25 |
+
## Intended uses & limitations
|
| 26 |
+
|
| 27 |
+
You can use the raw model for tasks like zero-shot image classification and image-text retrieval. See the [model hub](https://huggingface.co/models?search=google/siglip) to look for
|
| 28 |
+
other versions on a task that interests you.
|
| 29 |
+
|
| 30 |
+
### How to use
|
| 31 |
+
|
| 32 |
+
Here is how to use this model to perform zero-shot image classification:
|
| 33 |
+
|
| 34 |
+
```python
|
| 35 |
+
from PIL import Image
|
| 36 |
+
import requests
|
| 37 |
+
from transformers import AutoProcessor, AutoModel
|
| 38 |
+
import torch
|
| 39 |
+
|
| 40 |
+
model = AutoModel.from_pretrained("google/siglip-so400m-patch14-384")
|
| 41 |
+
processor = AutoProcessor.from_pretrained("google/siglip-so400m-patch14-384")
|
| 42 |
+
|
| 43 |
+
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
| 44 |
+
image = Image.open(requests.get(url, stream=True).raw)
|
| 45 |
+
|
| 46 |
+
texts = ["a photo of 2 cats", "a photo of 2 dogs"]
|
| 47 |
+
inputs = processor(text=texts, images=image, padding="max_length", return_tensors="pt")
|
| 48 |
+
|
| 49 |
+
with torch.no_grad():
|
| 50 |
+
outputs = model(**inputs)
|
| 51 |
+
|
| 52 |
+
logits_per_image = outputs.logits_per_image
|
| 53 |
+
probs = torch.sigmoid(logits_per_image) # these are the probabilities
|
| 54 |
+
print(f"{probs[0][0]:.1%} that image 0 is '{texts[0]}'")
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
Alternatively, one can leverage the pipeline API which abstracts away the complexity for the user:
|
| 58 |
+
|
| 59 |
+
```python
|
| 60 |
+
from transformers import pipeline
|
| 61 |
+
from PIL import Image
|
| 62 |
+
import requests
|
| 63 |
+
|
| 64 |
+
# load pipe
|
| 65 |
+
image_classifier = pipeline(task="zero-shot-image-classification", model="google/siglip-so400m-patch14-384")
|
| 66 |
+
|
| 67 |
+
# load image
|
| 68 |
+
url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
|
| 69 |
+
image = Image.open(requests.get(url, stream=True).raw)
|
| 70 |
+
|
| 71 |
+
# inference
|
| 72 |
+
outputs = image_classifier(image, candidate_labels=["2 cats", "a plane", "a remote"])
|
| 73 |
+
outputs = [{"score": round(output["score"], 4), "label": output["label"] } for output in outputs]
|
| 74 |
+
print(outputs)
|
| 75 |
+
```
|
| 76 |
+
For more code examples, we refer to the [documentation](https://huggingface.co/transformers/main/model_doc/siglip.html#).
|
| 77 |
+
|
| 78 |
+
## Training procedure
|
| 79 |
+
|
| 80 |
+
### Training data
|
| 81 |
+
|
| 82 |
+
SigLIP is pre-trained on the WebLI dataset [(Chen et al., 2023)](https://arxiv.org/abs/2209.06794).
|
| 83 |
+
|
| 84 |
+
### Preprocessing
|
| 85 |
+
|
| 86 |
+
Images are resized/rescaled to the same resolution (384x384) and normalized across the RGB channels with mean (0.5, 0.5, 0.5) and standard deviation (0.5, 0.5, 0.5).
|
| 87 |
+
|
| 88 |
+
Texts are tokenized and padded to the same length (64 tokens).
|
| 89 |
+
|
| 90 |
+
### Compute
|
| 91 |
+
|
| 92 |
+
The model was trained on 16 TPU-v4 chips for three days.
|
| 93 |
+
|
| 94 |
+
## Evaluation results
|
| 95 |
+
|
| 96 |
+
Evaluation of SigLIP compared to CLIP is shown below (taken from the paper).
|
| 97 |
+
|
| 98 |
+
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/siglip_table.jpeg"
|
| 99 |
+
alt="drawing" width="600"/>
|
| 100 |
+
|
| 101 |
+
### BibTeX entry and citation info
|
| 102 |
+
|
| 103 |
+
```bibtex
|
| 104 |
+
@misc{zhai2023sigmoid,
|
| 105 |
+
title={Sigmoid Loss for Language Image Pre-Training},
|
| 106 |
+
author={Xiaohua Zhai and Basil Mustafa and Alexander Kolesnikov and Lucas Beyer},
|
| 107 |
+
year={2023},
|
| 108 |
+
eprint={2303.15343},
|
| 109 |
+
archivePrefix={arXiv},
|
| 110 |
+
primaryClass={cs.CV}
|
| 111 |
+
}
|
| 112 |
+
```
|
vision_tower/config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "/checkpoint_save/vision_tower",
|
| 3 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 4 |
+
"hidden_size": 1152,
|
| 5 |
+
"image_size": 384,
|
| 6 |
+
"intermediate_size": 4304,
|
| 7 |
+
"layer_norm_eps": 1e-06,
|
| 8 |
+
"model_name_or_path": "/data_train/code/mllm/dingbowen/project_data_governance/TinyLLaVA_Factory/outputs/distill_kdlm_all_top10-pretrain-siglip-qwen2-1d5b-sharegpt4v/vision_tower",
|
| 9 |
+
"model_name_or_path2": "",
|
| 10 |
+
"model_type": "siglip_vision_model",
|
| 11 |
+
"num_attention_heads": 16,
|
| 12 |
+
"num_hidden_layers": 27,
|
| 13 |
+
"patch_size": 14,
|
| 14 |
+
"transformers_version": "4.40.1"
|
| 15 |
+
}
|
vision_tower/preprocessor_config.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"crop_size": 384,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_rescale": true,
|
| 5 |
+
"do_resize": true,
|
| 6 |
+
"image_mean": [
|
| 7 |
+
0.5,
|
| 8 |
+
0.5,
|
| 9 |
+
0.5
|
| 10 |
+
],
|
| 11 |
+
"image_processor_type": "SiglipImageProcessor",
|
| 12 |
+
"image_std": [
|
| 13 |
+
0.5,
|
| 14 |
+
0.5,
|
| 15 |
+
0.5
|
| 16 |
+
],
|
| 17 |
+
"processor_class": "SiglipProcessor",
|
| 18 |
+
"resample": 3,
|
| 19 |
+
"rescale_factor": 0.00392156862745098,
|
| 20 |
+
"size": {
|
| 21 |
+
"height": 384,
|
| 22 |
+
"width": 384
|
| 23 |
+
}
|
| 24 |
+
}
|
vision_tower/pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aa2e8631f9074bb6806ff6790352a60a426a2f5c2da3e6bace65d2dc11bf22f2
|
| 3 |
+
size 856599050
|
vision_tower/special_tokens_map.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"eos_token": {
|
| 3 |
+
"content": "</s>",
|
| 4 |
+
"lstrip": true,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": true,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"pad_token": {
|
| 10 |
+
"content": "</s>",
|
| 11 |
+
"lstrip": true,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": true,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"unk_token": {
|
| 17 |
+
"content": "<unk>",
|
| 18 |
+
"lstrip": true,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": true,
|
| 21 |
+
"single_word": false
|
| 22 |
+
}
|
| 23 |
+
}
|
vision_tower/spiece.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1e5036bed065526c3c212dfbe288752391797c4bb1a284aa18c9a0b23fcaf8ec
|
| 3 |
+
size 798330
|
vision_tower/tokenizer_config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"1": {
|
| 4 |
+
"content": "</s>",
|
| 5 |
+
"lstrip": true,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": true,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"2": {
|
| 12 |
+
"content": "<unk>",
|
| 13 |
+
"lstrip": true,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": true,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
}
|
| 19 |
+
},
|
| 20 |
+
"additional_special_tokens": [],
|
| 21 |
+
"clean_up_tokenization_spaces": true,
|
| 22 |
+
"do_lower_case": true,
|
| 23 |
+
"eos_token": "</s>",
|
| 24 |
+
"model_input_names": [
|
| 25 |
+
"input_ids"
|
| 26 |
+
],
|
| 27 |
+
"model_max_length": 64,
|
| 28 |
+
"pad_token": "</s>",
|
| 29 |
+
"processor_class": "SiglipProcessor",
|
| 30 |
+
"sp_model_kwargs": {},
|
| 31 |
+
"tokenizer_class": "SiglipTokenizer",
|
| 32 |
+
"unk_token": "<unk>"
|
| 33 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|