Giter Site home page Giter Site logo

fshp971 / encoder-inference Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3.92 MB

[Preprint] Official repository for "Pre-trained Encoder Inference: Revealing Upstream Encoders In Downstream Machine Learning Services"

License: MIT License

Dockerfile 0.25% Python 90.40% Shell 9.35%

encoder-inference's Introduction

Pre-trained Encoder Inference: Revealing Upstream Encoders In Downstream Machine Learning Services

This is the official repository for the preprint "Pre-trained Encoder Inference: Revealing Upstream Encoders In Downstream Machine Learning Services" by Shaopeng Fu, Xuexue Sun, Ke Qing, Tianhang Zheng, and Di Wang.

News

  • 08/2024: The paper was released on arXiv.

Installation

Requirements

  • Python 3.11
  • CUDA 11.8
  • PyTorch 2.4.0

Build environment via Anaconda

Download and install Anaconda3. Then, run following commands:

# create & activate conda environment
conda create -n encoder-inference python=3.11
conda activate encoder-inference

# install packages
conda install pytorch=2.4.0 torchvision=0.19.0 pytorch-cuda=11.8 -c pytorch -c nvidia
pip install --upgrade transformers==4.41.2 diffusers==0.28.2 timm==1.0.7 accelerate==0.32.0 datasets==2.20.0 scipy==1.14.0 bitsandbytes==0.43.1

Build environment via Docker

The docker building file is ./Dockerfile. Run following commands, and then the built image is encoder-inference:latest.

docker pull pytorch/pytorch:2.4.0-cuda11.8-cudnn9-runtime
docker build --tag 'encoder-inference' .

PS: If you plan to use Docker to run your experiments, don't forget to mount your default cache folder (e.g., ${HOME}/.cache) to /root/.cache in the Docker container.

Quick Start

Example scripts and configurations are collected in folders ./scripts and ./configs, respectively.

Tutorials of running different experiments are collected in folder ./tutorials. They are:

Citation

@article{fu2024pre,
  title={Pre-trained Encoder Inference: Revealing Upstream Encoders In Downstream Machine Learning Services},
  author={Shaopeng Fu and Xuexue Sun and Ke Qing and Tianhang Zheng and Di Wang},
  journal={arXiv preprint arXiv:2408.02814},
  year={2024}
}

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.