multimodal-yield-estimation / configuration_multimodal.py
Sarikaa-Sridhar's picture
multi-modal yield estimation code base
4191737 verified
Raw History Blame Contribute Delete
1.62 kB
from transformers import PretrainedConfig
class MultimodalYieldConfig(PretrainedConfig):
"""Config for the text + image (concat) multi-cutoff yield model.
Normalization statistics are stored here so the model accepts raw
Qwen3 text embeddings and raw DINOv3 image features at inference time.
"""
model_type = "yield-text-image"
def __init__(
self,
text_model="Qwen/Qwen3-Embedding-0.6B",
image_model="facebook/dinov3-vitb16-pretrain-lvd1689m",
text_dim=1024,
image_dim=768,
K=22,
text_mean=None,
text_std=None,
image_mean=None,
image_std=None,
y_mean=None,
y_std=None,
train_cutoffs=None,
eval_cutoffs=None,
d_model=64,
nhead=4,
num_layers=2,
dim_ff=128,
dropout=0.3,
input_dropout=0.2,
pool="last",
**kwargs,
):
super().__init__(**kwargs)
self.text_model = text_model
self.image_model = image_model
self.text_dim = text_dim
self.image_dim = image_dim
self.K = K
self.text_mean = text_mean
self.text_std = text_std
self.image_mean = image_mean
self.image_std = image_std
self.y_mean = y_mean
self.y_std = y_std
self.train_cutoffs = train_cutoffs
self.eval_cutoffs = eval_cutoffs
self.d_model = d_model
self.nhead = nhead
self.num_layers = num_layers
self.dim_ff = dim_ff
self.dropout = dropout
self.input_dropout = input_dropout
self.pool = pool