Coder Social home page Coder Social logo

tylerpuig / openpipe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openpipe/openpipe

0.0 0.0 0.0 7.45 MB

Turn expensive prompts into cheap fine-tuned models

Home Page: https://openpipe.ai

License: Apache License 2.0

Shell 0.58% JavaScript 1.08% Python 13.94% TypeScript 83.64% PLpgSQL 0.56% Dockerfile 0.19%

openpipe's Introduction

logo

OpenPipe

Open-source fine-tuning and model-hosting platform.

License Apache-2.0 PRs Welcome GitHub commit activity GitHub closed issues Y Combinator S23

Hosted App - Running Locally - Docs


Use powerful but expensive LLMs to fine-tune smaller and cheaper models suited to your exact needs. Evaluate model and prompt combinations in the playground. Query your past requests and export optimized training data. Try it out at https://app.openpipe.ai or run it locally.

fine-tune demo

Features

  • Easy integration with OpenAI's SDK in both Python and TypeScript.
  • Fine-tune GPT 3.5, Mistral, and Llama 2 models. Host on-platform or download the weights.
    • Model output is OpenAI-compatible.
    • Switching from GPT 4 to a fine-tuned Mistral model only requires changing the model name.
  • Swiftly query logs using intuitive built-in filters.
  • Import datasets in OpenAI-compatible JSONL files.
  • Prune large chunks of duplicate text like system prompts.
  • Compare output accuracy against base models like gpt-3.5-turbo.

Supported Base Models

To fine-tune Mistral and Llama 2 models in the hosted app, join the waitlist.

  • mistral-7b
  • llama-2-7b
  • llama-2-13b
  • gpt-3.5-turbo

Documentation

Running Locally

  1. Install Postgresql.
  2. Install NodeJS 20 (earlier versions will very likely work but aren't tested).
  3. Install pnpm: npm i -g pnpm
  4. Clone this repository: git clone https://github.com/openpipe/openpipe
  5. Install the dependencies: cd openpipe && pnpm install
  6. Create a .env file (cd app && cp .env.example .env) and enter your OPENAI_API_KEY.
  7. If you just installed postgres and wish to use the default DATABASE_URL run the following commands:
psql postgres
CREATE ROLE postgres WITH LOGIN PASSWORD 'postgres';
ALTER ROLE postgres SUPERUSER;
  1. Update DATABASE_URL if necessary to point to your Postgres instance and run pnpm prisma migrate dev in the app directory to create the database.
  2. Create a GitHub OAuth App, set the callback URL to <your local instance>/api/auth/callback/github, e.g. http://localhost:3000/api/auth/callback/github.
  3. Update the GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET values from the Github OAuth app (Note: a PR to make auth optional when running locally would be a great contribution!).
  4. To start the app run pnpm dev in the app directory.
  5. Navigate to http://localhost:3000

Testing Locally

  1. Copy your .env file to .env.test.
  2. Update the DATABASE_URL to have a different database name than your development one
  3. Run DATABASE_URL=[your new datatase url] pnpm prisma migrate dev --skip-seed --skip-generate
  4. Run pnpm test

openpipe's People

Contributors

arcticfly avatar corbt avatar bjsi avatar tylerpuig avatar dmitry-bezyazychnyy avatar jross111 avatar rbruels avatar sammcj avatar khareyash05 avatar jarenm avatar sweep-ai[bot] 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.