keentomato commited on
Commit
95c9918
·
verified ·
1 Parent(s): 01ac2fa

Upload SFT checkpoint step=484

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* 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
 
 
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
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: apache-2.0
4
+ tags:
5
+ - human-behavior
6
+ - multimodal
7
+ - qwen2.5-omni
8
+ - sarcasm-detection
9
+ - sarcasm
10
+ datasets:
11
+ - keentomato/human_behavior_atlas
12
+ ---
13
+
14
+ # OmniSapiens BAM — Sarcasm Detection
15
+
16
+ Fine-tuned [Qwen2.5-Omni-7B](https://huggingface.co/Qwen/Qwen2.5-Omni-7B) for multimodal sarcasm detection on the MUStARD/MMSD benchmark. Uses LoRA adapters merged into the backbone and a lightweight classification head.
17
+
18
+ ## Benchmark
19
+ Evaluated on [keentomato/human_behavior_atlas](https://huggingface.co/datasets/keentomato/human_behavior_atlas).
20
+
21
+ ## Usage
22
+
23
+ ### Installation
24
+ ```bash
25
+ pip install transformers torch huggingface_hub
26
+ ```
27
+
28
+ ### Classification
29
+
30
+ ```python
31
+ import json, torch
32
+ from huggingface_hub import hf_hub_download
33
+ from transformers import Qwen2_5OmniThinkerForConditionalGeneration, AutoProcessor
34
+
35
+ MODEL_ID = "keentomato/omnisapiens_bam_sarcasm_detection"
36
+
37
+ # 1. Load backbone and processor
38
+ model = Qwen2_5OmniThinkerForConditionalGeneration.from_pretrained(
39
+ MODEL_ID, torch_dtype=torch.float16, device_map="auto"
40
+ )
41
+ processor = AutoProcessor.from_pretrained(MODEL_ID)
42
+
43
+ # 2. Load classification heads and label scheme
44
+ heads_path = hf_hub_download(MODEL_ID, "heads.bin")
45
+ label_path = hf_hub_download(MODEL_ID, "label_scheme.json")
46
+ heads_sd = torch.load(heads_path, map_location="cpu")
47
+ with open(label_path) as f:
48
+ label_scheme = json.load(f)
49
+
50
+ # 3. Reconstruct domain heads
51
+ global_classes = label_scheme["meta"]["global_classes"] # {domain: [{index, label}, ...]}
52
+ hidden_size = model.config.hidden_size
53
+ domain_names = list(global_classes.keys())
54
+ domain_heads = torch.nn.ModuleList([
55
+ torch.nn.Linear(hidden_size, len(global_classes[d])) for d in domain_names
56
+ ])
57
+ domain_heads.load_state_dict({k.replace("heads.", ""): v for k, v in heads_sd.items()})
58
+ domain_heads.eval().to(model.device).to(torch.float16)
59
+ domain_to_id = {d: i for i, d in enumerate(domain_names)}
60
+
61
+ # 4. Prepare multimodal inputs
62
+ # video_tensor: [T, C, H, W] tensor or list of PIL images
63
+ # audio_waveform: 1-D numpy array / tensor at 16 kHz
64
+ domain = "sarcasm"
65
+ messages = [{"role": "user", "content": [
66
+ {"type": "video"},
67
+ {"type": "audio"},
68
+ {"type": "text", "text": "Classify the human behavior expressed."},
69
+ ]}]
70
+ text = processor.apply_chat_template(messages, add_generation_prompt=False, tokenize=False)
71
+ inputs = processor(text=[text], videos=[video_tensor], audio=[audio_waveform], return_tensors="pt")
72
+ inputs = {k: v.to(model.device) for k, v in inputs.items()}
73
+
74
+ # 5. Forward pass — pool penultimate hidden layer, route through domain head
75
+ with torch.no_grad():
76
+ out = model(**inputs, output_hidden_states=True, use_cache=False)
77
+ h = out.hidden_states[-2] # [B, T, H]
78
+ mask = inputs["attention_mask"].unsqueeze(-1).float()
79
+ pooled = (h * mask).sum(1) / mask.sum(1) # [B, H]
80
+ logits = domain_heads[domain_to_id[domain]](pooled.float()) # [B, K_d]
81
+ pred_idx = logits.argmax(dim=-1).item()
82
+
83
+ label_name = global_classes[domain][pred_idx]["label"]
84
+ print(f"Predicted {domain}: {label_name}")
85
+ ```
86
+
87
+ ### Behavioral Descriptors (BAM Adapters)
88
+
89
+ As `adapters.bin` is present in the repo, the model supports side-channel
90
+ behavioral descriptors extracted from OpenPose (video) and OpenSmile (audio).
91
+ These replace the raw video/audio inputs to the backbone with pre-computed
92
+ behavioral feature vectors that are injected via lightweight MLP adapters.
93
+
94
+ **Video — OpenPose keypoints**
95
+
96
+ OpenPose produces a dict per clip with keys `pose`, `face`, `left_hand`, `right_hand`,
97
+ each a `[T, K, 2or3]` tensor (T frames, K keypoints, x/y/conf).
98
+
99
+ ```python
100
+ def prepare_video_feats(openpose_dict, temporal_mode="meanstd"):
101
+ """OpenPose dict → pooled feature vector [D_v_pooled]."""
102
+ parts = []
103
+ for key in ("pose", "face", "left_hand", "right_hand"):
104
+ t = openpose_dict.get(key) # [T, K, 2or3]
105
+ if t is None: continue
106
+ t = torch.as_tensor(t).float()[..., :2] # drop confidence, keep x/y
107
+ parts.append(t.reshape(t.shape[0], -1)) # [T, K*2]
108
+ seq = torch.cat(parts, dim=-1).float() # [T, D_v]
109
+ if temporal_mode == "meanstd":
110
+ return torch.cat([seq.mean(0), seq.std(0)]) # [D_v*2]
111
+ return seq.mean(0) # [D_v]
112
+
113
+ video_feats = prepare_video_feats(openpose_dict).unsqueeze(0) # [1, D_v_pooled]
114
+ ```
115
+
116
+ **Audio — OpenSmile features**
117
+
118
+ OpenSmile produces a dict with key `features` → `[T, D_a]` or `[D_a]`.
119
+
120
+ ```python
121
+ def prepare_audio_feats(opensmile_dict):
122
+ """OpenSmile dict → L2-normalised feature vector [D_a]."""
123
+ x = torch.as_tensor(opensmile_dict["features"]).float()
124
+ if x.ndim == 2: x = x.squeeze(0) # [D_a] (single frame assumed)
125
+ return x / x.norm(p=2).clamp_min(1e-6)
126
+
127
+ audio_feats = prepare_audio_feats(opensmile_dict).unsqueeze(0) # [1, D_a]
128
+ ```
129
+
130
+ **Loading and applying the adapters**
131
+
132
+ ```python
133
+ import torch, torch.nn as nn
134
+ from huggingface_hub import hf_hub_download
135
+
136
+ adapters_sd = torch.load(hf_hub_download(MODEL_ID, "adapters.bin"), map_location="cpu")
137
+
138
+ # Infer architecture from saved weight shapes — no config needed
139
+ def _make_adapter(prefix, sd):
140
+ w0 = sd[f"{prefix}.mlp.0.weight"] # [hidden, feat_dim]
141
+ w2 = sd[f"{prefix}.mlp.2.weight"] # [out_dim, hidden]
142
+ feat_dim, hidden, out_dim = w0.shape[1], w0.shape[0], w2.shape[0]
143
+ mlp = nn.Sequential(nn.Linear(feat_dim, hidden), nn.ReLU(), nn.Linear(hidden, out_dim))
144
+ alpha = nn.Parameter(sd[f"{prefix}.alpha"])
145
+ class _Adapter(nn.Module):
146
+ def __init__(self): super().__init__(); self.mlp = mlp; self.alpha = alpha
147
+ def forward(self, x): return self.mlp(x) * self.alpha
148
+ m = _Adapter()
149
+ m.load_state_dict({k[len(prefix)+1:]: v for k, v in sd.items() if k.startswith(prefix)}, strict=False)
150
+ return m.eval()
151
+
152
+ video_adapter = _make_adapter("video_adapter", adapters_sd).to(model.device).half()
153
+ audio_adapter = _make_adapter("audio_adapter", adapters_sd).to(model.device).half()
154
+
155
+ # Augment pooled repr with BAM deltas before the classification head
156
+ with torch.no_grad():
157
+ out = model(**inputs, output_hidden_states=True, use_cache=False)
158
+ h = out.hidden_states[-2]
159
+ mask = inputs["attention_mask"].unsqueeze(-1).float()
160
+ pooled = (h * mask).sum(1) / mask.sum(1) # [B, H]
161
+ pooled = pooled + video_adapter(video_feats.to(model.device).half())
162
+ pooled = pooled + audio_adapter(audio_feats.to(model.device).half())
163
+ logits = domain_heads[domain_to_id[domain]](pooled.float())
164
+ pred_idx = logits.argmax(dim=-1).item()
165
+
166
+ label_name = global_classes[domain][pred_idx]["label"]
167
+ print(f"Predicted {domain}: {label_name}")
168
+ ```
adapters.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b623a6887358ddbf98f7b9599c702e5d877000183088e0fa799475a2aebbebf6
3
+ size 27584645
added_tokens.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</tool_call>": 151658,
3
+ "<tool_call>": 151657,
4
+ "<|AUDIO|>": 151646,
5
+ "<|IMAGE|>": 151655,
6
+ "<|VIDEO|>": 151656,
7
+ "<|audio_bos|>": 151647,
8
+ "<|audio_eos|>": 151648,
9
+ "<|box_end|>": 151649,
10
+ "<|endoftext|>": 151643,
11
+ "<|file_sep|>": 151664,
12
+ "<|fim_middle|>": 151660,
13
+ "<|fim_pad|>": 151662,
14
+ "<|fim_prefix|>": 151659,
15
+ "<|fim_suffix|>": 151661,
16
+ "<|im_end|>": 151645,
17
+ "<|im_start|>": 151644,
18
+ "<|quad_end|>": 151651,
19
+ "<|quad_start|>": 151650,
20
+ "<|repo_name|>": 151663,
21
+ "<|vision_bos|>": 151652,
22
+ "<|vision_eos|>": 151653,
23
+ "<|vision_pad|>": 151654
24
+ }
chat_template.jinja ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {% set audio_count = namespace(value=0) %}{% 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
2
+ You are a helpful assistant.<|im_end|>
3
+ {% endif %}<|im_start|>{{ message['role'] }}
4
+ {% if message['content'] is string %}{{ message['content'] }}<|im_end|>
5
+ {% 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_bos|><|IMAGE|><|vision_eos|>{% elif content['type'] == 'audio' or 'audio' in content or 'audio_url' in content %}{% set audio_count.value = audio_count.value + 1 %}{% if add_audio_id %}Audio {{ audio_count.value }}: {% endif %}<|audio_bos|><|AUDIO|><|audio_eos|>{% 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_bos|><|VIDEO|><|vision_eos|>{% elif 'text' in content %}{{ content['text'] }}{% endif %}{% endfor %}<|im_end|>
6
+ {% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant
7
+ {% endif %}
config.json ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_attn_implementation_autoset": true,
3
+ "architectures": [
4
+ "Qwen2_5OmniThinkerForConditionalGeneration"
5
+ ],
6
+ "audio_config": {
7
+ "_attn_implementation_autoset": true,
8
+ "activation_dropout": 0.0,
9
+ "activation_function": "gelu",
10
+ "attention_dropout": 0.0,
11
+ "d_model": 1280,
12
+ "dropout": 0.0,
13
+ "encoder_attention_heads": 20,
14
+ "encoder_ffn_dim": 5120,
15
+ "encoder_layerdrop": 0.0,
16
+ "encoder_layers": 32,
17
+ "init_std": 0.02,
18
+ "initializer_range": 0.02,
19
+ "max_source_positions": 1500,
20
+ "model_type": "qwen2_5_omni_audio_encoder",
21
+ "n_window": 100,
22
+ "num_hidden_layers": 32,
23
+ "num_mel_bins": 128,
24
+ "output_dim": 3584,
25
+ "scale_embedding": false,
26
+ "torch_dtype": "float16"
27
+ },
28
+ "audio_end_token_id": 151648,
29
+ "audio_start_token_id": 151647,
30
+ "audio_token_index": 151646,
31
+ "bos_token_id": 151644,
32
+ "eos_token_id": 151645,
33
+ "ignore_index": -100,
34
+ "image_token_index": 151655,
35
+ "init_std": 0.02,
36
+ "initializer_range": 0.02,
37
+ "model_type": "qwen2_5_omni_thinker",
38
+ "pad_token_id": 151643,
39
+ "position_id_per_seconds": 25,
40
+ "seconds_per_chunk": 2,
41
+ "text_config": {
42
+ "attention_dropout": 0.0,
43
+ "hidden_act": "silu",
44
+ "hidden_size": 3584,
45
+ "init_std": 0.02,
46
+ "initializer_range": 0.02,
47
+ "intermediate_size": 18944,
48
+ "layer_types": [
49
+ "full_attention",
50
+ "full_attention",
51
+ "full_attention",
52
+ "full_attention",
53
+ "full_attention",
54
+ "full_attention",
55
+ "full_attention",
56
+ "full_attention",
57
+ "full_attention",
58
+ "full_attention",
59
+ "full_attention",
60
+ "full_attention",
61
+ "full_attention",
62
+ "full_attention",
63
+ "full_attention",
64
+ "full_attention",
65
+ "full_attention",
66
+ "full_attention",
67
+ "full_attention",
68
+ "full_attention",
69
+ "full_attention",
70
+ "full_attention",
71
+ "full_attention",
72
+ "full_attention",
73
+ "full_attention",
74
+ "full_attention",
75
+ "full_attention",
76
+ "full_attention"
77
+ ],
78
+ "max_position_embeddings": 32768,
79
+ "max_window_layers": 28,
80
+ "model_type": "qwen2_5_omni_text",
81
+ "num_attention_heads": 28,
82
+ "num_hidden_layers": 28,
83
+ "num_key_value_heads": 4,
84
+ "rms_norm_eps": 1e-06,
85
+ "rope_scaling": {
86
+ "mrope_section": [
87
+ 16,
88
+ 24,
89
+ 24
90
+ ],
91
+ "rope_type": "default",
92
+ "type": "default"
93
+ },
94
+ "rope_theta": 1000000.0,
95
+ "sliding_window": null,
96
+ "torch_dtype": "float16",
97
+ "use_cache": true,
98
+ "use_sliding_window": false,
99
+ "vocab_size": 152064
100
+ },
101
+ "torch_dtype": "float16",
102
+ "transformers_version": "4.55.2",
103
+ "user_token_id": 872,
104
+ "video_token_index": 151656,
105
+ "vision_config": {
106
+ "_attn_implementation_autoset": true,
107
+ "depth": 32,
108
+ "embed_dim": 1280,
109
+ "fullatt_block_indexes": [
110
+ 7,
111
+ 15,
112
+ 23,
113
+ 31
114
+ ],
115
+ "hidden_act": "silu",
116
+ "hidden_size": 1280,
117
+ "in_channels": 3,
118
+ "in_chans": 3,
119
+ "init_std": 0.02,
120
+ "initializer_range": 0.02,
121
+ "intermediate_size": 3420,
122
+ "model_type": "qwen2_5_omni_vision_encoder",
123
+ "num_heads": 16,
124
+ "out_hidden_size": 3584,
125
+ "patch_size": 14,
126
+ "spatial_merge_size": 2,
127
+ "spatial_patch_size": 14,
128
+ "temporal_patch_size": 2,
129
+ "tokens_per_second": 25,
130
+ "torch_dtype": "float16",
131
+ "window_size": 112
132
+ },
133
+ "vision_end_token_id": 151653,
134
+ "vision_start_token_id": 151652,
135
+ "vision_token_id": 151654
136
+ }
generation_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "transformers_version": "4.55.2"
4
+ }
heads.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0743f3b423f74b19fbaf98daf6f163e07e72dc6af39e12ac7794336bf6aa07de
3
+ size 363217
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model-00001-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b23263d80740203786a9b9848018cf9a184b831799fe63dba2f9cbd42506419
3
+ size 4985046168
model-00002-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aafa0787d313f3c71830aa2c02b6499847212a16b72851568bb83da69a801dba
3
+ size 4991495656
model-00003-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cc320a70463d10173a163ab6bfd8edc93a998721e9cf22884cffa50ad91d70c
3
+ size 4991495752
model-00004-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1f300d054c6b0640a01cb29af87c09adcd5a878fd47e04b4e4efde4cb9db467
3
+ size 2895739680
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
preprocessor_config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "chunk_length": 300,
3
+ "dither": 0.0,
4
+ "feature_extractor_type": "WhisperFeatureExtractor",
5
+ "feature_size": 128,
6
+ "hop_length": 160,
7
+ "image_mean": [
8
+ 0.48145466,
9
+ 0.4578275,
10
+ 0.40821073
11
+ ],
12
+ "image_processor_type": "Qwen2VLImageProcessor",
13
+ "image_std": [
14
+ 0.26862954,
15
+ 0.26130258,
16
+ 0.27577711
17
+ ],
18
+ "max_pixels": 12845056,
19
+ "merge_size": 2,
20
+ "min_pixels": 3136,
21
+ "n_fft": 400,
22
+ "n_samples": 4800000,
23
+ "nb_max_frames": 30000,
24
+ "padding_side": "right",
25
+ "padding_value": 0.0,
26
+ "patch_size": 14,
27
+ "processor_class": "Qwen2_5OmniProcessor",
28
+ "return_attention_mask": true,
29
+ "sampling_rate": 16000,
30
+ "temporal_patch_size": 2
31
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|AUDIO|>",
6
+ "<|audio_bos|>",
7
+ "<|audio_eos|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_bos|>",
12
+ "<|vision_eos|>",
13
+ "<|vision_pad|>",
14
+ "<|IMAGE|>",
15
+ "<|VIDEO|>"
16
+ ],
17
+ "audio_bos_token": "<|audio_bos|>",
18
+ "audio_eos_token": "<|audio_eos|>",
19
+ "audio_token": "<|AUDIO|>",
20
+ "eos_token": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false
26
+ },
27
+ "image_token": "<|IMAGE|>",
28
+ "pad_token": {
29
+ "content": "<|endoftext|>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false
34
+ },
35
+ "video_token": "<|VIDEO|>",
36
+ "vision_bos_token": "<|vision_bos|>",
37
+ "vision_eos_token": "<|vision_eos|>"
38
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8441917e39ae0244e06d704b95b3124795cec478e297f9afac39ba670d7e9d99
3
+ size 11421870
tokenizer_config.json ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "151646": {
29
+ "content": "<|AUDIO|>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "151647": {
37
+ "content": "<|audio_bos|>",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "151648": {
45
+ "content": "<|audio_eos|>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": true
51
+ },
52
+ "151649": {
53
+ "content": "<|box_end|>",
54
+ "lstrip": false,
55
+ "normalized": false,
56
+ "rstrip": false,
57
+ "single_word": false,
58
+ "special": true
59
+ },
60
+ "151650": {
61
+ "content": "<|quad_start|>",
62
+ "lstrip": false,
63
+ "normalized": false,
64
+ "rstrip": false,
65
+ "single_word": false,
66
+ "special": true
67
+ },
68
+ "151651": {
69
+ "content": "<|quad_end|>",
70
+ "lstrip": false,
71
+ "normalized": false,
72
+ "rstrip": false,
73
+ "single_word": false,
74
+ "special": true
75
+ },
76
+ "151652": {
77
+ "content": "<|vision_bos|>",
78
+ "lstrip": false,
79
+ "normalized": false,
80
+ "rstrip": false,
81
+ "single_word": false,
82
+ "special": true
83
+ },
84
+ "151653": {
85
+ "content": "<|vision_eos|>",
86
+ "lstrip": false,
87
+ "normalized": false,
88
+ "rstrip": false,
89
+ "single_word": false,
90
+ "special": true
91
+ },
92
+ "151654": {
93
+ "content": "<|vision_pad|>",
94
+ "lstrip": false,
95
+ "normalized": false,
96
+ "rstrip": false,
97
+ "single_word": false,
98
+ "special": true
99
+ },
100
+ "151655": {
101
+ "content": "<|IMAGE|>",
102
+ "lstrip": false,
103
+ "normalized": false,
104
+ "rstrip": false,
105
+ "single_word": false,
106
+ "special": true
107
+ },
108
+ "151656": {
109
+ "content": "<|VIDEO|>",
110
+ "lstrip": false,
111
+ "normalized": false,
112
+ "rstrip": false,
113
+ "single_word": false,
114
+ "special": true
115
+ },
116
+ "151657": {
117
+ "content": "<tool_call>",
118
+ "lstrip": false,
119
+ "normalized": false,
120
+ "rstrip": false,
121
+ "single_word": false,
122
+ "special": false
123
+ },
124
+ "151658": {
125
+ "content": "</tool_call>",
126
+ "lstrip": false,
127
+ "normalized": false,
128
+ "rstrip": false,
129
+ "single_word": false,
130
+ "special": false
131
+ },
132
+ "151659": {
133
+ "content": "<|fim_prefix|>",
134
+ "lstrip": false,
135
+ "normalized": false,
136
+ "rstrip": false,
137
+ "single_word": false,
138
+ "special": false
139
+ },
140
+ "151660": {
141
+ "content": "<|fim_middle|>",
142
+ "lstrip": false,
143
+ "normalized": false,
144
+ "rstrip": false,
145
+ "single_word": false,
146
+ "special": false
147
+ },
148
+ "151661": {
149
+ "content": "<|fim_suffix|>",
150
+ "lstrip": false,
151
+ "normalized": false,
152
+ "rstrip": false,
153
+ "single_word": false,
154
+ "special": false
155
+ },
156
+ "151662": {
157
+ "content": "<|fim_pad|>",
158
+ "lstrip": false,
159
+ "normalized": false,
160
+ "rstrip": false,
161
+ "single_word": false,
162
+ "special": false
163
+ },
164
+ "151663": {
165
+ "content": "<|repo_name|>",
166
+ "lstrip": false,
167
+ "normalized": false,
168
+ "rstrip": false,
169
+ "single_word": false,
170
+ "special": false
171
+ },
172
+ "151664": {
173
+ "content": "<|file_sep|>",
174
+ "lstrip": false,
175
+ "normalized": false,
176
+ "rstrip": false,
177
+ "single_word": false,
178
+ "special": false
179
+ }
180
+ },
181
+ "additional_special_tokens": [
182
+ "<|im_start|>",
183
+ "<|im_end|>",
184
+ "<|AUDIO|>",
185
+ "<|audio_bos|>",
186
+ "<|audio_eos|>",
187
+ "<|box_end|>",
188
+ "<|quad_start|>",
189
+ "<|quad_end|>",
190
+ "<|vision_bos|>",
191
+ "<|vision_eos|>",
192
+ "<|vision_pad|>",
193
+ "<|IMAGE|>",
194
+ "<|VIDEO|>"
195
+ ],
196
+ "audio_bos_token": "<|audio_bos|>",
197
+ "audio_eos_token": "<|audio_eos|>",
198
+ "audio_token": "<|AUDIO|>",
199
+ "bos_token": null,
200
+ "clean_up_tokenization_spaces": false,
201
+ "eos_token": "<|im_end|>",
202
+ "errors": "replace",
203
+ "extra_special_tokens": {
204
+ "audio_bos_token": "<|audio_bos|>",
205
+ "audio_eos_token": "<|audio_eos|>",
206
+ "audio_token": "<|AUDIO|>",
207
+ "image_token": "<|IMAGE|>",
208
+ "video_token": "<|VIDEO|>",
209
+ "vision_bos_token": "<|vision_bos|>",
210
+ "vision_eos_token": "<|vision_eos|>"
211
+ },
212
+ "image_token": "<|IMAGE|>",
213
+ "model_max_length": 32768,
214
+ "pad_token": "<|endoftext|>",
215
+ "processor_class": "Qwen2_5OmniProcessor",
216
+ "split_special_tokens": false,
217
+ "tokenizer_class": "Qwen2Tokenizer",
218
+ "unk_token": null,
219
+ "video_token": "<|VIDEO|>",
220
+ "vision_bos_token": "<|vision_bos|>",
221
+ "vision_eos_token": "<|vision_eos|>"
222
+ }
training_meta.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3,
3
+ "global_step": 484,
4
+ "len_train_dataloader": 121,
5
+ "training_strategy": "lora",
6
+ "model_order": [
7
+ "base",
8
+ "video",
9
+ "audio"
10
+ ],
11
+ "saved_at_unix": 1758161837.8391721
12
+ }
video_preprocessor_config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "chunk_length": 300,
3
+ "crop_size": null,
4
+ "data_format": "channels_first",
5
+ "default_to_square": true,
6
+ "device": null,
7
+ "dither": 0.0,
8
+ "do_center_crop": null,
9
+ "do_convert_rgb": true,
10
+ "do_normalize": true,
11
+ "do_pad": null,
12
+ "do_rescale": true,
13
+ "do_resize": true,
14
+ "do_sample_frames": false,
15
+ "feature_extractor_type": "WhisperFeatureExtractor",
16
+ "feature_size": 128,
17
+ "fps": null,
18
+ "hop_length": 160,
19
+ "image_mean": [
20
+ 0.48145466,
21
+ 0.4578275,
22
+ 0.40821073
23
+ ],
24
+ "image_std": [
25
+ 0.26862954,
26
+ 0.26130258,
27
+ 0.27577711
28
+ ],
29
+ "input_data_format": null,
30
+ "max_frames": 768,
31
+ "max_pixels": 12845056,
32
+ "merge_size": 2,
33
+ "min_frames": 4,
34
+ "min_pixels": 3136,
35
+ "n_fft": 400,
36
+ "n_samples": 4800000,
37
+ "nb_max_frames": 30000,
38
+ "num_frames": null,
39
+ "padding_side": "right",
40
+ "padding_value": 0.0,
41
+ "patch_size": 14,
42
+ "processor_class": "Qwen2_5OmniProcessor",
43
+ "resample": 3,
44
+ "rescale_factor": 0.00392156862745098,
45
+ "return_attention_mask": true,
46
+ "sampling_rate": 16000,
47
+ "size": {
48
+ "longest_edge": 12845056,
49
+ "shortest_edge": 3136
50
+ },
51
+ "size_divisor": null,
52
+ "temporal_patch_size": 2,
53
+ "video_metadata": null,
54
+ "video_processor_type": "Qwen2VLVideoProcessor"
55
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff