llamanet  by pinokiocomputer

Drop-in library/tool for replacing OpenAI with llama.cpp

created 1 year ago
321 stars

Top 85.7% on sourcepulse

GitHubView on GitHub
Project Summary

Llamanet provides a drop-in solution to replace OpenAI's API with local llama.cpp models, targeting developers who want to integrate LLMs into their applications without requiring users to manage separate LLM installations. It offers an OpenAI-compatible server that automatically downloads and serves GGUF models from Hugging Face, simplifying local LLM deployment.

How It Works

Llamanet functions as a proxy server that manages embedded llama.cpp instances. When an OpenAI-compatible API request is received, it checks for the specified GGUF model. If the model is not present locally, it downloads it from the provided Hugging Face URL. Subsequently, it starts a llama.cpp server for that model if one isn't already running and routes the request to it. This approach eliminates the need for users to manually install or configure LLM environments.

Quick Start & Requirements

  • Install/Run: npx llamanet@latest (Linux/Mac) or set LLAMANET_DEBUG=true && npx llamanet@latest (Windows).
  • Prerequisites: Node.js (for npx), Python (for Python integration).
  • Resources: Downloads llama.cpp binaries and models to ~/llamanet on first run.
  • Docs: https://llamanet.netlify.app

Highlighted Details

  • Seamlessly integrates with existing OpenAI SDKs in Node.js and Python.
  • Supports automatic GGUF model downloading from Hugging Face URLs.
  • Provides a CLI for managing llama.cpp server instances.
  • Acts as an OpenAI API compatible proxy server.

Maintenance & Community

Licensing & Compatibility

  • The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project is described as "drop-in" and "automagical," but the README does not detail performance benchmarks, specific hardware requirements (e.g., GPU acceleration), or potential compatibility issues with all OpenAI-powered applications. The lack of an explicit license may pose a barrier for commercial adoption.

Health Check
Last commit

1 year ago

Responsiveness

1 week

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

Explore Similar Projects

Feedback? Help us improve.