# marella/ctransformers

Python bindings for the Transformer models implemented in C/C++ using GGML library.

Repository: https://github.com/marella/ctransformers
Canonical: https://ross.abutalabs.com/products/ctransformers
Language: C
License: MIT
License Family: permissive
Topics: ai, llm, transformers, ctransformers
Last push: 2024-01-28T07:37:48+00:00

## Health v2 (maintenance only)
Score: 20/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 86
- inputs: {"age_days": 1207, "days_push": 948, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1885, forks 143 (observed 2026-08-28T04:05:48.957859+00:00)

## What it is
CTransformers provides Python bindings for transformer language models implemented in C/C++ using the GGML library. It offers a unified interface to run quantized models like LLaMA, Falcon, and GPT-2 locally with optional CUDA and Metal acceleration.

## Use cases
- run quantized llm models locally in python
- load ggml or gguf model files for text generation
- use llama models without a gpu
- integrate local llms with langchain
- stream llm output token by token
- run inference on cpu with c/c++ speed

## When to choose
- you want fast CPU inference of quantized transformer models in Python
- you need LangChain or Hugging Face Transformers compatibility for local models
- you want optional CUDA or Metal acceleration for supported models

## When to avoid
- you need the latest model architectures or active updates, since the project is in maintenance
- you require full GPU training or fine-tuning rather than inference
- you prefer llama.cpp's native Python bindings with broader model support

## Facets
- artifact type: library
- maturity: maintenance
- function: llm-inference, machine-learning, sdk
- domain: large-language-models, artificial-intelligence
- platform: python, cross-platform
- tags: ggml, gguf, quantized-models, langchain, huggingface, cpu-inference, text-generation, natural-language-processing, gpu

## Member repositories
- marella/ctransformers (main) score 20

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:48.957859+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:13:36.818494+00:00, confidence not recorded.
  - readme: https://github.com/marella/ctransformers (fetched 2026-08-28T04:05:48.957859+00:00, sha 33c1348517c5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
