Giter Site home page Giter Site logo

benchita's Introduction

benchita

High quality few-shots benchmarks for Italian LLMs.

Features

  • ๐Ÿš€ Parallel Execution: Distributes jobs (model+task) across all available GPUs in parallel.
  • โœ… Easy to Use: Straightforward setup and operation.
  • ๐ŸŽจ Chat Template Support: Integrates smoothly with ๐Ÿค— chat templates.
  • ๐Ÿ› ๏ธ Custom Template Support: Easily implement user-defined templates.
  • ๐Ÿ—จ๏ธ Versatile Evaluation: Capable of assessing both pretrained and chat models

Implemented tasks

Task Type Source Description Link Quality
sentipolc classification Evalita 2014 Binary classification task of positive or negative tweets (gold test set) http://www.di.unito.it/~tutreeb/sentipolc-evalita14/ gold
ironita classification Evalita 2018 Binary classification task of ironic tweets (gold test set) http://twita.di.unito.it/dataset/ironita gold
ami2020 classification Evalita 2020 Binary classification task of misogynous tweets (gold test set) https://live.european-language-grid.eu/catalogue/corpus/7005 gold
xcopa classification XCOPA Paper Translation and re-annotation of the Choice of Plausible Alternatives Dataset https://github.com/cambridgeltl/xcopa silver

Roadmap

Features

  • Inference on multiple GPUs with ๐Ÿค— accelerate
  • Support for int8 and other quantization techniques
  • Support for ๐Ÿค— peft adapters

Dataset

  • squad-it

Installation

To install Benchita, clone this repository

git clone https://github.com/galatolofederico/benchita.git
cd benchita

Create and activate a new virtual environment (or use your preferred way)

python3 -m venv env
source ./env/bin/activate

Install Benchita

pip3 install -e .

Also install PyTorch in your preferred way, for example:

pip3 install torch

Usage

To run Benchita you need to create a YAML config file (default config: config.yaml).

For example to compare cerbero-7b and cerbero-7b-openchat using the EVALITA benchmarks the config will look like this:

experiment: cerbero-7b

tasks:
  - name: ironita
    num_shots: 3
  - name: sentipolc
    num_shots: 3
  - name: ami2020
    num_shots: 3

models:
  - model:
      name: galatolo/cerbero-7b
      class: AutoModelForCausalLM
      dtype: float16
    tokenizer:
      max_length: 1024
    template:
      system_style: inject
    generate:
      batch_size: 16
      args:
        do_sample: False
  - model:
      name: galatolo/cerbero-7b-openchat
      class: AutoModelForCausalLM
      dtype: float16
    tokenizer:
      max_length: 1024
    template:
      system_style: inject
    generate:
      batch_size: 16
      args:
        do_sample: False

To start the evaluation simply run:

benchita

The results will look something like:

                                   Task  Accuracy  F1 (macro)  F1 (weighted)
galatolo/cerbero-7b             ironita  0.615826    0.597719       0.597523
galatolo/cerbero-7b           sentipolc  0.701923    0.459721       0.696584
galatolo/cerbero-7b             ami2020  0.605000    0.400814       0.601221
galatolo/cerbero-7b-openchat    ironita  0.688073    0.684083       0.684002
galatolo/cerbero-7b-openchat    ami2020  0.607000    0.591795       0.591795
galatolo/cerbero-7b-openchat  sentipolc  0.711849    0.458749       0.697562

License

benchita is released under the GNU General Public License v3 (GPL-3). This license allows users to run, study, share, and modify the software, ensuring that all derivatives remain free and open under the same terms.

benchita's People

Contributors

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