openplayground  by nat

LLM playground for local laptop use

created 2 years ago
6,359 stars

Top 8.2% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a local, web-based playground for interacting with various large language models (LLMs), targeting developers and power users who want to experiment with different models and parameters without relying on cloud services. It offers a comprehensive UI for comparing models, tuning parameters, and managing chat history, with the benefit of running entirely on a user's laptop.

How It Works

Openplayground utilizes a client-server architecture. The frontend, built with Parcel and React, provides a rich user interface for prompt engineering and model comparison. The backend, a Flask server, interfaces with multiple LLM providers, including OpenAI, Anthropic, Cohere, HuggingFace, and local models via llama.cpp. It supports adding new models by defining their API endpoints and parameters in a models.json configuration file, allowing for easy integration of both hosted and locally run LLMs.

Quick Start & Requirements

  • Install via pip: pip install openplayground
  • Run: openplayground run
  • Alternatively, use Docker: docker run --name openplayground -p 5432:5432 -d --volume openplayground:/web/config natorg/openplayground
  • Development setup requires npm install and Python 3.x.
  • Official hosted version: nat.dev

Highlighted Details

  • Supports a wide range of LLM providers: OpenAI, Anthropic, Cohere, HuggingFace, Replicate, Banana, and llama.cpp.
  • Features a full playground UI with history, parameter tuning, keyboard shortcuts, and logprops.
  • Enables side-by-side model comparison with identical prompts.
  • Automatically detects local HuggingFace models and allows installation of new ones.
  • Works on mobile devices.

Maintenance & Community

Instigated by Nat Friedman, with initial implementation by Zain Huda and significant contributions from Alex Lourenco. Ideas for contributions are listed, including token/cost counters and GitHub Actions integration.

Licensing & Compatibility

The repository does not explicitly state a license in the provided README. This requires further investigation for commercial use or closed-source linking.

Limitations & Caveats

The README does not specify a license, which could be a blocker for commercial adoption. While it claims to work on phones, extensive testing on various mobile platforms is not detailed.

Health Check
Last commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
0
Star History
30 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.