deepspeedai / deepspeedai/DeepSpeedExamples

Resizing model embedding when loading the model

Open
#728 3 comments 1 reaction 1 assignee View on GitHub

@yaozhewei is already working on this.

Since Sep 12, 2023.

Dominant language
Python
Stars
6.8k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.