Flama 2.0 turns a local AI model into an API and chat app

Flama 2.0 adds tools for downloading a , packaging it into a .flm file, running it on a local computer, and serving it over HTTP. A model from can be fetched with `flama get`, which saves the model data and settings together. `flama model run` sends one prompt and returns the full answer, while `flama model stream` shows the answer as it is being produced.

Settings such as and maximum can be changed, and a JSON list of messages can be passed in for multi-turn chat testing. `flama serve` starts a , with the example running on `127.0.0.1:8000`, and provides both an API and a built-in chat screen. It supports OpenAI, Anthropic, and Ollama-compatible connection styles, so existing tools can call the Flama server like a normal AI API.

Claude CLI can also be pointed at the local Flama Anthropic endpoint by changing `ANTHROPIC_BASE_URL` and setting the names to a such as `gemma`.

Key points

  • Flama 2.0 can package a downloaded into a .flm file.
  • `flama model run` returns a full answer, while `flama model stream` shows the answer as it is generated.
  • `flama serve` exposes the through an HTTP API and a built-in chat screen.
  • OpenAI, Anthropic, and Ollama-compatible connection styles make it easier to reuse existing AI tools.
  • Claude CLI can be redirected to a local Flama server to test Claude-like workflows with a .
Read original