GithubHelp home page GithubHelp logo

haodeqi / sparsezoo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from neuralmagic/sparsezoo

0.0 0.0 0.0 674 KB

Neural network model repository for highly sparse and sparse-quantized models with matching sparsification recipes

License: Apache License 2.0

Python 96.65% Makefile 0.71% Jupyter Notebook 1.38% Dockerfile 1.26%

sparsezoo's Introduction

tool icon  SparseZoo

Neural network model repository for highly sparse and sparse-quantized models with matching sparsification recipes

Documentation Main GitHub release GitHub Contributor Covenant

Overview

SparseZoo is a constantly-growing repository of sparsified (pruned and pruned-quantized) models with matching sparsification recipes for neural networks. It simplifies and accelerates your time-to-value in building performant deep learning models with a collection of inference-optimized models and recipes to prototype from. Read more about sparsification here.

Available via API and hosted in the cloud, the SparseZoo contains both baseline and models sparsified to different degrees of inference performance vs. baseline loss recovery. Recipe-driven approaches built around sparsification algorithms allow you to use the models as given, transfer-learn from the models onto private datasets, or transfer the recipes to your architectures.

The GitHub repository contains the Python API code to handle the connection and authentication to the cloud.

SparseZoo Flow

Highlights

Installation

This repository is tested on Python 3.6-3.9, and Linux/Debian systems. It is recommended to install in a virtual environment to keep your system in order.

Install with pip using:

pip install sparsezoo

Quick Tour

Python APIs

The Python APIs respect this format enabling you to search and download models. Some code examples are given below.

Searching the Zoo

from sparsezoo import Zoo

models = Zoo.search_models(domain="cv", sub_domain="classification")
print(models)

Common Models

from sparsezoo.models.classification import resnet_50

model = resnet_50()
model.download()

print(model.onnx_file.downloaded_path())

Searching Optimized Versions

from sparsezoo import Zoo
from sparsezoo.models.classification import resnet_50

search_model = resnet_50()
sparse_models = Zoo.search_sparse_models(search_model)

print(sparse_models)

Console Scripts

In addition to the Python APIs, a console script entry point is installed with the package sparsezoo. This enables easy interaction straight from your console/terminal.

Downloading

Download command help

sparsezoo.download -h


Download ResNet-50 Model

sparsezoo.download zoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/base-none


Download pruned and quantized ResNet-50 Model

sparsezoo.download zoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/pruned_quant-moderate

Searching

Search command help

sparsezoo search -h


Searching for all classification models in the computer vision domain

sparsezoo search --domain cv --sub-domain classification


Searching for all ResNet-50 models

sparsezoo search --domain cv --sub-domain classification \
    --architecture resnet_v1 --sub-architecture 50

For a more in-depth read, check out SparseZoo documentation.

Resources

Learning More

Release History

Official builds are hosted on PyPI

Additionally, more information can be found via GitHub Releases.

License

The project is licensed under the Apache License Version 2.0.

Community

Contribute

We appreciate contributions to the code, examples, integrations, and documentation as well as bug reports and feature requests! Learn how here.

Join

For user help or questions about SparseZoo, sign up or log in to our Deep Sparse Community Slack. We are growing the community member by member and happy to see you there. Bugs, feature requests, or additional questions can also be posted to our GitHub Issue Queue.

You can get the latest news, webinar and event invites, research papers, and other ML Performance tidbits by subscribing to the Neural Magic community.

For more general questions about Neural Magic, please fill out this form.

sparsezoo's People

Contributors

bfineran avatar dbarbuzzi avatar dbogunowicz avatar dhuangnm avatar horheynm avatar jeanniefinks avatar kevinaer avatar markurtz avatar mgoin avatar rahul-tuli avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.