compile svd model and fix some bugs