Code Monkey home page Code Monkey logo

kdd_2024_aqa's Introduction

KDD Cup 2024 OAG-Challenge AQA 2nd place solution

团队成员

  • 戴玮
  • 付鹏
  • 甘淳井

Prerequisites

  • Python 3.9
  • PyTorch 2.1.2+cu118
  • transformers 4.40.1
  • faiss-gpu 1.7.2
  • deepspeed 0.14.0
  • einops 0.7.0
  • gritlm 1.0.0
  • pandas 2.1.4

第一阶段的数据集放入 ./AQA/ ,第二阶段的数据集放入 ./AQA/AQA-test-public/

方案

方案分为三个部分:

  • 使用 4 个预训练模型进行推断,这部分的详细描述可参见 infer_with_pretrained
  • 对模型进行微调和推断,这部分的详细描述可参见 finetune
  • 对之前推断的结果,用 faiss 计算相似度矩阵,并进行加权融合,这部分的详细描述可参见 predict

依次执行以上三个部分的代码,即可得到最终的预测结果

有些代码是从 ipynb 中转移出来的,没有经过 py 代码的详尽测试,执行代码时可能会出错,如果有问题请及时反馈,谢谢!

kdd_2024_aqa's People

Contributors

loveisp avatar

Watchers

 avatar

Forkers

starrylun

kdd_2024_aqa's Issues

复现代码

你好,

我是kdd比赛组织者。predict时运行 merge_embeddings.py 报错,请问该怎么解决?

python merge_embeddings.py sfr
(466387, 4096)
(466387, 4096)
395812
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Traceback (most recent call last):
File "/data1/zhangfanjin/ssj/shijie/3th/KDD_2024_AQA/predict/merge_embeddings.py", line 33, in
embeds[paper_idx_old] = embeds_old
ValueError: shape mismatch: value array of shape (466387,4096) could not be broadcast to indexing result of shape (395812,4096)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.