DeepSpeedExamples
DeepSpeedExamples copied to clipboard
Resizing model embedding when loading the model
In create_hf_model, what's the purpose of resizing the model embedding?
model.config.end_token_id = tokenizer.eos_token_id
44 | model.config.pad_token_id = model.config.eos_token_id 45 | model.resize_token_embeddings(int( 46 | 8 * 47 | math.ceil(len(tokenizer) / 8.0))) # make the vocab size multiple of 8