Skip to content

Commit

Permalink
Merge branch 'master' of github.com:experimaestro/experimaestro-ir
Browse files Browse the repository at this point in the history
  • Loading branch information
bpiwowar committed Jul 18, 2023
2 parents 0adc839 + a5575e0 commit 7750213
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
22 changes: 22 additions & 0 deletions src/xpmir/papers/helpers/optim.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,25 @@ def optimizer(self):
),
]
)

@cached_property
def optimizer_splade(self):
scheduler = (
LinearWithWarmup(
num_warmup_steps=self.num_warmup_steps,
min_factor=self.warmup_min_factor,
)
if self.scheduler
else None
)

return get_optimizers(
[
ParameterOptimizer(
scheduler=scheduler,
optimizer=AdamW(
lr=self.lr, weight_decay=self.weight_decay, eps=self.eps
),
),
]
)
2 changes: 1 addition & 1 deletion src/xpmir/papers/splade/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def run(
# the model to be trained
model=spladev2,
# Optimization settings
optimizers=cfg.splade.optimization.optimizer,
optimizers=cfg.splade.optimization.optimizer_splade,
steps_per_epoch=cfg.splade.optimization.steps_per_epoch,
use_fp16=True,
max_epochs=cfg.splade.optimization.max_epochs,
Expand Down
4 changes: 2 additions & 2 deletions src/xpmir/papers/splade/normal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ splade:

model: splade_max
# validation for each (steps_per_epoch * validation interval) steps
validation_interval: 40
validation_interval: 8
lambda_q: 3.0e-4
lambda_d: 1.0e-4
lamdba_warmup_steps: 50000
requirements: duration=2 days & cuda(mem=40G) * 2
requirements: duration=4 days & cuda(mem=40G)

retrieval:
requirements: duration=2 days & cuda(mem=24G)
Expand Down

0 comments on commit 7750213

Please sign in to comment.