Giter VIP home page Giter VIP logo

Comments (13)

raver119 avatar raver119 commented on August 28, 2024

So, in other words you had vocab approximately around 3m words, and vector size = 900.

That gives us at least 22GB of ram for model. What kind of magic do you expect there? You can't fit that into 6GB ram.

p.s. and i'm yet to see your full stack trace.

p.p.s please use original dl4j repo for bug reports: https://github.com/deeplearning4j/deeplearning4j/issues

from deeplearning4j-examples.

vvpreetham avatar vvpreetham commented on August 28, 2024

You just repeated what I have posted as an issue !! Well done...

The magic I am expecting my friend is some sort of data parallelization (Will be happy to discuss this on dl4j repo as you have requested)

log4j:WARN No appenders could be found for logger (org.deeplearning4j.models.embeddings.loader.WordVectorSerializer).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
java.lang.OutOfMemoryError: GC overhead limit exceeded
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2041)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
at com.fasterxml.jackson.core.io.NumberInput.parseDouble(NumberInput.java:285)
at com.fasterxml.jackson.core.util.TextBuffer.contentsAsDouble(TextBuffer.java:392)
at com.fasterxml.jackson.core.base.ParserBase._parseSlowFloat(ParserBase.java:818)
at com.fasterxml.jackson.core.base.ParserBase._parseNumericValue(ParserBase.java:797)
at com.fasterxml.jackson.core.base.ParserBase.getDoubleValue(ParserBase.java:714)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer._parseDoublePrimitive(StdDeserializer.java:669)
at com.fasterxml.jackson.databind.deser.std.PrimitiveArrayDeserializers$DoubleDeser.deserialize(PrimitiveArrayDeserializers.java:513)
at com.fasterxml.jackson.databind.deser.std.PrimitiveArrayDeserializers$DoubleDeser.deserialize(PrimitiveArrayDeserializers.java:492)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:538)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:99)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:238)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:118)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3066)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2161)
at org.deeplearning4j.models.word2vec.wordstore.VocabularyWord.fromJson(VocabularyWord.java:105)
at org.deeplearning4j.models.embeddings.loader.WordVectorSerializer.loadFullModel(WordVectorSerializer.java:491)
at com.inmobi.miip.ai.ContextMatch$.main(ContextMatch.scala:12)
at com.inmobi.miip.ai.ContextMatch.main(ContextMatch.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at scala.reflect.internal.util.ScalaClassLoader$$anonfun$run$1.apply(ScalaClassLoader.scala:70)
at scala.reflect.internal.util.ScalaClassLoader$class.asContext(ScalaClassLoader.scala:31)
at scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.asContext(ScalaClassLoader.scala:101)
at scala.reflect.internal.util.ScalaClassLoader$class.run(ScalaClassLoader.scala:70)
at scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:101)
at scala.tools.nsc.CommonRunner$class.run(ObjectRunner.scala:22)
at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:39)
preetham-2:miip preetham.venkatesh$

from deeplearning4j-examples.

vvpreetham avatar vvpreetham commented on August 28, 2024

Should I repost this in the dl4j repo?

from deeplearning4j-examples.

raver119 avatar raver119 commented on August 28, 2024

Sorry, but what kind of data parallelization you could expect for single vocabulary-pattern object? It's meant to be loaded and being able to fit into memory.

Sure, you can use text serialization (not a writeFullModel, but writeWordVectors), and save that, say, to HDFS output stream, and then load that as RDD. But at the end of day w2v object is meant to be loaded into your memory.

from deeplearning4j-examples.

raver119 avatar raver119 commented on August 28, 2024

One more question: you had built that model on the same machine, or on other one?

from deeplearning4j-examples.

vvpreetham avatar vvpreetham commented on August 28, 2024

Given the objective function is still maximizing the log probability of the context word, while this is tricky, I guess, it may not be impossible to load the vector spaces in RDD across machines with a softmax gating function for optimization (Assuming the optimization is hierarchical softmax implementation)... There can be several ways to distribute the model into RDD and represent the vector space...

The funny thing is that the model was built on the same machine (I know why you are asking this question and I was about to come to that)... So it fit the memory in the first place (A smaller corpus for test before the entire corpus was tested.) The model for the smaller corpus now does not load back in the same machine (To repeat, the corpus dataset and the model was exactly from the same machine)...

from deeplearning4j-examples.

raver119 avatar raver119 commented on August 28, 2024

So, we have two issues then:

  • You're asking about something like a parameter server for w2v.
  • Model isn't able to load on the same machine it was built.

Issue nr.2:

Can i see gist with your source code please? I need full source code that caused exception you've posted before.

from deeplearning4j-examples.

vvpreetham avatar vvpreetham commented on August 28, 2024

Hi,

  1. Yes on this

  2. Will attach a gist (Its really simple what I a trying)...

from deeplearning4j-examples.

agibsonccc avatar agibsonccc commented on August 28, 2024

@vvpreetham we plainly don't have a parameter server. You're expecting a whole feature most DL frameworks aren't even close to implementing that's easy AND out of the box. We are in the process of integrating one but don't expect it as a first priority atm.

from deeplearning4j-examples.

vvpreetham avatar vvpreetham commented on August 28, 2024

https://gist.github.com/vvpreetham/5562c8cfd0527a29c1ee

from deeplearning4j-examples.

agibsonccc avatar agibsonccc commented on August 28, 2024

Closing this. This is equivalent to you wanting us to build a parameter server. Specify more heap space. For now this is working as intended. It's not ideal - but frankly it's an edge case most people don't have.

from deeplearning4j-examples.

vvpreetham avatar vvpreetham commented on August 28, 2024

The first part yes, the second part is not... If the model fits in memory at the time of creation, it should load as well correct ?

from deeplearning4j-examples.

vvpreetham avatar vvpreetham commented on August 28, 2024

Second part here (for closure) : deeplearning4j/deeplearning4j#1185

from deeplearning4j-examples.

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.