This is an early release preview. You may encounter bugs.
Flama logo
Unclaimed

Tool inference interface connectors

Flama

Ollama is fine for trying a model. vLLM becomes interesting when that model has to serve traffic: many users, agent work

B 73/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
Discussion

01 / Summary

About Flama.

Flama is a Python framework that turns machine learning and generative models into HTTP APIs. It packages a model from scikit-learn, TensorFlow, PyTorch, or an LLM into one portable .flm file, so every model looks the same to the API regardless of where it came from, and then serves that file without application code. A CLI command also downloads a model from the Hugging Face Hub and packages it directly.

A predictive model gets a metadata endpoint, a prediction endpoint, an OpenAPI schema, and Swagger UI. A generative model gets a native query and streaming API plus a built-in streaming chat UI that renders Markdown, LaTeX, and Mermaid. The same model can also expose OpenAI-, Anthropic-, and Ollama-compatible endpoints side by side, so existing clients for those APIs work against it unchanged. Generative models run on vLLM (Linux with CUDA) or MLX (Apple Silicon), and Flama picks the backend at load time.

Each .flm file is self-describing: it carries the framework and version, the model class, hyperparameters, training metrics, and auxiliary files, with the metadata ahead of the weights so inspection is a header read. A CI job can gate promotion on those metrics and score a reference set offline through the same code path the server uses. A single JSON spec file describes an application serving several models, and official container images serve it.

Flama also exposes tools, resources, and prompts to AI agents over the Model Context Protocol (MCP). A decorator declares each capability, and Flama derives the JSON Schema from type hints. Beyond model serving, it is a general API framework with a Rust core for routing, JSON encoding, request parsing, and compression, plus CRUD resources over SQLAlchemy, dependency injection, Pydantic, Typesystem, or Marshmallow schemas, pagination, JWT authentication, and Server-Sent Events.

  • Portable model format: packages scikit-learn, TensorFlow, PyTorch, and LLM models into a single .flm file
  • Models on demand: downloads and packages a model from the Hugging Face Hub with one command
  • Generative serving: native, OpenAI-, Anthropic-, and Ollama-compatible endpoints on one model at the same time
  • Backend selection: runs generative models on vLLM with CUDA or MLX on Apple Silicon
  • Built-in chat UI: streaming chat page with Markdown, LaTeX, and Mermaid rendering for every served model
  • Self-describing artifacts: framework, hyperparameters, and training metrics travel inside the file
  • Offline inference: scores reference data through the server's code path without starting a server
  • Multi-model deployments: one JSON spec file describes an application and the models it serves
  • Native MCP: decorators expose tools, resources, and prompts with schemas derived from type hints
  • Rust core: routing, JSON encoding, request parsing, and compression compiled to native code
  • API toolkit: SQLAlchemy CRUD resources, dependency injection, OpenAPI docs, pagination, and JWT authentication

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

04 / Build

Build with Flama.

Browse the catalog for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get Flama →

Browse the catalog