Spaces:
Sleeping
Sleeping
Delete files qwen3vl.py with huggingface_hub
Browse files- qwen3vl.py +0 -367
qwen3vl.py
DELETED
|
@@ -1,367 +0,0 @@
|
|
| 1 |
-
"""
|
| 2 |
-
Modified Qwen3-VL model for LoomVideo.
|
| 3 |
-
|
| 4 |
-
Extends the HuggingFace Qwen3-VL implementation to support:
|
| 5 |
-
- Per-layer hidden state extraction for cross-attention fusion with the DiT
|
| 6 |
-
- DeepStack visual feature injection across transformer layers
|
| 7 |
-
|
| 8 |
-
Reference: https://github.com/huggingface/transformers/blob/main/src/transformers/models/qwen3_vl/modeling_qwen3_vl.py
|
| 9 |
-
"""
|
| 10 |
-
|
| 11 |
-
from typing import Optional, Union
|
| 12 |
-
|
| 13 |
-
import torch
|
| 14 |
-
import torch.nn as nn
|
| 15 |
-
|
| 16 |
-
from transformers.models.qwen3_vl.modeling_qwen3_vl import (
|
| 17 |
-
Qwen3VLTextMLP,
|
| 18 |
-
Qwen3VLTextRotaryEmbedding,
|
| 19 |
-
Qwen3VLTextRMSNorm,
|
| 20 |
-
Qwen3VLTextModel,
|
| 21 |
-
Qwen3VLVisionModel,
|
| 22 |
-
Qwen3VLTextDecoderLayer,
|
| 23 |
-
Qwen3VLModel,
|
| 24 |
-
Qwen3VLForConditionalGeneration,
|
| 25 |
-
)
|
| 26 |
-
from transformers.models.qwen3_vl.configuration_qwen3_vl import (
|
| 27 |
-
Qwen3VLConfig,
|
| 28 |
-
Qwen3VLTextConfig,
|
| 29 |
-
)
|
| 30 |
-
from transformers.cache_utils import Cache, DynamicCache
|
| 31 |
-
from transformers.processing_utils import Unpack
|
| 32 |
-
from transformers.masking_utils import create_causal_mask
|
| 33 |
-
from transformers.modeling_outputs import BaseModelOutputWithPast
|
| 34 |
-
from transformers.modeling_flash_attention_utils import FlashAttentionKwargs
|
| 35 |
-
from transformers.utils import TransformersKwargs, auto_docstring, is_torchdynamo_compiling
|
| 36 |
-
from transformers.utils.generic import check_model_inputs
|
| 37 |
-
from transformers.models.qwen3_vl.modeling_qwen3_vl import Qwen3VLModelOutputWithPast, Qwen3VLCausalLMOutputWithPast
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
class Qwen3VLTextModel(Qwen3VLTextModel):
|
| 41 |
-
"""
|
| 42 |
-
Extended text model that outputs per-layer hidden states for cross-attention fusion.
|
| 43 |
-
"""
|
| 44 |
-
|
| 45 |
-
config: Qwen3VLTextConfig
|
| 46 |
-
_no_split_modules = ["Qwen3VLTextDecoderLayer"]
|
| 47 |
-
|
| 48 |
-
def __init__(self, config: Qwen3VLTextConfig):
|
| 49 |
-
super().__init__(config)
|
| 50 |
-
self.padding_idx = config.pad_token_id
|
| 51 |
-
self.vocab_size = config.vocab_size
|
| 52 |
-
|
| 53 |
-
self.embed_tokens = nn.Embedding(
|
| 54 |
-
config.vocab_size, config.hidden_size, self.padding_idx
|
| 55 |
-
)
|
| 56 |
-
self.layers = nn.ModuleList(
|
| 57 |
-
[
|
| 58 |
-
Qwen3VLTextDecoderLayer(config, layer_idx)
|
| 59 |
-
for layer_idx in range(config.num_hidden_layers)
|
| 60 |
-
]
|
| 61 |
-
)
|
| 62 |
-
self.norm = Qwen3VLTextRMSNorm(config.hidden_size, eps=config.rms_norm_eps)
|
| 63 |
-
self.rotary_emb = Qwen3VLTextRotaryEmbedding(config=config)
|
| 64 |
-
self.gradient_checkpointing = False
|
| 65 |
-
|
| 66 |
-
self.post_init()
|
| 67 |
-
|
| 68 |
-
def get_output(self, hidden_states: torch.Tensor) -> torch.Tensor:
|
| 69 |
-
"""Apply final RMSNorm to hidden states."""
|
| 70 |
-
return self.norm(hidden_states)
|
| 71 |
-
|
| 72 |
-
@check_model_inputs
|
| 73 |
-
@auto_docstring
|
| 74 |
-
def forward(
|
| 75 |
-
self,
|
| 76 |
-
input_ids: Optional[torch.LongTensor] = None,
|
| 77 |
-
attention_mask: Optional[torch.Tensor] = None,
|
| 78 |
-
position_ids: Optional[torch.LongTensor] = None,
|
| 79 |
-
past_key_values: Optional[Cache] = None,
|
| 80 |
-
inputs_embeds: Optional[torch.FloatTensor] = None,
|
| 81 |
-
use_cache: Optional[bool] = None,
|
| 82 |
-
cache_position: Optional[torch.LongTensor] = None,
|
| 83 |
-
visual_pos_masks: Optional[torch.Tensor] = None,
|
| 84 |
-
deepstack_visual_embeds: Optional[list[torch.Tensor]] = None,
|
| 85 |
-
**kwargs: Unpack[FlashAttentionKwargs],
|
| 86 |
-
) -> Union[tuple, BaseModelOutputWithPast]:
|
| 87 |
-
"""
|
| 88 |
-
Args:
|
| 89 |
-
visual_pos_masks: Mask indicating visual token positions in the sequence.
|
| 90 |
-
deepstack_visual_embeds: Per-layer visual embeddings from the vision encoder
|
| 91 |
-
for DeepStack injection (https://arxiv.org/abs/2406.04334).
|
| 92 |
-
"""
|
| 93 |
-
if (input_ids is None) ^ (inputs_embeds is not None):
|
| 94 |
-
raise ValueError("You must specify exactly one of input_ids or inputs_embeds")
|
| 95 |
-
|
| 96 |
-
if use_cache and past_key_values is None and not torch.jit.is_tracing():
|
| 97 |
-
past_key_values = DynamicCache(config=self.config)
|
| 98 |
-
|
| 99 |
-
if inputs_embeds is None:
|
| 100 |
-
inputs_embeds = self.embed_tokens(input_ids)
|
| 101 |
-
|
| 102 |
-
if cache_position is None:
|
| 103 |
-
past_seen_tokens = past_key_values.get_seq_length() if past_key_values is not None else 0
|
| 104 |
-
cache_position = torch.arange(
|
| 105 |
-
past_seen_tokens, past_seen_tokens + inputs_embeds.shape[1], device=inputs_embeds.device
|
| 106 |
-
)
|
| 107 |
-
|
| 108 |
-
# Position IDs: 3 dimensions for temporal, height, width
|
| 109 |
-
if position_ids is None:
|
| 110 |
-
position_ids = cache_position.view(1, 1, -1).expand(3, inputs_embeds.shape[0], -1)
|
| 111 |
-
elif position_ids.ndim == 2:
|
| 112 |
-
position_ids = position_ids[None, ...].expand(3, position_ids.shape[0], -1)
|
| 113 |
-
|
| 114 |
-
if position_ids.ndim == 3 and position_ids.shape[0] == 4:
|
| 115 |
-
text_position_ids = position_ids[0]
|
| 116 |
-
position_ids = position_ids[1:]
|
| 117 |
-
else:
|
| 118 |
-
text_position_ids = position_ids[0]
|
| 119 |
-
|
| 120 |
-
attention_mask = create_causal_mask(
|
| 121 |
-
config=self.config,
|
| 122 |
-
input_embeds=inputs_embeds,
|
| 123 |
-
attention_mask=attention_mask,
|
| 124 |
-
cache_position=cache_position,
|
| 125 |
-
past_key_values=past_key_values,
|
| 126 |
-
position_ids=text_position_ids,
|
| 127 |
-
)
|
| 128 |
-
|
| 129 |
-
hidden_states = inputs_embeds
|
| 130 |
-
position_embeddings = self.rotary_emb(hidden_states, position_ids)
|
| 131 |
-
|
| 132 |
-
# Collect per-layer hidden states for cross-attention with DiT
|
| 133 |
-
all_hidden_states = []
|
| 134 |
-
for layer_idx, decoder_layer in enumerate(self.layers):
|
| 135 |
-
layer_outputs = decoder_layer(
|
| 136 |
-
hidden_states,
|
| 137 |
-
attention_mask=attention_mask,
|
| 138 |
-
position_ids=text_position_ids,
|
| 139 |
-
past_key_values=past_key_values,
|
| 140 |
-
cache_position=cache_position,
|
| 141 |
-
position_embeddings=position_embeddings,
|
| 142 |
-
**kwargs,
|
| 143 |
-
)
|
| 144 |
-
all_hidden_states.append(layer_outputs)
|
| 145 |
-
hidden_states = layer_outputs
|
| 146 |
-
|
| 147 |
-
# DeepStack: inject visual features into early layers
|
| 148 |
-
if deepstack_visual_embeds is not None and layer_idx in range(len(deepstack_visual_embeds)):
|
| 149 |
-
hidden_states = self._deepstack_process(
|
| 150 |
-
hidden_states,
|
| 151 |
-
visual_pos_masks,
|
| 152 |
-
deepstack_visual_embeds[layer_idx],
|
| 153 |
-
)
|
| 154 |
-
|
| 155 |
-
hidden_states = self.norm(hidden_states)
|
| 156 |
-
|
| 157 |
-
return BaseModelOutputWithPast(
|
| 158 |
-
last_hidden_state=hidden_states,
|
| 159 |
-
past_key_values=past_key_values,
|
| 160 |
-
hidden_states=all_hidden_states,
|
| 161 |
-
)
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
class Qwen3VLModel(Qwen3VLModel):
|
| 165 |
-
"""Extended Qwen3-VL multimodal model with per-layer hidden state output."""
|
| 166 |
-
|
| 167 |
-
base_model_prefix = "model"
|
| 168 |
-
_checkpoint_conversion_mapping = {}
|
| 169 |
-
accepts_loss_kwargs = False
|
| 170 |
-
config: Qwen3VLConfig
|
| 171 |
-
_no_split_modules = ["Qwen3VLTextDecoderLayer", "Qwen3VLVisionBlock"]
|
| 172 |
-
|
| 173 |
-
def __init__(self, config):
|
| 174 |
-
super().__init__(config)
|
| 175 |
-
self.visual = Qwen3VLVisionModel._from_config(config.vision_config)
|
| 176 |
-
self.language_model = Qwen3VLTextModel._from_config(config.text_config)
|
| 177 |
-
self.rope_deltas = None
|
| 178 |
-
self.post_init()
|
| 179 |
-
|
| 180 |
-
@auto_docstring
|
| 181 |
-
@check_model_inputs
|
| 182 |
-
def forward(
|
| 183 |
-
self,
|
| 184 |
-
input_ids: torch.LongTensor = None,
|
| 185 |
-
attention_mask: Optional[torch.Tensor] = None,
|
| 186 |
-
position_ids: Optional[torch.LongTensor] = None,
|
| 187 |
-
past_key_values: Optional[Cache] = None,
|
| 188 |
-
inputs_embeds: Optional[torch.FloatTensor] = None,
|
| 189 |
-
pixel_values: Optional[torch.Tensor] = None,
|
| 190 |
-
pixel_values_videos: Optional[torch.FloatTensor] = None,
|
| 191 |
-
image_grid_thw: Optional[torch.LongTensor] = None,
|
| 192 |
-
video_grid_thw: Optional[torch.LongTensor] = None,
|
| 193 |
-
cache_position: Optional[torch.LongTensor] = None,
|
| 194 |
-
**kwargs: Unpack[TransformersKwargs],
|
| 195 |
-
) -> Union[tuple, Qwen3VLModelOutputWithPast]:
|
| 196 |
-
"""Forward pass that extracts visual features, applies DeepStack injection,
|
| 197 |
-
and returns per-layer hidden states for cross-attention fusion."""
|
| 198 |
-
if (input_ids is None) ^ (inputs_embeds is not None):
|
| 199 |
-
raise ValueError("You must specify exactly one of input_ids or inputs_embeds")
|
| 200 |
-
|
| 201 |
-
if inputs_embeds is None:
|
| 202 |
-
inputs_embeds = self.get_input_embeddings()(input_ids)
|
| 203 |
-
|
| 204 |
-
image_mask = None
|
| 205 |
-
video_mask = None
|
| 206 |
-
|
| 207 |
-
if pixel_values is not None:
|
| 208 |
-
image_embeds, deepstack_image_embeds = self.get_image_features(pixel_values, image_grid_thw)
|
| 209 |
-
image_embeds = torch.cat(image_embeds, dim=0).to(inputs_embeds.device, inputs_embeds.dtype)
|
| 210 |
-
image_mask, _ = self.get_placeholder_mask(
|
| 211 |
-
input_ids, inputs_embeds=inputs_embeds, image_features=image_embeds
|
| 212 |
-
)
|
| 213 |
-
inputs_embeds = inputs_embeds.masked_scatter(image_mask, image_embeds)
|
| 214 |
-
|
| 215 |
-
if pixel_values_videos is not None:
|
| 216 |
-
video_embeds, deepstack_video_embeds = self.get_video_features(pixel_values_videos, video_grid_thw)
|
| 217 |
-
video_embeds = torch.cat(video_embeds, dim=0).to(inputs_embeds.device, inputs_embeds.dtype)
|
| 218 |
-
_, video_mask = self.get_placeholder_mask(
|
| 219 |
-
input_ids, inputs_embeds=inputs_embeds, video_features=video_embeds
|
| 220 |
-
)
|
| 221 |
-
inputs_embeds = inputs_embeds.masked_scatter(video_mask, video_embeds)
|
| 222 |
-
|
| 223 |
-
# Aggregate visual position masks and DeepStack embeddings
|
| 224 |
-
visual_pos_masks = None
|
| 225 |
-
deepstack_visual_embeds = None
|
| 226 |
-
if image_mask is not None and video_mask is not None:
|
| 227 |
-
image_mask = image_mask[..., 0]
|
| 228 |
-
video_mask = video_mask[..., 0]
|
| 229 |
-
visual_pos_masks = image_mask | video_mask
|
| 230 |
-
deepstack_visual_embeds = []
|
| 231 |
-
image_mask_joint = image_mask[visual_pos_masks]
|
| 232 |
-
video_mask_joint = video_mask[visual_pos_masks]
|
| 233 |
-
for img_embed, vid_embed in zip(deepstack_image_embeds, deepstack_video_embeds):
|
| 234 |
-
embed_joint = img_embed.new_zeros(visual_pos_masks.sum(), img_embed.shape[-1]).to(img_embed.device)
|
| 235 |
-
embed_joint[image_mask_joint, :] = img_embed
|
| 236 |
-
embed_joint[video_mask_joint, :] = vid_embed
|
| 237 |
-
deepstack_visual_embeds.append(embed_joint)
|
| 238 |
-
elif image_mask is not None:
|
| 239 |
-
image_mask = image_mask[..., 0]
|
| 240 |
-
visual_pos_masks = image_mask
|
| 241 |
-
deepstack_visual_embeds = deepstack_image_embeds
|
| 242 |
-
elif video_mask is not None:
|
| 243 |
-
video_mask = video_mask[..., 0]
|
| 244 |
-
visual_pos_masks = video_mask
|
| 245 |
-
deepstack_visual_embeds = deepstack_video_embeds
|
| 246 |
-
|
| 247 |
-
# Compute RoPE position IDs
|
| 248 |
-
if position_ids is None:
|
| 249 |
-
attention_mask_tensor = (
|
| 250 |
-
attention_mask if not isinstance(attention_mask, dict) else attention_mask["full_attention"]
|
| 251 |
-
)
|
| 252 |
-
if attention_mask_tensor is not None and attention_mask_tensor.ndim == 4:
|
| 253 |
-
attention_mask_tensor = torch.diagonal(attention_mask_tensor[:, 0], dim1=1, dim2=2)
|
| 254 |
-
if attention_mask_tensor.dtype.is_floating_point:
|
| 255 |
-
attention_mask_tensor = attention_mask_tensor / torch.finfo(attention_mask_tensor.dtype).min
|
| 256 |
-
attention_mask_tensor = (1.0 - attention_mask_tensor).int()
|
| 257 |
-
|
| 258 |
-
prefill_compiled_stage = is_torchdynamo_compiling() and (
|
| 259 |
-
(input_ids is not None and input_ids.shape[1] != 1)
|
| 260 |
-
or (inputs_embeds is not None and inputs_embeds.shape[1] != 1)
|
| 261 |
-
)
|
| 262 |
-
prefill_noncompiled_stage = not is_torchdynamo_compiling() and (
|
| 263 |
-
(cache_position is not None and cache_position[0] == 0)
|
| 264 |
-
or (past_key_values is None or past_key_values.get_seq_length() == 0)
|
| 265 |
-
)
|
| 266 |
-
if (prefill_compiled_stage or prefill_noncompiled_stage) or self.rope_deltas is None:
|
| 267 |
-
position_ids, rope_deltas = self.get_rope_index(
|
| 268 |
-
input_ids,
|
| 269 |
-
image_grid_thw,
|
| 270 |
-
video_grid_thw,
|
| 271 |
-
attention_mask=attention_mask_tensor,
|
| 272 |
-
)
|
| 273 |
-
self.rope_deltas = rope_deltas
|
| 274 |
-
else:
|
| 275 |
-
batch_size, seq_length, _ = inputs_embeds.shape
|
| 276 |
-
delta = (
|
| 277 |
-
(cache_position[0] + self.rope_deltas).to(inputs_embeds.device)
|
| 278 |
-
if cache_position is not None
|
| 279 |
-
else 0
|
| 280 |
-
)
|
| 281 |
-
position_ids = torch.arange(seq_length, device=inputs_embeds.device)
|
| 282 |
-
position_ids = position_ids.view(1, -1).expand(batch_size, -1)
|
| 283 |
-
if cache_position is not None:
|
| 284 |
-
delta = delta.repeat_interleave(batch_size // delta.shape[0], dim=0)
|
| 285 |
-
position_ids = position_ids.add(delta)
|
| 286 |
-
position_ids = position_ids.unsqueeze(0).expand(3, -1, -1)
|
| 287 |
-
|
| 288 |
-
outputs = self.language_model(
|
| 289 |
-
input_ids=None,
|
| 290 |
-
position_ids=position_ids,
|
| 291 |
-
attention_mask=attention_mask,
|
| 292 |
-
past_key_values=past_key_values,
|
| 293 |
-
inputs_embeds=inputs_embeds,
|
| 294 |
-
cache_position=cache_position,
|
| 295 |
-
visual_pos_masks=visual_pos_masks,
|
| 296 |
-
deepstack_visual_embeds=deepstack_visual_embeds,
|
| 297 |
-
**kwargs,
|
| 298 |
-
)
|
| 299 |
-
|
| 300 |
-
return Qwen3VLModelOutputWithPast(
|
| 301 |
-
last_hidden_state=outputs.last_hidden_state,
|
| 302 |
-
past_key_values=outputs.past_key_values,
|
| 303 |
-
hidden_states=outputs.hidden_states,
|
| 304 |
-
rope_deltas=self.rope_deltas,
|
| 305 |
-
)
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
class Qwen3VLForConditionalGeneration(Qwen3VLForConditionalGeneration):
|
| 309 |
-
"""Qwen3-VL for conditional generation with per-layer hidden state output."""
|
| 310 |
-
|
| 311 |
-
_checkpoint_conversion_mapping = {}
|
| 312 |
-
_tied_weights_keys = {"lm_head.weight": "model.language_model.embed_tokens.weight"}
|
| 313 |
-
accepts_loss_kwargs = False
|
| 314 |
-
config: Qwen3VLConfig
|
| 315 |
-
|
| 316 |
-
def __init__(self, config):
|
| 317 |
-
super().__init__(config)
|
| 318 |
-
self.model = Qwen3VLModel(config)
|
| 319 |
-
self.lm_head = nn.Linear(config.text_config.hidden_size, config.text_config.vocab_size, bias=False)
|
| 320 |
-
self.post_init()
|
| 321 |
-
|
| 322 |
-
@check_model_inputs
|
| 323 |
-
def forward(
|
| 324 |
-
self,
|
| 325 |
-
input_ids: torch.LongTensor = None,
|
| 326 |
-
attention_mask: Optional[torch.Tensor] = None,
|
| 327 |
-
position_ids: Optional[torch.LongTensor] = None,
|
| 328 |
-
past_key_values: Optional[Cache] = None,
|
| 329 |
-
inputs_embeds: Optional[torch.FloatTensor] = None,
|
| 330 |
-
labels: Optional[torch.LongTensor] = None,
|
| 331 |
-
pixel_values: Optional[torch.Tensor] = None,
|
| 332 |
-
pixel_values_videos: Optional[torch.FloatTensor] = None,
|
| 333 |
-
image_grid_thw: Optional[torch.LongTensor] = None,
|
| 334 |
-
video_grid_thw: Optional[torch.LongTensor] = None,
|
| 335 |
-
cache_position: Optional[torch.LongTensor] = None,
|
| 336 |
-
logits_to_keep: Union[int, torch.Tensor] = 0,
|
| 337 |
-
**kwargs: Unpack[TransformersKwargs],
|
| 338 |
-
) -> Union[tuple, Qwen3VLCausalLMOutputWithPast]:
|
| 339 |
-
outputs = self.model(
|
| 340 |
-
input_ids=input_ids,
|
| 341 |
-
pixel_values=pixel_values,
|
| 342 |
-
pixel_values_videos=pixel_values_videos,
|
| 343 |
-
image_grid_thw=image_grid_thw,
|
| 344 |
-
video_grid_thw=video_grid_thw,
|
| 345 |
-
position_ids=position_ids,
|
| 346 |
-
attention_mask=attention_mask,
|
| 347 |
-
past_key_values=past_key_values,
|
| 348 |
-
inputs_embeds=inputs_embeds,
|
| 349 |
-
cache_position=cache_position,
|
| 350 |
-
**kwargs,
|
| 351 |
-
)
|
| 352 |
-
|
| 353 |
-
hidden_states = outputs[0]
|
| 354 |
-
slice_indices = slice(-logits_to_keep, None) if isinstance(logits_to_keep, int) else logits_to_keep
|
| 355 |
-
logits = self.lm_head(hidden_states[:, slice_indices, :])
|
| 356 |
-
|
| 357 |
-
loss = None
|
| 358 |
-
if labels is not None:
|
| 359 |
-
loss = self.loss_function(logits=logits, labels=labels, vocab_size=self.config.text_config.vocab_size)
|
| 360 |
-
|
| 361 |
-
return Qwen3VLCausalLMOutputWithPast(
|
| 362 |
-
loss=loss,
|
| 363 |
-
logits=logits,
|
| 364 |
-
past_key_values=outputs.past_key_values,
|
| 365 |
-
hidden_states=outputs.hidden_states,
|
| 366 |
-
rope_deltas=outputs.rope_deltas,
|
| 367 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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