What's Changed
* Update Optimizer Parameters by helpmefindaname in https://github.com/helpmefindaname/transformer-smaller-training-vocab/pull/3
Introduces an optional parameter `optimizer` to `reduce_train_vocab`. Which can be used to modify the parameter group to exchange changed embeddings to the new ones. An example usage is the following:
model = ...
tokenizer = ...
optimizer = Adam(model.parameters(), lr=...)
...
with reduce_train_vocab(model=model, tokenizer=tokenizer, texts=get_texts_from_dataset(raw_datasets, key="text"), optimizer=optimizer):
train_with_optimizer(model, tokenizer, optimizer)
save_model() save model at the end to contain the full vocab again.
**Full Changelog**: https://github.com/helpmefindaname/transformer-smaller-training-vocab/compare/0.1.8...0.2.0