How to specify target bit width?

169 views
Skip to first unread message

aaro...@gmail.com

unread,
Aug 22, 2016, 5:49:34 PM8/22/16
to ristretto-users
Hello, 

It looks like Ristretto tries hard to find the minimum bit width. But I don't need the absolute minimum. Even 16-bits is good enough for me.

How do I tell Ristretto to stop when the network fits into 16 bits? I don't need to go down to 8 bits. 

Thanks!

Philipp Gysel

unread,
Aug 26, 2016, 3:39:09 PM8/26/16
to ristretto-users
Hi Aaron,

Thanks for your question. To change the bit-width Ristretto uses, you need to modify the source code. The Ristretto tool in src/caffe/ristretto/quantization.cpp quantizes the CNN to different bit-widths. For dynamic fixed point, for example, you need to change the bit-width for-loops in Quantize2DynamicFixedPoint(...).

I hope this helps,
Philipp

aaro...@gmail.com

unread,
Aug 28, 2016, 3:11:20 AM8/28/16
to ristretto-users
Thank you, Philipp :)

wmike...@gmail.com

unread,
Sep 23, 2019, 1:59:39 AM9/23/19
to ristretto-users
Hello,

But how to change the bit-width for Minifloat and integer-power-of-two? 
I have tried to change the bit-width for-loops in Quantize2MiniFloat(...) and bit-width in Quantize2IntergerPowerOf2Weights(...), the accuracy of minifloat wouldn't change in lower precision and accuracy of integer-power-of-two doesn't change for bit-width from 15 to 1.

What others should I modify to specify bit-width in these two quantization?
Thank you!
Reply all
Reply to author
Forward
0 new messages