我使用 qwen3-reranker-0.6B ,没法排序

深圳市进化图灵智能科技有限公司
深圳市进化图灵智能科技有限公司
2026-05-14 01:22:08

 《Qwen3-embedding-0.6B 使用指南》 https://www.aidevhome.com/?id=58 

 我下载文章中的模型

Qwen3-reranker-0.6b 骁龙 X Elite 平台 (8380) 模型下载

下载的demo.py 中,我添加中英文对照测试

        queries = [
            "What is the capital of China?",
            "Explain gravity",
            "人工智能应用",
            "人工智能应用",
            "人工智能应用",
            "人工智能应用",
            "Application of Artificial Intelligence",
            "Application of Artificial Intelligence",
            "Application of Artificial Intelligence",
            "Application of Artificial Intelligence",
        ]
        documents_relevant = [
            "The capital of China is Beijing.",
            "Gravity is a force that attracts two bodies towards each other. "
            "It gives weight to physical objects and is responsible for the "
            "movement of planets around the sun.",
            "机器学习在医疗诊断中的应用",
            "深度学习在自动驾驶中的最新进展",
            "自然语言处理技术发展史",
            "人工智能伦理问题探讨",
            "The Application of Machine Learning in Medical Diagnosis",
            "The Latest Advances of Deep Learning in Autonomous Driving",
            "The Development History of Natural Language Processing Technology",
            "Discussion on Ethical Issues of Artificial Intelligence",
        ]

然后运行demo.py 输出:

(C:\workspace\gitee-Omni-note\model_server\venv) PS C:\models\qwen3-reranker-8380-2.38>  python .\demo.py
Initializing Qwen3-Reranker-0.6B (GenieContext)...
[INFO]  "Using create From Binary"
[INFO]  "Allocated total size = 157349632 across 5 buffers"
  Model loaded in 1.65s
  Params: max_length=10, temp=0.01, top_k=1 (greedy decoding)
Ready.

======================================================================
Testing RELEVANT documents:
======================================================================
  Query : What is the capital of China?
  Doc   : The capital of China is Beijing....
  Answer: 'Yes.' → Score: 1.0000  (0.085s)

  Query : Explain gravity
  Doc   : Gravity is a force that attracts two bodies towards each oth...
  Answer: 'yes
yes
yes
yes
yes' → Score: 1.0000  (0.188s)

  Query : 人工智能应用
  Doc   : 机器学习在医疗诊断中的应用...
  Answer: 'no' → Score: 0.0000  (0.079s)

  Query : 人工智能应用
  Doc   : 深度学习在自动驾驶中的最新进展...
  Answer: 'no
Okay, let me check the answer.' → Score: 0.0000  (0.189s)

  Query : 人工智能应用
  Doc   : 自然语言处理技术发展史...
  Answer: 'no
aje
aje
aje
aje' → Score: 0.0000  (0.187s)

  Query : 人工智能应用
  Doc   : 人工智能伦理问题探讨...
  Answer: 'no

no

no

no

no' → Score: 0.0000  (0.191s)

  Query : Application of Artificial Intelligence
  Doc   : The Application of Machine Learning in Medical Diagnosis...
  Answer: 'no

no

no

no

no' → Score: 0.0000  (0.190s)

  Query : Application of Artificial Intelligence
  Doc   : The Latest Advances of Deep Learning in Autonomous Driving...
  Answer: 'no

no

no
no
no' → Score: 0.0000  (0.188s)

  Query : Application of Artificial Intelligence
  Doc   : The Development History of Natural Language Processing Techn...
  Answer: 'no
* no
* no
* no' → Score: 0.0000  (0.190s)

  Query : Application of Artificial Intelligence
  Doc   : Discussion on Ethical Issues of Artificial Intelligence...
  Answer: 'No
Yes
Yes
Yes
Yes' → Score: 0.0000  (0.186s)

======================================================================
Testing IRRELEVANT documents:
======================================================================
  Query : What is the capital of China?
  Doc   : Random nonsense string xyz 123 !!!...
  Answer: 'No

No

No

No

No' → Score: 0.0000  (0.190s)

  Query : Explain gravity
  Doc   : The recipe for chocolate cake requires flour, sugar, and coc...
  Answer: 'no' → Score: 0.0000  (0.081s)

======================================================================
Summary:
  Avg relevant score  : 0.2000
  Avg irrelevant score: 0.0000

  [+] 1.00  Q: What is the capital of China?
            D: The capital of China is Beijing.
  [+] 1.00  Q: Explain gravity
            D: Gravity is a force that attracts two bodies towards each oth
  [+] 0.00  Q: 人工智能应用
            D: 机器学习在医疗诊断中的应用
  [+] 0.00  Q: 人工智能应用
            D: 深度学习在自动驾驶中的最新进展
  [+] 0.00  Q: 人工智能应用
            D: 自然语言处理技术发展史
  [+] 0.00  Q: 人工智能应用
            D: 人工智能伦理问题探讨
  [+] 0.00  Q: Application of Artificial Intelligence
            D: The Application of Machine Learning in Medical Diagnosis
  [+] 0.00  Q: Application of Artificial Intelligence
            D: The Latest Advances of Deep Learning in Autonomous Driving
  [+] 0.00  Q: Application of Artificial Intelligence
            D: The Development History of Natural Language Processing Techn
  [+] 0.00  Q: Application of Artificial Intelligence
            D: Discussion on Ethical Issues of Artificial Intelligence
  [-] 0.00  Q: What is the capital of China?
            D: Random nonsense string xyz 123 !!!
  [-] 0.00  Q: Explain gravity
            D: The recipe for chocolate cake requires flour, sugar, and coc

  ✅ VERIFICATION PASSED — relevant docs scored higher than irrelevant

  Performance (last inference):
    Prompt processing: 2074.7 toks/sec
    Token generation:  88.5 toks/sec
    Time to first token: 42905.0 ms

Cleaning up GenieContext...
(C:\workspace\gitee-Omni-note\model_server\venv) PS C:\models\qwen3-reranker-8380-2.38>  

 

 

 

 

...全文
39 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复

目前的框架是二值评分。只能区分"相关/不相关",无法在多个相关文档之间排序。先用双编码器(如 BGE embedding + 余弦相似度)粗排 top-K,再用当前 reranker 做二值过滤(剔除不相关)

7,639

社区成员

发帖
与我相关
我的任务
社区描述
本论坛以AI、WoS 、XR、IoT、Auto、生成式AI等核心板块组成,为开发者提供便捷及高效的学习和交流平台。 高通开发者专区主页:https://qualcomm.csdn.net/
人工智能物联网机器学习 技术论坛(原bbs) 北京·东城区
社区管理员
  • csdnsqst0050
  • chipseeker
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧