GithubHelp home page GithubHelp logo

smilelab-fl / fedvocab Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 217 KB

Code for paper "Federated Model Decomposition with Private Vocabulary for Text Classification"

License: Apache License 2.0

Python 99.94% Shell 0.06%

fedvocab's Introduction

FedeVocab

Licence Build

Code for paper "Federated Model Decomposition with Private Vocabulary for Text Classification". In this paper, we propose a fedrated model decomposition method that protects the privacy of vocabularies, shorted as FedeVocab.

Installation

Directory Structure

Before using our code, we recommend running FedeVocab according to the following directory structure:

├── workspace  
│   └── data   
|   |   └── fednlp_data  
│   ├── pretrain
│   │   └── cv  
│   ├── output  
│   └── code  
│       └── fedevocab

You can run the following command:

mkdir workspace  
cd workspace  
mkdir data  
mkdir code  
mkdir pretrained  
cd pretrained  
mkdir nlp  
cd ..  
cd code  

Requirement

The python version of the running environment is 3.7+ and the pytorch version is 1.10+.

git clone 
cd fedevocab  
pip install -r resquirements.txt  

How to run FedeVocab

Our code is built on FedNLP. To use our code, you must clone FedNLP.

Utility Experiments

bash run/detlm_alone/fedrun_sweep.sh sst_2 distilbert v100 2

Privacy Experiments

bash run/attack/dlg.sh /workspace {save_times} {model_type} {gpu_id} {batch_size}

Licence

Apache 2.0

fedvocab's People

Contributors

iezhuozhuo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.