Skip to content

TSModelForCausalLM support model_type qwen/chatglm - #458

Closed
changwangss wants to merge 4 commits into
huggingface:mainfrom
changwangss:wangchang/qwen
Closed

TSModelForCausalLM support model_type qwen/chatglm#458
changwangss wants to merge 4 commits into
huggingface:mainfrom
changwangss:wangchang/qwen

Conversation

@changwangss

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Signed-off-by: changwangss <chang1.wang@intel.com>
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Comment thread optimum/intel/generation/modeling.py Outdated
if self.model_dtype is not None:
empty_tensor = empty_tensor.to(self.model_dtype)
past_key_values = tuple([empty_tensor] * num_layers)
elif self.config.model_type == "qwen":

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.

could you add a test with a tiny model ?

@changwangss changwangss changed the title TSModelForCausalLM support model_type qwen TSModelForCausalLM support model_type qwen/chatglm Nov 9, 2023
@changwangss

Copy link
Copy Markdown
Contributor Author

will update when huggingface/transformers#27883 is ready.

@changwangss changwangss closed this Jan 8, 2024
@changwangss
changwangss deleted the wangchang/qwen branch July 9, 2025 09:55
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.

3 participants