Skip to main content

tinybig library for deep function learning

Project description

function_data


Introduction

tinybig is a Python library developed by the IFM Lab for deep function learning model designing and building.

Citation

If you find tinybig library and RPN papers useful in your work, please cite the RPN papers as follows:

@article{Zhang2024RPN_version1,
    title={RPN: Reconciled Polynomial Network Towards Unifying PGMs, Kernel SVMs, MLP and KAN},
    author={Jiawei Zhang},
    year={2024},
    eprint={2407.04819},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

@article{Zhang2024RPN_version2,
    title={RPN 2: On Interdependence Function Learning Towards Unifying and Advancing CNN, RNN, GNN, and Transformer},
    author={Jiawei Zhang},
    year={2024},
    eprint={2411.11162},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

Installation

You can install tinybig either via pip or directly from the github source code.

Install via Pip

pip install tinybig

Install from Source

git clone https://github.com/jwzhanggy/tinyBIG.git

After entering the downloaded source code directory, tinybig can be installed with the following command:

python setup.py install

If you don't have setuptools installed locally, please consider to first install setuptools:

pip install setuptools 

Install Dependency

Please download the requirements.txt file, and install all the dependency packages:

pip install -r requirements.txt

Verification

If you have successfully installed both tinybig and the dependency packages, now you can use tinybig in your projects.

To ensure that tinybig was installed correctly, we can verify the installation by running the sample python code as follows:

>>> import torch
>>> import tinybig as tb
>>> expansion_func = tb.expansion.taylor_expansion()
>>> expansion_func(torch.Tensor([[1, 2]]))

The output should be something like:

tensor([[1., 2., 1., 2., 2., 4.]])

Tutorials

Tutorial ID Tutorial Title Last Update
Tutorial 0 Quickstart Tutorial July 6, 2024
Tutorial 1 Data Expansion Functions July 7, 2024
Tutorial 2 Parameter Reconciliation Functions November 28, 2024
Tutorial 3 Data Interdependence Functions December 1, 2024
Tutorial 4 Structural Interdependence Functions December 10, 2024

Examples

Example ID Example Title Released Date
Example 0 Failure of KAN on Sparse Data July 9, 2024
Example 1 Elementary Function Approximation July 7, 2024
Example 2 Composite Function Approximation July 8, 2024
Example 3 Feynman Function Approximation July 8, 2024
Example 4 MNIST Classification with Identity Reconciliation July 8, 2024
Example 5 MNIST Classification with Dual LPHM Reconciliation July 8, 2024
Example 6 CIFAR10 Image Object Recognition July 8, 2024
Example 7 IMDB Review Classification July 9, 2024
Example 8 AGNews Topic Classification July 9, 2024
Example 9 SST-2 Sentiment Classification July 9, 2024
Example 10 Iris Species Inference (Naive Probabilistic) July 9, 2024
Example 11 Diabetes Diagnosis (Comb. Probabilistic) July 9, 2024
Example 12 Banknote Authentication (Comb. Probabilistic) July 9, 2024

Library Organizations

Components Descriptions
tinybig a deep function learning library like torch.nn, deeply integrated with autograd
tinybig.model a library providing the RPN models for addressing various deep function learning tasks
tinybig.module a library providing the basic building blocks for RPN model designing and implementation
tinybig.layer a library providing the implemented layers for RPN model designing and implementation
tinybig.head a library providing the implemented heads for RPN model designing and implementation
tinybig.config a library providing model component instantiation from textual configuration descriptions
tinybig.expansion a library providing the "data expansion functions" for effective data expansions
tinybig.compression a library providing the "data compression functions" for effective data compression
tinybig.transformation a library providing the "data transformation functions" for effective data transformation
tinybig.reconciliation a library providing the "parameter reconciliation functions" for parameter efficient learning
tinybig.remainder a library providing the "remainder functions" for complementary information addition
tinybig.interdependence a library providing the "interdependence functions" for data interdependence relationships modeling
tinybig.fusion a library providing the "fusionn functions" for multi-source/channel/head data integration
tinybig.koala a library providing the functions from mathematics, statistics and other interdisciplinary sciences
tinybig.data a library providing multi-modal datasets for solving various deep function learning tasks
tinybig.output a library providing the processing method interfaces for output processing, saving and loading
tinybig.loss a library providing the loss functions for model introduced error computation in learning
tinybig.metric a library providing the metrics that can be used for model performance evaluation
tinybig.optimizer a library providing the optimizers that can be used for model parameter optimization in training
tinybig.learner a library providing the learner that can be used for model effective and efficient training
tinybig.visual a library of utility functions for data, model and learning process visualization and rendering
tinybig.util a library of utility functions for RPN model design, implementation and learning
tinybig.zootopia a library of models developed with the functions for concrete AI applications

License & Copyright

Copyright © 2024 IFM Lab. All rights reserved.

  • tinybig source code is published under the terms of the MIT License.
  • tinybig's documentation and the RPN papers are licensed under a Creative Commons Attribution-Share Alike 4.0 Unported License (CC BY-SA 4.0).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tinybig-0.2.1.tar.gz (40.8 MB view details)

Uploaded Source

Built Distribution

tinybig-0.2.1-py3-none-any.whl (449.7 kB view details)

Uploaded Python 3

File details

Details for the file tinybig-0.2.1.tar.gz.

File metadata

  • Download URL: tinybig-0.2.1.tar.gz
  • Upload date:
  • Size: 40.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for tinybig-0.2.1.tar.gz
Algorithm Hash digest
SHA256 abd5c384f4f94b6d5e013e848a66b3ce386143d25c1a401d70b810f22a32c7ed
MD5 d49dd838c3f5d07688c0f90d65b6a570
BLAKE2b-256 cf9858a03a1d3f2976ee6570c7aff2dde2dfbd43ae6df038cd64bc4e4ccaa5c8

See more details on using hashes here.

File details

Details for the file tinybig-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: tinybig-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 449.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for tinybig-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 854ca4a22af333847ce21166762efc28e693f55b7c6b05ac18fabed774caad62
MD5 bf3b5e6d1444d7f2323bafe9c2160a3f
BLAKE2b-256 8446cf74bb4c9bc188b6b74f9e10761f123b5fda6f23dbb8fbcc40ae239edf13

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page