GithubHelp home page GithubHelp logo

adaptive-icl-labeler's Introduction

Adaptive In-Context-Labeler

Using In-Context Learning Capability, LMQL, and multi-armed bandit examplars optimization for fast labeling pipeline

Currently WIP, but feel free to try out.

Built with react, LMQL, fastap, replicate

Demo

  1. First, run frontend and backend server via
cd frontend
npm run start
cd ../backend
uvicorn main:app --reload
  1. Run local server or use replicate backend. ("replicate:charles-dyfis-net/llama-2-13b-hf--lmtp-8bit")
  • For local server, for example, run lmql serve-model meta-llama/Llama-2-13b-chat-hf --port 8010 --cuda --load_in_4bit True

  • For replicate backend, don't run anything, instead, set osenv variables including api token

    export REPLICATE_API_TOKEN= ... # YOUR API TOKEN
    export MODEL_ID="meta-llama/Llama-2-13b-chat-hf"
    export ENDPOINT="replicate:charles-dyfis-net/llama-2-13b-hf--lmtp-8bit"
    
  1. Use the app at http://localhost:3000/. You would have to have your data in backend/data.csv file, with item_id,text,processed_value,is_processed columns. You can use backend/seed.py as an example dataset creation.

TODOS:

  • Keep track of preference statistics per examplars, and use UCB based multi-armed bandit to select examplars

  • Add more flexibility for saving - loading current state, maybe like json file or something

  • Upload data CSV and have option to do everything in browser maybe?

  • Able to edit examplars after creation

  • Abstract out LMQL so that non-tech people can use it

  • Put nice documentations

adaptive-icl-labeler's People

Contributors

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