End of training
Browse files- README.md +3 -1
- chat_template.json +3 -0
- config.json +1 -1
- preprocessor_config.json +29 -0
- tokenizer_config.json +1 -0
README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen2-VL-2B-Instruct
|
|
|
|
| 3 |
library_name: transformers
|
| 4 |
model_name: Qwen2-VL-2B-Instruct-SFT
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- trl
|
| 8 |
- sft
|
| 9 |
licence: license
|
|
@@ -11,7 +13,7 @@ licence: license
|
|
| 11 |
|
| 12 |
# Model Card for Qwen2-VL-2B-Instruct-SFT
|
| 13 |
|
| 14 |
-
This model is a fine-tuned version of [Qwen/Qwen2-VL-2B-Instruct](https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct).
|
| 15 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
## Quick start
|
|
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen2-VL-2B-Instruct
|
| 3 |
+
datasets: datasets/my_custom_dataset
|
| 4 |
library_name: transformers
|
| 5 |
model_name: Qwen2-VL-2B-Instruct-SFT
|
| 6 |
tags:
|
| 7 |
- generated_from_trainer
|
| 8 |
+
- R1-V
|
| 9 |
- trl
|
| 10 |
- sft
|
| 11 |
licence: license
|
|
|
|
| 13 |
|
| 14 |
# Model Card for Qwen2-VL-2B-Instruct-SFT
|
| 15 |
|
| 16 |
+
This model is a fine-tuned version of [Qwen/Qwen2-VL-2B-Instruct](https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct) on the [datasets/my_custom_dataset](https://huggingface.co/datasets/datasets/my_custom_dataset) dataset.
|
| 17 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 18 |
|
| 19 |
## Quick start
|
chat_template.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"chat_template": "{% set image_count = namespace(value=0) %}{% set video_count = namespace(value=0) %}{% for message in messages %}{% if loop.first and message['role'] != 'system' %}<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n{% endif %}<|im_start|>{{ message['role'] }}\n{% if message['content'] is string %}{{ message['content'] }}<|im_end|>\n{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' or 'image' in content or 'image_url' in content %}{% set image_count.value = image_count.value + 1 %}{% if add_vision_id %}Picture {{ image_count.value }}: {% endif %}<|vision_start|><|image_pad|><|vision_end|>{% elif content['type'] == 'video' or 'video' in content %}{% set video_count.value = video_count.value + 1 %}{% if add_vision_id %}Video {{ video_count.value }}: {% endif %}<|vision_start|><|video_pad|><|vision_end|>{% elif 'text' in content %}{{ content['text'] }}{% endif %}{% endfor %}<|im_end|>\n{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant\n{% endif %}"
|
| 3 |
+
}
|
config.json
CHANGED
|
@@ -32,7 +32,7 @@
|
|
| 32 |
"tie_word_embeddings": true,
|
| 33 |
"torch_dtype": "bfloat16",
|
| 34 |
"transformers_version": "4.49.0",
|
| 35 |
-
"use_cache":
|
| 36 |
"use_sliding_window": false,
|
| 37 |
"video_token_id": 151656,
|
| 38 |
"vision_config": {
|
|
|
|
| 32 |
"tie_word_embeddings": true,
|
| 33 |
"torch_dtype": "bfloat16",
|
| 34 |
"transformers_version": "4.49.0",
|
| 35 |
+
"use_cache": true,
|
| 36 |
"use_sliding_window": false,
|
| 37 |
"video_token_id": 151656,
|
| 38 |
"vision_config": {
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_convert_rgb": true,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_rescale": true,
|
| 5 |
+
"do_resize": true,
|
| 6 |
+
"image_mean": [
|
| 7 |
+
0.48145466,
|
| 8 |
+
0.4578275,
|
| 9 |
+
0.40821073
|
| 10 |
+
],
|
| 11 |
+
"image_processor_type": "Qwen2VLImageProcessor",
|
| 12 |
+
"image_std": [
|
| 13 |
+
0.26862954,
|
| 14 |
+
0.26130258,
|
| 15 |
+
0.27577711
|
| 16 |
+
],
|
| 17 |
+
"max_pixels": 12845056,
|
| 18 |
+
"merge_size": 2,
|
| 19 |
+
"min_pixels": 3136,
|
| 20 |
+
"patch_size": 14,
|
| 21 |
+
"processor_class": "Qwen2VLProcessor",
|
| 22 |
+
"resample": 3,
|
| 23 |
+
"rescale_factor": 0.00392156862745098,
|
| 24 |
+
"size": {
|
| 25 |
+
"longest_edge": 12845056,
|
| 26 |
+
"shortest_edge": 3136
|
| 27 |
+
},
|
| 28 |
+
"temporal_patch_size": 2
|
| 29 |
+
}
|
tokenizer_config.json
CHANGED
|
@@ -138,6 +138,7 @@
|
|
| 138 |
"model_max_length": 32768,
|
| 139 |
"pad_token": "<|endoftext|>",
|
| 140 |
"padding_side": "left",
|
|
|
|
| 141 |
"split_special_tokens": false,
|
| 142 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 143 |
"unk_token": null
|
|
|
|
| 138 |
"model_max_length": 32768,
|
| 139 |
"pad_token": "<|endoftext|>",
|
| 140 |
"padding_side": "left",
|
| 141 |
+
"processor_class": "Qwen2VLProcessor",
|
| 142 |
"split_special_tokens": false,
|
| 143 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 144 |
"unk_token": null
|