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

未关闭
#4,479 3 条评论 1 个 reaction 已指派 2 人 在 GitHub 查看

维护者通常 2 天内回复

@CUHKSZzxy 已经在做这个了。

开始于 2026年3月31日。

  • #4534 来自 @copilot-swe-agent —— 已关闭,未合并

评估

这个 Issue 还没有评估数据。

描述

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

主要语言
Python
星标
8.2k
派生
797
平均合并
3 天 15 小时
30 天内合并 PR
52

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

InternLM/lmdeploy 的其他 Issue

查看 InternLM/lmdeploy 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。