DeepSpeedExamples icon indicating copy to clipboard operation
DeepSpeedExamples copied to clipboard

Resizing model embedding when loading the model

Open puyuanOT opened this issue 9 months ago • 3 comments

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

puyuanOT avatar Sep 11 '23 22:09 puyuanOT