Facebook open sources Caffe2, its flexible deep learning framework of choice

Today Facebook open sourced Caffe2. The deep learning framework follows in the steps of the original Caffe, a project started at the University of California, Berkeley. Caffe2 offers developers greater flexibility for building high-performance products that deploy efficiently.

This isn’t the first time that Facebook has engaged with the Caffe community. Back in October, Facebook announced Caffe2Go, what effectively was a mobile CPU and GPU optimized version of Caffe2 (they even both have Caffe2 in their names if you parse it right). Caffe2Go received attention at that time because its release coincided with Style Transfer.

Notably, the company also released extensions to the original Caffe. The majority of these changes make Caffe more attractive to developers building services for large audiences. For projects where resources are of no consequence, Facebook has historically turned to Torch — a library it finds optimal for research use cases.

Every tech company wants to tout the scalability of its machine learning framework of choice. I asked Yangqing Jia, the lead author on Caffe2, what he thought of MXNet and the noise Amazon has been making about its ability to scale. Reasonably, he was cautious about dropping benchmarking numbers for comparison. These numbers can have meaning, but they are heavily influenced by the actual implementation of a machine learning model and subject to a fair amount of “DIY” volatility.

Yangqing Jia, the lead author on Caffe2 and Alex Yu, leader of business development

“All frameworks are more or less at a similar scalability factor,” explained Jia. “We’re pretty confident that Caffe2 is probably a little bit better than the rest.”

Facebook is pouring a lot of resources into both Caffe2 and PyTorch. Today’s release accompanies partnerships at the hardware, device and cloud levels. Alex Yu, leader of business development for Caffe2, explained to me that Facebook aimed to include the market leaders in each category. This meant Nvidia and Intel on the hardware side, Qualcomm on the device side and Amazon and Microsoft on the cloud side. And while Google wasn’t targeted, a GCP partnership wouldn’t be out of the question going forward.

Prior to release, Caffe2 was deployed at scale across Facebook. The team also took considerations for the developer communities familiar with the original Caffe. Caffe models can be easily converted to Caffe2 models with a utility script. Facebook is releasing documentation and tutorials and has put Caffe2’s source code on GitHub.