Git Product home page Git Product logo

Comments (4)

aaronsarnat avatar aaronsarnat commented on August 18, 2024

@schmmd @DeNeutoy FYI.

I should also mention that I'm not 100% sure the errors I was getting today were memory-related, but they went away when I increased memory allocation.

Either way, it seems that on our current trajectory, we will eventually reach a point where machines equipped with 16GB will be unable to run the demo locally via docker.

from allennlp-demo.

DeNeutoy avatar DeNeutoy commented on August 18, 2024

@aaronsarnat if you need a short term fix for this, you can modify this line here to only load the relevant model. E.g when I was developing the dependency parser demo, I would add:

    for name, demo_model in MODELS.items():
		if name != "dependency-parser":
			continue
        logger.info(f"loading {name} model")
        predictor = demo_model.predictor()
        app.predictors[name] = predictor

This causes only the relevant model to be loaded, meaning that 1) it's faster and 2) it takes way less memory.

You can see the keys for the models here.

from allennlp-demo.

aaronsarnat avatar aaronsarnat commented on August 18, 2024

@DeNeutoy thanks for the follow-up. I will definitely try this if I run into any memory blockers.


I suppose another solution is we each get one of these:

image

from allennlp-demo.

schmmd avatar schmmd commented on August 18, 2024

We added better support for running a subset of the models.

from allennlp-demo.

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.