[Bug] 为什么qwen3VL的logits、last_hidden_state不支持返回呢?

Đang mở
#4,479 3 bình luận 1 reaction 2 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@CUHKSZzxy đang làm issue này rồi.

Từ ngày 31/3/2026.

  • #4534 của @copilot-swe-agent — đã đóng, không merge

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Checklist
  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
Describe the bug
gen_config=GenerationConfig(
        temperature=0.0,
        top_k = 1,
        output_logits='generation',
        output_last_hidden_state='generation',
        max_new_tokens=2048)
    
    # pipe = pipeline(args.model_path, backend_config=backend_config)
    pipe = pipeline(args.model_path)

    response = pipe(['Hi, pls intro yourself', 'Shanghai is'],
                gen_config=gen_config)
    hidden_states = [x.last_hidden_state for x in response]
    logits = [x.logits for x in response]

    # pdb.set_trace()
    print(hidden_states)
    print(logits)
Reproduction
gen_config=GenerationConfig(
        temperature=0.0,
        top_k = 1,
        output_logits='generation',
        output_last_hidden_state='generation',
        max_new_tokens=2048)
    
    # pipe = pipeline(args.model_path, backend_config=backend_config)
    pipe = pipeline(args.model_path)

    response = pipe(['Hi, pls intro yourself', 'Shanghai is'],
                gen_config=gen_config)
    hidden_states = [x.last_hidden_state for x in response]
    logits = [x.logits for x in response]

    # pdb.set_trace()
    print(hidden_states)
    print(logits)
Environment
官方环境
Error traceback

Ngôn ngữ chính
Python
Star
8.2k
Fork
797
Merge trung bình
3 ngày 15 giờ
Pull request đã merge (30 ngày)
52

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của InternLM/lmdeploy

Tất cả issue của InternLM/lmdeploy

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.