Giter VIP home page Giter VIP logo

Comments (5)

iamlockelightning avatar iamlockelightning commented on August 16, 2024

Thank you for finding this repo useful!

Yes, the size of DWY100K is much larger than DBP15K, so one GPU is not enough.

But I think it still remains difficult in running this code on multiple GPUs. It's because I feed all triplets as one batch to train in the TransE part, so that I could train the whole model more efficiently (one round GAT -> TransE in one batch). torch.nn.DataParallel works only when the data is divided into batches, so it raises a Runtime Error.

I have tried to divide the triplets into batches so that I could use torch.nn.DataParallel to speed up, but it results in [multiple rounds GAT -> TransE in multiple batches, because one batch triplets need one round GAT], which may increase the time when memory copies the graph to other GPUs (especially a large graph). Another notable thing is the size of the sparse graph, which will cost much memory in graph attention (I haven't check whether one GPU is enough for graph attention on DWY100K or not).

By now the easiest way to run the code on DWY100K is to use CPU. But I'd be excited if you can PR a more efficient version of KECG.

from kecg.

DexterZeng avatar DexterZeng commented on August 16, 2024

Hi, thank you very much for your detailed explanation!
Yes, I will try to explore how to improve the efficiency, but for now, running on CPU indeed works.

Thank you again for your response!

from kecg.

DexterZeng avatar DexterZeng commented on August 16, 2024

Hi, just a quick question, what's the size of CPU you've used to run codes on DWY100K? Mine is 128G, which seems to be not enough...

Thank you for your time!

from kecg.

iamlockelightning avatar iamlockelightning commented on August 16, 2024

The memory size is 256G (220G is actually available).

If you're not able to run the code, you can decrease the negative sampling size, which won't harm the results so much.

from kecg.

DexterZeng avatar DexterZeng commented on August 16, 2024

Thanks a lot!

from kecg.

Related Issues (5)

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.