microsoft / microsoft/LLMLingua

RuntimeError: The expanded size of the tensor (181) must match the existing size (211) at non-singleton dimension 0

Open
#36 2 comments 1 reaction 1 assignee View on GitHub

@iofu728 is already working on this.

Since Dec 30, 2023.

question
Dominant language
Python
Stars
6.7k
Forks
428
Avg merge
2d 4h
Merged PRs (30d)
1

Description

I use Qwen-7B ,then get error:
Traceback (most recent call last):
File "/qwen/test.py", line 22, in
compressed_prompt = llm_lingua.compress_prompt(
File "/usr/local/lib/python3.10/dist-packages/llmlingua/prompt_compressor.py", line 253, in compress_prompt
context = self.iterative_compress_prompt(
File "/usr/local/lib/python3.10/dist-packages/llmlingua/prompt_compressor.py", line 749, in iterative_compress_prompt
past_loss[ready_end : end - 1] = loss
RuntimeError: The expanded size of the tensor (181) must match the existing size (211) at non-singleton dimension 0. Target sizes: [181]. Tensor sizes: [211]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.