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

remove chat template config in turbomind engine #1161

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

irexyc
Copy link
Collaborator

@irexyc irexyc commented Feb 20, 2024

Motivation

Align to torch engine, remove chat_template_mdoel in turbomind engine.

BC-breaking
When using turbomind engine directly, user needs to explicitly specify EngineGenerationConfig and set stop_words

@lvhan028 lvhan028 changed the title Rm tm model remove chat template config in turbomind engine Mar 19, 2024
Copy link
Collaborator

@AllentDan AllentDan left a comment

Choose a reason for hiding this comment

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

Tesed with

  1. lmdeploy chat turbomind internlm2-chat-7b w/wo --chat-template
  2. pipeline of internlm2-chat-7b w/wo --chat-template
  3. api_server with chat-template

chat_template (str): user defined chat template
kwargs (dict): unused args
""" # noqa: E 501
print('unused kwargs', kwargs, sep='')
Copy link
Collaborator

Choose a reason for hiding this comment

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

有必要打印么?

cap: str = 'chat',
tp: int = 1,
max_batch_size: int = 128,
Copy link
Collaborator

Choose a reason for hiding this comment

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

max_batch_size 感觉不用作为参数

tm_model = tm.TurboMind.from_pretrained(
model_path,
engine_cfg = TurbomindEngineConfig(
max_batch_size=max_batch_size,
Copy link
Collaborator

Choose a reason for hiding this comment

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

max_batch_size=1

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

Successfully merging this pull request may close these issues.

None yet

3 participants