[Model] Add Inkling MTP=1 support [3/N] (#48869)
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai> Co-authored-by: Bugen Zhao <i@bugenzhao.com> Co-authored-by: Giancarlo Delfin <32987265+TheEpicDolphin@users.noreply.github.com> Co-authored-by: Isotr0py <Isotr0py@outlook.com> Co-authored-by: Isotr0py <mozf@inferact.ai> Co-authored-by: Jee Jee Li <jeejeelee@inferact.ai> Co-authored-by: Roger Wang <hey@rogerw.io> Co-authored-by: Yifan Qiao <yifanqiao@inferact.ai> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
co-authored by
Bugen Zhao
Giancarlo Delfin
Isotr0py
Isotr0py
Jee Jee Li
Roger Wang
Yifan Qiao
Claude Fable 5
OpenAI Codex
parent
971dac2caa
commit
fb5ec0dc9e
@@ -61,6 +61,8 @@ class InklingModelConfig(PretrainedConfig):
|
||||
logits_mup_width_multiplier: float | None = None,
|
||||
final_logit_softcapping: float | None = None,
|
||||
tie_word_embeddings: bool = False,
|
||||
num_nextn_predict_layers: int = 0,
|
||||
chain_hidden_post_norm: bool = False,
|
||||
**kwargs: Any,
|
||||
) -> None:
|
||||
if head_dim is None:
|
||||
@@ -135,6 +137,10 @@ class InklingModelConfig(PretrainedConfig):
|
||||
self.unpadded_vocab_size = self.vocab_size
|
||||
self.logits_mup_width_multiplier = logits_mup_width_multiplier
|
||||
self.final_logit_softcapping = final_logit_softcapping
|
||||
# MTP (multi-token prediction) draft head: number of depth layers in the
|
||||
# checkpoint (0 if absent); chain_norm applied after each depth.
|
||||
self.num_nextn_predict_layers = num_nextn_predict_layers
|
||||
self.chain_hidden_post_norm = chain_hidden_post_norm
|
||||
|
||||
super().__init__(tie_word_embeddings=tie_word_embeddings, **kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user