Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPTBigCode 20b speculator variant #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions fms_extras/models/speculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,13 @@ def flatten_batch(inp: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor, torch.

_llama_13b = {"emb_dim": 5120, "vocab_size": 32000, "n_predict": 3, "inner_dim": 4096}

_gpt_bigcode_20b = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a comment on what this config comes from (e.g. where a user might find appropriate weights for it or how we arrived at the set of configs, a paper reference if relevant, etc)

"emb_dim": 6144,
"vocab_size": 49152,
"n_predict": 4,
"inner_dim": 4096,
}

_architecture_name = "mlp_speculator"


Expand All @@ -280,6 +287,11 @@ def factory(**user_kwargs):
models.register_model(
_architecture_name, "llama.13b", _mlp_speculator_factory_factory(_llama_13b)
)
models.register_model(
_architecture_name,
"gpt_bigcode.ibm.20b",
_mlp_speculator_factory_factory(_gpt_bigcode_20b),
)


def _rename_hf_weights_to_fms(orig_sd):
Expand Down
Loading