ctransformers - AshokBhat/ml GitHub Wiki

CTransformers

  • An Open Source library
  • Python bindings for transformer models implemented in C/C++ using the GGML library.
  • Unified API: Consistent interface for various models.
  • Works with GGUF and GGML formats.
  • Performance Optimized for CPU and GPU usage.
  • Supports quantization
  • Easy Integration: Compatible with libraries like LangChain.

Installation

  • pip install ctransformers

Usage

from ctransformers import AutoModelForCausalLM

# Load a quantized model
model = AutoModelForCausalLM.from_pretrained("/path/to/your/model")
output = model("What is AI?")
print(output)

See also

⚠️ **GitHub.com Fallback** ⚠️