Skip to content

issue/406 - feat: support gpt2#416

Draft
spike-zhu wants to merge 1 commit into
mainfrom
issue/406
Draft

issue/406 - feat: support gpt2#416
spike-zhu wants to merge 1 commit into
mainfrom
issue/406

Conversation

@spike-zhu
Copy link
Copy Markdown
Collaborator

InfiniLM 支持 GPT 2,测试截图如下

InfiniLM 推理与Transformer 推理对比测试截图:
image

@spike-zhu spike-zhu requested review from a team and wooway777 June 5, 2026 13:42
@spike-zhu spike-zhu marked this pull request as draft June 5, 2026 13:43
self,
model_path,
device=None,
dtype="float16",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

为什么要指定数据类型,增加这个参数,默认的类型不能跑么


for k in f.keys():
state_dict[k] = f.get_tensor(k).to(device=device)
state_dict[k] = f.get_tensor(k).to(device=device, dtype=dtype)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

添加.to(dtype=dtype)的话,轶群的量化模型可能就不能跑了

@pengcheng888
Copy link
Copy Markdown
Collaborator

给出tp=2的测试截图

Comment thread examples/test_infer.py
outputs = model.chat(
messages=conversations,
)
if getattr(model.engine.tokenizer, "chat_template", None):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

服务能跑么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants