KTransformers

Active
GitHub Python Apache-2.0

Description

A flexible framework for experiencing heterogeneous LLM inference and fine-tuning optimizations — run large language models efficiently on consumer hardware with kernel-level optimizations.

Key Features

  • CPU-GPU heterogeneous computing for efficient LLM inference and fine-tuning
  • AMX/AVX optimized kernels for INT4/INT8 quantized inference on Intel CPUs
  • MoE optimization with NUMA-aware memory management for Mixture-of-Experts models
  • LLaMA-Factory integration for ultra-large MoE model fine-tuning (DeepSeek-V3/R1)
  • FP8 GPU kernel support achieving 3-28x speedup on single GPU with 24GB VRAM
  • Multi-backend support: Intel AMX, NVIDIA CUDA, AMD ROCm, and Ascend NPU

Use Cases

💡 Running DeepSeek-R1/V3 on consumer hardware with 24GB VRAM
💡 Fine-tuning large MoE models with limited GPU memory using quantization
💡 Integrating with SGLang for production LLM serving at scale
💡 Deploying AI agents on edge devices with CPU-GPU hybrid inference
💡 Research on heterogeneous computing optimizations for LLM workloads

Strengths & Limitations

Strengths

  • Actively maintained, recent updates
  • High community interest (19.5k stars)
  • Permissive open-source license (Apache-2.0)
  • Established track record (2 years in production)

Quick Start

cd kt-kernel
pip install .

# For SFT with LLaMA-Factory:
# cd /path/to/LLaMA-Factory
# pip install -e . && pip install -r requirements/ktransformers.txt

Related Projects

mistral.rs

7.6k · Rust
Active A

Fast, flexible LLM inference engine built in Rust — supports multiple model architectures and quantization schemes for high-performance local LLM deployment.

rustllmtools +1
  • · Zero-Config Model Loading — auto-detect architecture, quantization format, and chat template from any Hugging Face model
  • · True Multimodality — text, vision, video, audio input, speech generation, image generation, and embeddings in one engine
  • · Smart Quantization — UQFF prebuilt quantizations and ISQ with automatic best-format selection at each level

Vision Agents

8.1k · Python
Active A+

Open Vision Agents by Stream. Build voice and vision agents quickly with any model or video provider, using Stream's edge network for ultra-low latency realtime interactions.

voiceagentpython +3
  • · Real-time video AI with YOLO, Roboflow integration combined with Gemini/OpenAI for live visual understanding
  • · Ultra-low latency audio/video under 30ms via Stream's edge network with 500ms join time
  • · Native SDK methods from OpenAI, Gemini, and Claude for always-latest LLM capabilities

MiroThinker

8.4k · Python
Normal A

A deep research agent framework optimized for complex research and prediction tasks, with MiroThinker-1.7 and MiroThinker-H1 models achieving 74.0 and 88.2 on BrowseComp benchmark, supporting multi-step reasoning and information retrieval.

pythonagentllm +3
  • · Deep research agent framework optimized for complex research and prediction tasks
  • · MiroThinker-1.7 achieves 74.0 on BrowseComp, H1 model reaches 88.2
  • · Supports 256K context window and up to 300 tool calls per task

LangExtract

38.5k · Python
Active A+

A Python library by Google for extracting structured information from unstructured text using LLMs with precise source grounding and interactive visualization, designed for data annotation and knowledge extraction workflows.

data-processingllmpython +2
  • · Precise source grounding — Every extraction maps to exact source text location with visual highlighting for traceability and verification
  • · Controlled structured outputs — Few-shot example enforced output schema, leveraging Gemini controlled generation for robust results
  • · Long document optimization — Text chunking, parallel processing, and multi-pass strategy to overcome needle-in-a-haystack challenges