GithubHelp home page GithubHelp logo

local-llm's Introduction

local-llm

The goal of this project is to run an LLM locally and expose the commands via API and streamlit app. The API and streamlit app can be ran via docker-compose services.


Running the project

  • create/start the docker services via command-line make docker_run
    • This may take some time, the following models are downloaded into the /llms/models directory of the container:
      • ggml-vic13b-q5_1.bin
      • ggml-alpaca-7b-q4.bin
  • (optional) you can run unit tests (note: these take around 15 seconds to run because I load both models which is slow) either with the make tests command by either:
    • attaching VS code to one of the containers and running the command inside the VS Code terminal
    • attaching the command line directly to the container via the command make zsh
  • once services are started, in a separate terminal
    • run make streamlit to open up the streamlit app in your default browser
    • run make api_docs to open of the docs for the FastAPI app

To test out the API via command-line, run:

curl -X POST -H "Authorization: Bearer token123" -H "Content-Type: application/json" -d '{"prompt": "Q: What is the capital of France? A: "}' http://localhost:8080/completions

Resources

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.