Giter Club home page Giter Club logo

llm_playground_cyril's Introduction

LLM Playground

This repository is a minimal version of some other work, in order to easily interact with common open-source Large Language Models (LLMs) and to log the interactions.

Environment setup

If you do not already have conda on your machine, please run the following command, which will install miniforge3 (for Linux) and create the correct conda environment:

cd path/to/this/repo
source config.sh

If you already have a conda installation, you can only run:

cd path/to/this/repo
conda env create --file requirements.yaml

Authentication system

By default, we use a very simple authentication system in order to access the webapp. You will need to create a file called .gradio_login.txt in the root of this repository, containing both a username and password in two separate lines such as

username
password

Then you can use this username and password to connect to the webapp when prompted, and you can share them with other people if you want them to try out the demo.

Usage

We use Gradio to easily create a web interface on which you can interact with the models. By default, simply run

python3 webapp.py

in order to launch the webapp. You should see both a local and public URL to access the webapp. You will be asked for your credentials when clicking on either link. You can also deactivate authentication using the --no_auth flag:

python3 webapp.py --no_auth

But in this case, everyone with the public link will be able to access the webapp, even if you did not share the username and password with them.

Logging

All interactions (input/output pairs) with the models will be saved into a csv file, namely text_logs/log.csv for simple causal language modeling and into chatbot_logs/log.csv for conversations (chats) with the model.

Computational power requirements

Finally, note that running LLMs is very costly in terms of computational power. For this reason, it is highly recommended to run on a machine with AT LEAST 1 GPU. Depending on your hardware, you may not be able to load some models, and/or inference on some models may be very slow.

llm_playground_cyril's People

Contributors

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