ztxz16/fastllm
ztxz16/fastllm has 5,131 GitHub stars and 506 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-06 16:23 UTC. Last push 2026-11-02.
fastllm是后端无依赖的高性能大模型推理库,帮助您在大部分设备上高效推理大模型!
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README_EN.md
OriginalFastLLM
中文 · Quick start · --auto tuning · Documentation · Benchmarks · Changelog
FastLLM is an inference engine for running and serving language models locally. Its C++ runtime does not depend on PyTorch. It supports dense and MoE models, GPU/CPU/NUMA/disk hybrid inference, and multi-GPU deployment.
- Automatic deployment:
--autoplans devices, memory, expert caches, and context capacity, with optional overrides. - Browser launcher: download models, save profiles, inspect logs, and use chat or agents in Studio.
- Compatible APIs: OpenAI Chat Completions, Responses, and Anthropic Messages.
- Multiple weight formats: Safetensors, FastLLM, AWQ, and supported GGUF models. See the model guides for coverage.
Quick start
Installation
Linux / Windows with NVIDIA GPUs:
python -m pip install -U ftllm
First-time Windows dependencies
python -m pip install https://www.modelscope.cn/models/huangyuyang/fastllmdepend-windows/resolve/master/ftllmdepend-0.0.0.2-py3-none-win_amd64.whl
For AMD GPUs, see ROCm installation (Chinese). For CPU-only and other platforms, see building from source. Installation help is in the FAQ (Chinese).
Browser launch
For multiple independent replicas on one Linux host, ftllm deploy adds background
process supervision and streaming request routing while reusing native server arguments.
Existing ftllm serve/server behavior is unchanged. See deployment configuration.
# API server, listening on 0.0.0.0:8080 by default
ftllm server Qwen/Qwen3-0.6B
# Command-line chat
ftllm run Qwen/Qwen3-0.6B
# WebUI, connected to the API server above; listens on 127.0.0.1:1616 by default
ftllm webui --api_base http://127.0.0.1:8080/v1
Run the browser deployment launcher directly:
ftllm
Select a model → choose Automatic configuration → save and start. Expand Resource limits or Model parameters only when needed. Once ready, open Studio to chat. See the launcher guide.
Command-line launch
Replace the path with a local model directory or supported GGUF file. Hugging Face repository IDs also work:
ftllm server /path/to/model --auto
--auto currently supports selected models on Linux with NVIDIA CUDA. Other platforms and models use manual deployment. The default local service URL is http://127.0.0.1:8080.
Append only the options you want to change. For example, a 32K session window and at most 2 concurrent requests:
ftllm server /path/to/model --auto --max_context_length 32768 --max_batch 2
See the --auto tuning guide for memory budgets, expert caches, chunks, speculative decoding, and fast prefill. Use ftllm run for CLI chat, ftllm tui for the terminal wizard, and ftllm bench for benchmarks.
Call the API
You can set a service name and API key at startup:
ftllm server /path/to/model --auto --model_name local-model --api_key local-key
curl http://127.0.0.1:8080/v1/chat/completions \
-H "Authorization: Bearer local-key" \
-H "Content-Type: application/json" \
-d '{"model":"local-model","messages":[{"role":"user","content":"Hello"}],"stream":false}'
For standalone chat, run ftllm webui --api_base http://127.0.0.1:8080/v1 --api_key local-key. Reasoning, tool calling, and multimodal features depend on the model.
Model deployment guides
| Model | Guide |
|---|---|
| Qwen4-Exp / Qwen3.8-Flash-Next | Flash-Next user guide |
| Qwen3.5 / Qwen3.6 / Qwen3.8 | Qwen guide |
| DeepSeek-V4 / V4-Flash | DeepSeek-V4 guide |
| DeepSeek-V4.1-Flash 1017 | DeepSeek-V4.1 guide |
| Kimi-K3 | Kimi-K3 guide |
| GLM-5 / GLM-5.3-Flash | GLM-5 guide |
| Dots3-Note / Laguna | Dots3-Note · Laguna |
Other models are listed in the support list (Chinese). For agent-assisted deployment, provide the model and option reference (Chinese). Measured speed depends on hardware, workload, and quantization; see the benchmarks.
Common options
Start with --auto options and effects. For fixed devices or model-specific settings, use the manual option reference. ftllm server --help is authoritative for the installed version.
Device settings · Decoding, templates, and tools · Download and export
Build from source
See the source-build instructions for C++ / CUDA / CPU builds, and the FAQ (Chinese) for platform troubleshooting.
Documentation
- All documentation · Launcher and Studio · Agent integrations (Chinese)
- Hybrid inference (Chinese) · Expert caches (Chinese) · Context extension (Chinese)
- Development and validation (Chinese) · Custom models (Chinese) · Custom operators (Chinese)
- Stable changelog · Nightly (Chinese)
Community and contributing
Report problems through Issues and contribute through Pull Requests. Deployment discussion QQ group: 831641348.
User and developer WeChat groups
User discussion (usage and deployment):

Developer community (contributions and development):

FastLLM is licensed under the Apache License 2.0.
Acknowledgements and references
Open-source projects and references
FastLLM uses or draws implementation ideas from the following projects and articles:
- PyTorch for low-level operator implementation ideas.
- Transformers for model architectures and reference implementations.
- llama.cpp and ik_llama.cpp for GGUF quantization formats and kernels.
- Strata for some operators.
- KVMem / kvmem-llama.cpp for design ideas behind tiered KV caching and content-based retrieval, including a bounded GPU working set, host-backed KV storage, and pre-RoPE mean-K retrieval. See the KVMem documentation for the FastLLM integration.
- FlashInfer for attention, MLA, and related operators.
- TurboMind / LMDeploy GEMM kernels: the SM70 s884 (
SM70_MMA_884/ HMMA 8x8x4) core bundled underthird_party/turbomindis ported from this source and is used for AWQ INT4, block-scaled FP8, and NVFP4 Linear paths. - 1Cat-vLLM's SM70 TurboMind integration for the AWQ integration and the FP8/NVFP4 type, layout, and small-batch tactic references. FastLLM separately implements its Torch-free raw-pointer bridge, model-weight format conversion, unaligned padding, fallbacks, and dispatch.
- KTransformers for dynamic MoE thread scheduling; see also the design article.
- Lvllm for NUMA-aware MoE scheduling.
- FreeToken for design ideas behind CUDA expert caching and related hybrid inference optimizations, including GPU-side routing and LRU cache management, on-demand refills of expert weights from host memory, and CUDA Graph-compatible execution. See the CUDA expert cache documentation for implementation and extension details.
- vLLM for tool-call parsing.
- json11 for JSON construction and parsing.
Thank you to every open-source contributor. If an attribution is missing, please report it through an Issue.
Explore related projects
affaan-m/ECC
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
298,722 starsNousResearch/hermes-agent
The agent that grows with you
261,279 starsmultica-ai/andrej-karpathy-skills
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
230,372 starsfirecrawl/firecrawl
Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
199,303 stars