freedom Koan-Sin Tan (@koansin) profile picture

Coder?

Jhubei City, Hsinchu County,
Joined January 2009
Photo by freedom Koan-Sin Tan (@koansin)Photo by freedom Koan-Sin Tan (@koansin)Photo by freedom Koan-Sin Tan (@koansin)Photo by freedom Koan-Sin Tan (@koansin)Photo by freedom Koan-Sin Tan (@koansin)Photo by freedom Koan-Sin Tan (@koansin)Photo by freedom Koan-Sin Tan (@koansin)Photo by freedom Koan-Sin Tan (@koansin)Photo by freedom Koan-Sin Tan (@koansin)Photo by freedom Koan-Sin Tan (@koansin)
ANE INT8 on A20 Pro is about 105 TOPS for INT8. Measured with my little MPSGraph based app, github.com/freedomtan/measur…. Note that these numbers are likely Winograd 1D F(2, 3) "accelerated".
2
1
3
201
Fixed my app. I didn't have weights designed to avoid sparsity. With carefully designed inputs and weights, I got 85 TOPS. For FP8, I got only 52 TOPS.
2
1
3
178
Dug into ANECompiler.framework of iOS/macOS 27 RC and found “bonded networks” on H18g/M6 and H19/A20 Pro. Before, multi-ANE chips like the M-Ultra just split up the work at the driver level across separate devices. (1/2)
2
2
1
6
249
But with bonded networks, the compiler actually splits a single model across two physical ANE units itself. So, I guess there is relatively high-speed interconnect between the two ANE units. The compiler spits out a .hwx file with both bonded and non-bonded versions. (2/2)
2
1
5
584
If you ever wondered how to run Apple's ANE .hwx file on non-jailbroken phones, check my little program github.com/freedomtan/coreml…
1
4
144
It turns out it's possible to retrieve per-op profiling information w/o using `MLComputePlan`. Some undocumented classes and methods are required, though. the output: github.com/freedomtan/coreml… simple objective-c code: github.com/freedomtan/coreml… @fleetwood___: look what I found
1
4
230
According to the name of its firmware, M3's ANE is h15/themis, the one from A16 (A17 Pro's ANE is h16/iaso). So its compute capacity stays roughly the same as A16.
248
Wow, I didn't know that the 2nd of "The AWK Programming Language" is coming. AWK is my favorite language in Android. Yes, in Android. awk.dev/
3
241
Wow
SnapFusion: Text-to-Image Diffusion Model on Mobile Devices within Two Seconds paper page: huggingface.co/papers/2306.0… present a generic approach that, for the first time, unlocks running text-to-image diffusion models on mobile devices in less than 2 seconds. We achieve so by introducing efficient network architecture and improving step distillation. Specifically, we propose an efficient UNet by identifying the redundancy of the original model and reducing the computation of the image decoder via data distillation. Further, we enhance the step distillation by exploring training strategies and introducing regularization from classifier-free guidance. Our extensive experiments on MS-COCO show that our model with 8 denoising steps achieves better FID and CLIP scores than Stable Diffusion v1.5 with 50 steps. Our work democratizes content creation by bringing powerful text-to-image diffusion models to the hands of users.
1
2
3
444
based on Keras CV python code, I wrote some C++ code so that I can run Stable Diffusion on Android with tflite models I converted. github.com/freedomtan/keras_…
1
5
1,128
wrote a script to show Stable Diffusion tflite models I converted work as expected mostly of the code is borrowed from Keras CV implementation @RisingSayak github.com/freedomtan/keras_…
3
609
wrote a python script to parse all iOS 16 Espresso models (*.espresso.{net,shape}), print i/o tensor names and shape, and dump model graph. github.com/freedomtan/coreml…
2
5
668
in /Volumes/SydneyC20C65.D73OS/ $ find . -name *.espresso.net -type f -exec python parse_net.py {} \;
1
497
TIL, some jpeg decoder might use fast but not so accurate dct. For example, if tf.io.decode_image() or tf.io.decode_jpeg() is used to decode jpeg files, you might get unexpected results!
1
1
if image quality matters, remember to set the dct_method when using tf.io.decode_jpeg(). tensorflow.org/api_docs/pyth…
1
1
Ha, I used Cuecat before
Sometime in 2001, I walked into a Radio Shack on San Francisco's Market Street and asked for a Cuecat: a handheld barcode scanner that looked a bit like a cat and a bit like a sex toy. The clerk handed one over to me and I left, feeling a little giddy. I didn't pay a cent. 1/
According to its device tree, the Everest (the big core of Apple A16 bionic) cluster in iPhone 14 Pro has 0x1000000 = 16 MiB L2 cache. Note that M1 L2 size was wrong in its device tree. So this is a reference only. gist.github.com/freedomtan/5…
1
1
Reports of TensorFlow's Death Have Been Greatly Exaggerated
Today, the results of the 2022 global developer survey (run by StackOverflow) just went out. TensorFlow is used more than any other ML tool -- 12.95% of all developers use TensorFlow (slightly more than sklearn at 12.59%, and 1.5x more than PyTorch at 8.61%).
3
there's something so satisfying about watching matrix multiplies propagate within systolic arrays
1