Modalities / modalities

Modalities, a PyTorch-native framework for distributed and reproducible foundation model training.
MIT License
61 stars 5 forks source link

Add resize embedding layer #208

Open lllAlexanderlll opened 2 months ago

lllAlexanderlll commented 2 months ago

Feature request

If new tokens are introduced and must be trained, resizing the embedding matrix is needed. This is supported for HF checkpoints but not for Modalities checkpoints.

Motivation

Extend pre-trained models with new tokens, which can be trained to fulfill special purposes, e.g., tool call start token, assistant end generation token, etc.