Giter Club home page Giter Club logo

Comments (11)

areschen2015 avatar areschen2015 commented on June 19, 2024 1

@lutzroeder I printed the execution time of functions in dagre.js as the attachment showing, which opened a llama2 model from node 0 to node 1943. The total time of dagre layout is 37 sec, the function initOrder() took 17.6 sec and the invoking of buildLayerGraph() took 6.9 sec. So initOrder() and buildLayerGraph() are the keys of performance optimization.
For the popular large language models with number of nodes at least 1000, netron should adapt them for user to use easily and quickly. So what is the development plan in the future?
netron-time

from netron.

lutzroeder avatar lutzroeder commented on June 19, 2024

@areschen2015 please share the model file.

from netron.

areschen2015 avatar areschen2015 commented on June 19, 2024

@lutzroeder here is the model file, 3x
0_llama2_70b.zip

from netron.

lutzroeder avatar lutzroeder commented on June 19, 2024

@areschen2015 the graph has 8000+ nodes and the graph layout would take a very long time to complete.

This is explained by the warning dialog that is shown when opening the file:

1212

from netron.

lutzroeder avatar lutzroeder commented on June 19, 2024

Duplicate of #68 and #1214

from netron.

areschen2015 avatar areschen2015 commented on June 19, 2024

Is there any solution? Or other acceleration solutions, for example, we can render one half of nodes at opening time, then render the others.

from netron.

lutzroeder avatar lutzroeder commented on June 19, 2024

@areschen2015 you can investigate, suggest a solution and submit a pull request that works for all file formats.

from netron.

areschen2015 avatar areschen2015 commented on June 19, 2024

@lutzroeder I found that the main time consumption is in dagre. layout(). Is the dagre integrated the latest version? Besides, do you consider integrating other layout algorithms, such as Sankey layout or force layout?

from netron.

lutzroeder avatar lutzroeder commented on June 19, 2024

@areschen2015 dagre.js is not the latest version. The code is forked, optimized and runs faster. Experiments with other layout algorithms are welcome. Ideally submit a pull request adding to dagre.js.

from netron.

lutzroeder avatar lutzroeder commented on June 19, 2024

@areschen2015 as referenced earlier, one approach is to capture a hierarchical structure when serializing the file. Given the large number of formats and serialization approaches there isn't a single answer. This would not improve the situation for large flat files that removed all hierarchies, like the one you shared. Faster graph layout algorithms cloud help. The planned work is that you are investigating and trying to come up with an implementation. Graph layout algorithms tend to be non-linear in complexity so the challenge here might be finding and implementing a different algorithm that works for these large graphs and can scale linearly. buildLayerGraph being a bottleneck of the current implementation is well understood and quite a bit of time has been invested in making this code run fast.

from netron.

uuser0748 avatar uuser0748 commented on June 19, 2024

@areschen2015 Hi, I'm trying to visualize ChatGLM3 with Netron, but I don't know which model file I should drag in. The bin.index.json file couldn't generate graph with lines but simply weight modules. So I'm wondering how did you generate llama2 graph? Did you merge the files together? Looking forward for your reply :-)
37281705978914_ pic
37291705982127_ pic

from netron.

Related Issues (20)

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.