Giter Site home page Giter Site logo

binh-forked-projects / few-shot-learning-label-tuning Goto Github PK

View Code? Open in Web Editor NEW

This project forked from symanto-research/few-shot-learning-label-tuning

0.0 0.0 0.0 68 KB

A few-shot learning method based on siamese networks.

License: Other

Shell 0.44% Python 99.56%

few-shot-learning-label-tuning's Introduction

Few-Shot Learning with Siamese Networks and Label Tuning

A few-shot learning method based on siamese networks.

Code & models for the paper to appear at ACL 2022.

The Symanto Few-Shot Benchmark

symanto-fsb implements the benchmark discussed in the paper.

It can be easily extended to evaluate new models. See the extension section below.

Installation

pip install -e .

CLI

Char-SVM

symanto-fsb evaluate-char-svm output/char_svm --n-trials=1

This will run the specified number of trials on each dataset and write results to the output directory. Afterwards you can create a result table:

symanto-fsb report output /tmp/report.tsv

Sentence-Transformer

Zero-Shot

symanto-fsb \
   evaluate-sentence-transformer \
    output/pml-mpnet \
    --gpu 0 \
    --n-examples=0 \
    --n-trials=1 

Few-Shot

symanto-fsb \
   evaluate-sentence-transformer \
    output/pml-mpnet \
    --gpu 0 \
    --n-examples=8 \
    --n-trials=1

Extension

In general a new model is added by adding:

  1. A new implementation of the Predictor interface
  2. A new command to cli.py

Known Issues

Datasets hosted on Google Drive do not work right now: datasets issue/3809

Testing & Maintenance

pip install -r dev-requirements.txt
dev-tools/format.sh
dev-tools/lint.sh
dev-tools/test.sh

Models

For the sake of comparability we trained 4. The code above can be used with the Siamese network models.

Cross Attention

Siamese Networks

Disclaimer

This is not an official Symanto product!

How to Cite

@inproceedings{labeltuning2022,
	title        = {{Few-Shot} {Learning} with {Siamese} {Networks} and {Label} {Tuning}},
	author       = {M{\"u}ller, Thomas and Pérez-Torró, Guillermo and Franco-Salvador, Marc},
	year         = {2022},
	booktitle    = {ACL (to appear)},
	url          = {https://arxiv.org/abs/2203.14655},
}

few-shot-learning-label-tuning's People

Contributors

muelletm avatar guisheperez avatar neosyon 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.