wvabrinskas / Neuron

A neural network library for Swift
https://williamvabrinskas.com/Neuron/documentation/neuron/
MIT License
104 stars 6 forks source link

New Compressed SMODEL format along with visualizer #73

Open wvabrinskas opened 5 months ago

wvabrinskas commented 5 months ago

Create a new compressed form of the smodel format for model exports. Model sizes can quickly get really large. Having a compressed version will allow for larger models to be expressed smaller on disk.

wvabrinskas commented 4 months ago

Looked into using InputStream with JSONSerialization however it's still allocating a large chunk of memory. Will try breaking the allocations by Layer so the JSON isnt all in memory at once.

wvabrinskas commented 4 months ago

So it turns out I was encoding the JSON as swift Data object TWICE. causing excess memory allocations.

wvabrinskas commented 3 months ago

Maybe use some Quantization?