rxnn 0.2.62__py3-none-any.whl → 0.2.63__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
rxnn/training/mrl.py
CHANGED
@@ -243,20 +243,31 @@ class MRLTrainer:
|
|
243
243
|
critic_weight_decay: float,
|
244
244
|
critic_encoder_lr: float,
|
245
245
|
embedding_lr: float,
|
246
|
+
encoder_lr: float,
|
246
247
|
memory_lr: Optional[float] = None,
|
248
|
+
encoder_memory_lr: Optional[float] = None,
|
249
|
+
memory_attn_lr: Optional[float] = None,
|
247
250
|
) -> tuple[torch.optim.Optimizer, torch.optim.Optimizer]:
|
248
251
|
if memory_lr is not None:
|
249
252
|
optimizer = torch.optim.AdamW([
|
250
253
|
{'params': self.actor.embedding_parameters(), 'lr': embedding_lr},
|
251
|
-
{'params': self.actor.not_memory_parameters(), 'lr':
|
252
|
-
{'params': self.actor.memory_parameters(), 'lr':
|
254
|
+
{'params': self.actor.encoder.not_memory_parameters(), 'lr': encoder_lr},
|
255
|
+
{'params': self.actor.encoder.memory_parameters(), 'lr': encoder_memory_lr},
|
256
|
+
{'params': self.actor.memory_attention_parameters(), 'lr': memory_attn_lr},
|
257
|
+
{'params': self.actor.decoder.memory_parameters(), 'lr': memory_lr},
|
258
|
+
{'params': self.actor.decoder.not_memory_parameters(), 'lr': lr},
|
253
259
|
],
|
254
260
|
weight_decay=weight_decay,
|
255
261
|
)
|
256
262
|
else:
|
257
263
|
optimizer = torch.optim.AdamW([
|
258
264
|
{'params': self.actor.embedding_parameters(), 'lr': embedding_lr},
|
259
|
-
{'params': self.actor.
|
265
|
+
{'params': self.actor.embedding_parameters(), 'lr': embedding_lr},
|
266
|
+
{'params': self.actor.encoder.not_memory_parameters(), 'lr': encoder_lr},
|
267
|
+
{'params': self.actor.encoder.memory_parameters(), 'lr': encoder_lr},
|
268
|
+
{'params': self.actor.memory_attention_parameters(), 'lr': lr},
|
269
|
+
{'params': self.actor.decoder.memory_parameters(), 'lr': lr},
|
270
|
+
{'params': self.actor.decoder.not_memory_parameters(), 'lr': lr},
|
260
271
|
],
|
261
272
|
weight_decay=weight_decay,
|
262
273
|
)
|
@@ -17,7 +17,7 @@ rxnn/training/callbacks.py,sha256=rS8leuVFPVVfE5Zc8DMkUZhRIPN-vpPbUjowXE5TSBw,36
|
|
17
17
|
rxnn/training/dataset.py,sha256=tbtOSYldHnQB6SWgee_yUj9zTbgoEoLFNa6wvUS6Apg,51292
|
18
18
|
rxnn/training/ddp.py,sha256=VsNBjn3cY-uUj8hbsW7oKvb0_ZKnXnJ2KgObm-Mr9i4,836
|
19
19
|
rxnn/training/models.py,sha256=KIiOCW0VgKtMA4EMQ---xsVExdI1mBsgWjtRSmJpecA,9033
|
20
|
-
rxnn/training/mrl.py,sha256=
|
20
|
+
rxnn/training/mrl.py,sha256=Dug_cVNj0rV8sbZAekVXWq1dgrCWYxCPtGkGcugOlos,65262
|
21
21
|
rxnn/training/reward.py,sha256=uiSsBXmjMw2yv-1Bssy3RTlpU6zP8ape3490Sl-aT0M,16144
|
22
22
|
rxnn/training/rl.py,sha256=hWtExxY-_pAmTOGYxyCNounUbaGWvLDVltC4sRC7MN4,7175
|
23
23
|
rxnn/training/scheduler.py,sha256=LcjU35mEwz2U5x3U6tLfeeYlBqMxbFSxYzJYuXkWbSY,1408
|
@@ -33,7 +33,7 @@ rxnn/transformers/moe.py,sha256=j6jEx6Ip0zttlUZKKn82azxo95lkLZs-H2GLSMD88hY,5859
|
|
33
33
|
rxnn/transformers/positional.py,sha256=1PjcJybUzeQlIKJI4tahAGZcYgCRCL0otxs7mpsNuzM,4410
|
34
34
|
rxnn/transformers/sampler.py,sha256=t6iiQTdLQ0TakUWnnhKkb5DKF2F_9-thXHBydDF3fxg,17389
|
35
35
|
rxnn/utils.py,sha256=ihb6OTyDtPiocB_lOvnq7eOkjjpCkgs8wxvXUBNQ7mM,996
|
36
|
-
rxnn-0.2.
|
37
|
-
rxnn-0.2.
|
38
|
-
rxnn-0.2.
|
39
|
-
rxnn-0.2.
|
36
|
+
rxnn-0.2.63.dist-info/LICENSE,sha256=C8coDFIUYuOcke4JLPwTqahQUCyXyGq6WOaigOkx8tY,11275
|
37
|
+
rxnn-0.2.63.dist-info/METADATA,sha256=GzSG-1WD-W4nv9HnUtFHCk0B7ahsdsKMak06GM7edjQ,25997
|
38
|
+
rxnn-0.2.63.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
39
|
+
rxnn-0.2.63.dist-info/RECORD,,
|
File without changes
|
File without changes
|