From 66faed8bbd8899ba034d8cbd8731e806e0a0a750 Mon Sep 17 00:00:00 2001 From: ModelHub XC Date: Mon, 12 Oct 2026 13:13:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=EF=BC=8C=E7=94=B1ModelHub=20XC=E7=A4=BE=E5=8C=BA=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Model: xdcaxy2013/S1-Parser Source: Original Platform --- .gitattributes | 54 +++++++++ README.md | 184 +++++++++++++++++++++++++++++ added_tokens.json | 24 ++++ chat_template.jinja | 7 ++ config.json | 147 +++++++++++++++++++++++ configuration.json | 1 + fig1.png | 3 + generation_config.json | 15 +++ merges.txt | 3 + model.safetensors | 3 + preprocessor_config.json | 29 +++++ special_tokens_map.json | 31 +++++ tokenizer.json | 3 + tokenizer_config.json | 210 +++++++++++++++++++++++++++++++++ video_preprocessor_config.json | 43 +++++++ vocab.json | 3 + 16 files changed, 760 insertions(+) create mode 100644 .gitattributes create mode 100644 README.md create mode 100644 added_tokens.json create mode 100644 chat_template.jinja create mode 100644 config.json create mode 100644 configuration.json create mode 100644 fig1.png create mode 100644 generation_config.json create mode 100644 merges.txt create mode 100644 model.safetensors create mode 100644 preprocessor_config.json create mode 100644 special_tokens_map.json create mode 100644 tokenizer.json create mode 100644 tokenizer_config.json create mode 100644 video_preprocessor_config.json create mode 100644 vocab.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9223fad --- /dev/null +++ b/.gitattributes @@ -0,0 +1,54 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bin.* filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zstandard filter=lfs diff=lfs merge=lfs -text +*.tfevents* filter=lfs diff=lfs merge=lfs -text +*.db* filter=lfs diff=lfs merge=lfs -text +*.ark* filter=lfs diff=lfs merge=lfs -text +**/*ckpt*data* filter=lfs diff=lfs merge=lfs -text +**/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text +**/*ckpt*.index filter=lfs diff=lfs merge=lfs -text + +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.gguf* filter=lfs diff=lfs merge=lfs -text +*.ggml filter=lfs diff=lfs merge=lfs -text +*.llamafile* filter=lfs diff=lfs merge=lfs -text +*.pt2 filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text + +vocab.json filter=lfs diff=lfs merge=lfs -text +tokenizer.json filter=lfs diff=lfs merge=lfs -text +merges.txt filter=lfs diff=lfs merge=lfs -text +model.safetensors filter=lfs diff=lfs merge=lfs -text + +fig1.png filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..40f054b --- /dev/null +++ b/README.md @@ -0,0 +1,184 @@ +--- +frameworks: +- Pytorch +license: Apache License 2.0 +tags: [] +tasks: +- image-text-to-text + +#model-type: +##如 gpt、phi、llama、chatglm、baichuan 等 +#- gpt + +#domain: +##如 nlp、cv、audio、multi-modal +#- nlp + +#language: +##语言代码列表 https://help.aliyun.com/document_detail/215387.html?spm=a2c4g.11186623.0.0.9f8d7467kni6Aa +#- cn + +#metrics: +##如 CIDEr、Blue、ROUGE 等 +#- CIDEr + +#tags: +##各种自定义,包括 pretrained、fine-tuned、instruction-tuned、RL-tuned 等训练方法和其他 +#- pretrained + +#tools: +##如 vllm、fastchat、llamacpp、AdaSeq 等 +#- vllm +--- +# 📄 S1-Parser: Efficient Multimodal Document Parsing via Structure-Semantics Fusion + + + + +## 📑 Model Description + +**S1-Parser** is a powerful and highly efficient multimodal text parsing tool anchored in a general Vision-Language Model (VLM), built through a two-stage training paradigm of Supervised Fine-Tuning (SFT) followed by Reinforcement Learning (RL). It excels at accurately and efficiently parsing complex documents, with targeted optimization for critical metrics including formula syntax correctness, symbol integrity, and structural rationality; this design seamlessly balances parsing precision and inference efficiency across diverse document types. +![framework1](./fig1.png) + +## Features +S1-Parser is built on a Transformers-driven vision-encoder-decoder architecture, tailored for multimodal text parsing tasks: + +- 🧩 **Supervised Fine-Tuning** with task-oriented ([Parse Target: Scientific Equations]) to sharpen domain adaptation. +- 🎯 **Multi-stage RL** to refine, stabilize, and accelerate the learning process in strategic of behaviors. +- 📊 Benchmarked on Scientific Literature Dataset: SCI_LLM + +The model supports both Unsloth `FastVisionModel` and Hugging Face `Qwen2_5_VLForConditionalGeneration`, enabling convenient loading and seamless integration with both the Unsloth and Transformers ecosystems. + +## 🛠️ Usage + +#### You can download the model via the following git clone or the ModelScope SDK + +Download the model via the SDK +```bash +#Install the ModelScope SDK +pip install modelscope +``` +```python +#Download the model via the SDK +from modelscope import snapshot_download +model_dir = snapshot_download('xdcaxy2013/S1-Parser') +``` + +Download the model via the Git +``` +#Download the model via the Git +git clone https://www.modelscope.cn/xdcaxy2013/S1-Parser.git +``` + +Model Loading via Unsloth `FastVisionModel` +``` +import torch +from unsloth import FastVisionModel +from transformers import AutoProcessor, AutoTokenizer + +# Core Loading Logic +model_path = "your-model-path" +device = "cuda" if torch.cuda.is_available() else "cpu" +target_dtype = torch.bfloat16 if (device == "cuda" and torch.cuda.is_bf16_supported()) else torch.float32 + +# Load the Model, Tokenizer, and Processor +model, tokenizer = FastVisionModel.from_pretrained( + model_name=model_path, + max_seq_length=1024, + load_in_4bit=False, + load_in_8bit=False, + device_map=device, + low_cpu_mem_usage=True, +) +processor = AutoProcessor.from_pretrained(model_path, use_fast=False) + +model = model.to(target_dtype).eval()# Inference Mode +``` + +Loading Based on Hugging Face `Qwen2_5_VLForConditionalGeneration` +``` +import torch +from transformers import Qwen2_5_VLForConditionalGeneration, Qwen2VLProcessor, AutoTokenizer + +# Core Loading Logic +model_path = "your-model-path" +device = "cuda" if torch.cuda.is_available() else "cpu" +target_dtype = torch.bfloat16 if (device == "cuda" and torch.cuda.is_bf16_supported()) else torch.float32 + +# Load the Model, Tokenizer, and Processor +tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True) +processor = Qwen2VLProcessor.from_pretrained(model_path, tokenizer=tokenizer, trust_remote_code=True) +model = Qwen2_5_VLForConditionalGeneration.from_pretrained( + model_path, + torch_dtype=target_dtype, + device_map=device, + low_cpu_mem_usage=True, + trust_remote_code=True +) + +model.eval() #Inference Mode +``` + +Our model supports the parsing of PDF and image formats (JPG, PNG, etc.), the following is an image data loading example program, compatible with JPG/PNG formats. +``` +import torch +from PIL import Image + +# Core data loading logic (image + prompt) +def load_data(image_path: str, prompt: str, processor) -> dict: + # Load and preprocess image (JPG/PNG compatible) + image = Image.open(image_path).convert("RGB") + + # Build model-compatible input template (text + image) + messages = [ + { + "role": "user", + "content": [ + {"type": "text", "text": prompt}, + {"type": "image_url", "image_url": {"url": "dummy"}} # Dummy placeholder; actual image passed via processor + ] + } + ] + + # Generate model input text with chat template + text_input = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) + + # Process into model-acceptable tensor inputs + inputs = processor( + text=[text_input], + images=[image], + padding=True, + return_tensors="pt", + torch_dtype=torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float32 + ).to("cuda" if torch.cuda.is_available() else "cpu") + + return inputs +``` + +Please refer to our [GitHub repository](https://github.com/ScienceOne-AI/S1-Parser) for detailed usage. + +## License + +This model is licensed under the MIT License. This licensing and usage framework balances openness and accountability, making S1-Parser accessible for both academic exploration and practical application while protecting the rights of the original developers. + +## Citation +``` +@software{s1parser2025, + author = {ScienceOne Team}, + title = {S1-Parser Technical Report}, + year = {2025}, + url = {https://github.com/ScienceOne-AI/S1-Parser}, + publisher = {GitHub} +} +``` + +## Acknowledgements + +We would like to acknowledge several open-source projects that this model is built upon, as they have provided valuable foundations, inspiration for our work: + +- [Qwen2.5-VL](https://github.com/QwenLM/Qwen2.5-VL) +- [olmOCR](https://github.com/allenai/olmocr) +- [MonkeyOCR](https://github.com/Yuliang-Liu/MonkeyOCR) +- [MistralOCR](https://mistral.ai/news/mistral-ocr) +- [Dolphin](https://github.com/ByteDance/Dolphin.git) +

如果您是本模型的贡献者,我们邀请您根据模型贡献文档,及时完善模型卡片内容。

\ No newline at end of file diff --git a/added_tokens.json b/added_tokens.json new file mode 100644 index 0000000..482ced4 --- /dev/null +++ b/added_tokens.json @@ -0,0 +1,24 @@ +{ + "": 151658, + "": 151657, + "<|box_end|>": 151649, + "<|box_start|>": 151648, + "<|endoftext|>": 151643, + "<|file_sep|>": 151664, + "<|fim_middle|>": 151660, + "<|fim_pad|>": 151662, + "<|fim_prefix|>": 151659, + "<|fim_suffix|>": 151661, + "<|im_end|>": 151645, + "<|im_start|>": 151644, + "<|image_pad|>": 151655, + "<|object_ref_end|>": 151647, + "<|object_ref_start|>": 151646, + "<|quad_end|>": 151651, + "<|quad_start|>": 151650, + "<|repo_name|>": 151663, + "<|video_pad|>": 151656, + "<|vision_end|>": 151653, + "<|vision_pad|>": 151654, + "<|vision_start|>": 151652 +} diff --git a/chat_template.jinja b/chat_template.jinja new file mode 100644 index 0000000..6c22663 --- /dev/null +++ b/chat_template.jinja @@ -0,0 +1,7 @@ +{% 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 +You are a helpful assistant.<|im_end|> +{% endif %}<|im_start|>{{ message['role'] }} +{% if message['content'] is string %}{{ message['content'] }}<|im_end|> +{% 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|> +{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant +{% endif %} \ No newline at end of file diff --git a/config.json b/config.json new file mode 100644 index 0000000..82e14b6 --- /dev/null +++ b/config.json @@ -0,0 +1,147 @@ +{ + "architectures": [ + "Qwen2_5_VLForConditionalGeneration" + ], + "attention_dropout": 0.0, + "bos_token_id": 151643, + "eos_token_id": 151645, + "hidden_act": "silu", + "hidden_size": 2048, + "image_token_id": 151655, + "initializer_range": 0.02, + "intermediate_size": 11008, + "max_position_embeddings": 128000, + "max_window_layers": 70, + "model_type": "qwen2_5_vl", + "num_attention_heads": 16, + "num_hidden_layers": 36, + "num_key_value_heads": 2, + "pad_token_id": 151643, + "pretraining_tp": 1, + "rms_norm_eps": 1e-06, + "rope_scaling": { + "mrope_section": [ + 16, + 24, + 24 + ], + "rope_type": "default", + "type": "default" + }, + "rope_theta": 1000000.0, + "sliding_window": 32768, + "text_config": { + "_name_or_path": "/home/kas/train_data_all/models/qwen2_5vl_3b/Qwen2.5-VL", + "architectures": [ + "Qwen2_5_VLForConditionalGeneration" + ], + "attention_dropout": 0.0, + "bos_token_id": 151643, + "eos_token_id": 151645, + "hidden_act": "silu", + "hidden_size": 2048, + "image_token_id": null, + "initializer_range": 0.02, + "intermediate_size": 11008, + "layer_types": [ + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention" + ], + "max_position_embeddings": 128000, + "max_window_layers": 70, + "model_type": "qwen2_5_vl_text", + "num_attention_heads": 16, + "num_hidden_layers": 36, + "num_key_value_heads": 2, + "rms_norm_eps": 1e-06, + "rope_scaling": { + "mrope_section": [ + 16, + 24, + 24 + ], + "rope_type": "default", + "type": "default" + }, + "rope_theta": 1000000.0, + "sliding_window": null, + "tie_word_embeddings": true, + "torch_dtype": "bfloat16", + "use_cache": false, + "use_sliding_window": false, + "video_token_id": null, + "vision_end_token_id": 151653, + "vision_start_token_id": 151652, + "vision_token_id": 151654, + "vocab_size": 151936 + }, + "torch_dtype": "bfloat16", + "transformers_version": "4.55.0", + "unsloth_version": "2025.8.1", + "use_cache": true, + "use_sliding_window": false, + "video_token_id": 151656, + "vision_config": { + "depth": 32, + "fullatt_block_indexes": [ + 7, + 15, + 23, + 31 + ], + "hidden_act": "silu", + "hidden_size": 1280, + "in_channels": 3, + "in_chans": 3, + "initializer_range": 0.02, + "intermediate_size": 3420, + "model_type": "qwen2_5_vl", + "num_heads": 16, + "out_hidden_size": 2048, + "patch_size": 14, + "spatial_merge_size": 2, + "spatial_patch_size": 14, + "temporal_patch_size": 2, + "tokens_per_second": 2, + "torch_dtype": "bfloat16", + "window_size": 112 + }, + "vision_end_token_id": 151653, + "vision_start_token_id": 151652, + "vision_token_id": 151654, + "vocab_size": 151936 +} diff --git a/configuration.json b/configuration.json new file mode 100644 index 0000000..3a6d425 --- /dev/null +++ b/configuration.json @@ -0,0 +1 @@ +{"framework":"Pytorch","task":"image-text-to-text"} \ No newline at end of file diff --git a/fig1.png b/fig1.png new file mode 100644 index 0000000..f1c08d9 --- /dev/null +++ b/fig1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b169fb74d9aa9be1da57c290cc580665b30167441e07b47ba6c8221120ad3082 +size 263383 diff --git a/generation_config.json b/generation_config.json new file mode 100644 index 0000000..ed79cd3 --- /dev/null +++ b/generation_config.json @@ -0,0 +1,15 @@ +{ + "bos_token_id": 151643, + "do_sample": true, + "eos_token_id": [ + 151645, + 151643 + ], + "max_length": 128000, + "pad_token_id": 151643, + "repetition_penalty": 1.05, + "temperature": 0.1, + "top_k": 1, + "top_p": 0.001, + "transformers_version": "4.55.0" +} diff --git a/merges.txt b/merges.txt new file mode 100644 index 0000000..80c1a19 --- /dev/null +++ b/merges.txt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5 +size 1671853 diff --git a/model.safetensors b/model.safetensors new file mode 100644 index 0000000..e1b8ab8 --- /dev/null +++ b/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c86993bf50e18298dd5462d80fb8acf170863d275b419d33328962e15fc16b1e +size 7982190456 diff --git a/preprocessor_config.json b/preprocessor_config.json new file mode 100644 index 0000000..ee08cdd --- /dev/null +++ b/preprocessor_config.json @@ -0,0 +1,29 @@ +{ + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.48145466, + 0.4578275, + 0.40821073 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.26862954, + 0.26130258, + 0.27577711 + ], + "max_pixels": 12845056, + "merge_size": 2, + "min_pixels": 3136, + "patch_size": 14, + "processor_class": "Qwen2_5_VLProcessor", + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 12845056, + "shortest_edge": 3136 + }, + "temporal_patch_size": 2 +} diff --git a/special_tokens_map.json b/special_tokens_map.json new file mode 100644 index 0000000..ac23c0a --- /dev/null +++ b/special_tokens_map.json @@ -0,0 +1,31 @@ +{ + "additional_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "eos_token": { + "content": "<|im_end|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + }, + "pad_token": { + "content": "<|endoftext|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false + } +} diff --git a/tokenizer.json b/tokenizer.json new file mode 100644 index 0000000..51ebb3b --- /dev/null +++ b/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa +size 11421896 diff --git a/tokenizer_config.json b/tokenizer_config.json new file mode 100644 index 0000000..15523bb --- /dev/null +++ b/tokenizer_config.json @@ -0,0 +1,210 @@ +{ + "add_bos_token": false, + "add_prefix_space": false, + "added_tokens_decoder": { + "151643": { + "content": "<|endoftext|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151644": { + "content": "<|im_start|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151645": { + "content": "<|im_end|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151646": { + "content": "<|object_ref_start|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151647": { + "content": "<|object_ref_end|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151648": { + "content": "<|box_start|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151649": { + "content": "<|box_end|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151650": { + "content": "<|quad_start|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151651": { + "content": "<|quad_end|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151652": { + "content": "<|vision_start|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151653": { + "content": "<|vision_end|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151654": { + "content": "<|vision_pad|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151655": { + "content": "<|image_pad|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151656": { + "content": "<|video_pad|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "151657": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151658": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151659": { + "content": "<|fim_prefix|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151660": { + "content": "<|fim_middle|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151661": { + "content": "<|fim_suffix|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151662": { + "content": "<|fim_pad|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151663": { + "content": "<|repo_name|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + }, + "151664": { + "content": "<|file_sep|>", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": false + } + }, + "additional_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": {}, + "model_max_length": 8196, + "pad_token": "<|endoftext|>", + "padding_side": "right", + "processor_class": "Qwen2_5_VLProcessor", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null, + "use_fast": false +} diff --git a/video_preprocessor_config.json b/video_preprocessor_config.json new file mode 100644 index 0000000..6662e15 --- /dev/null +++ b/video_preprocessor_config.json @@ -0,0 +1,43 @@ +{ + "crop_size": null, + "data_format": "channels_first", + "default_to_square": true, + "device": null, + "do_center_crop": null, + "do_convert_rgb": true, + "do_normalize": true, + "do_pad": null, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": false, + "fps": null, + "image_mean": [ + 0.48145466, + 0.4578275, + 0.40821073 + ], + "image_std": [ + 0.26862954, + 0.26130258, + 0.27577711 + ], + "input_data_format": null, + "max_frames": 768, + "max_pixels": 12845056, + "merge_size": 2, + "min_frames": 4, + "min_pixels": 3136, + "num_frames": null, + "patch_size": 14, + "processor_class": "Qwen2_5_VLProcessor", + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 12845056, + "shortest_edge": 3136 + }, + "size_divisor": null, + "temporal_patch_size": 2, + "video_metadata": null, + "video_processor_type": "Qwen2VLVideoProcessor" +} diff --git a/vocab.json b/vocab.json new file mode 100644 index 0000000..4e0f3ff --- /dev/null +++ b/vocab.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a257b04b17642a0688c98cd1df89c398bda4fee532d6f88b38a659ecb4ac8d +size 3383407