Skip to content
 
 

Latest commit

 

History

11,150 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

llama.cpp (Forked for Android/Termux Optimization)

이 프로젝트는 ggerganov/llama.cpp를 포크한 저장소입니다. 주요 목적은 Android(Termux) 환경에서 LLM(Large Language Model)을 효율적으로 구동하기 위한 빌드 최적화 및 성능 테스트입니다.

llama

LLM inference in C/C++

License: MIT Release Nightly Server Docker Winget

📌 출처 및 원본 프로젝트 (Original Source)

모든 핵심 소스 코드와 로직의 저작권은 원본 작성자에게 있습니다. 원본 프로젝트에 대한 상세한 정보와 최신 업데이트는 아래 링크를 참조하세요.


📱 현재 타겟 환경 (Target Environment)

본 포크 저장소는 특히 아래의 하드웨어 사양에 최적화된 빌드 환경을 구성하는 데 집중하고 있습니다.

  • Device: Samsung Galaxy Fold 3
  • Processor: Qualcomm Snapdragon 888
  • GPU: Adreno 660 (Vulkan / OpenCL 지원 테스트)
  • Memory: 12GB RAM
  • OS: Android (Termux 환경)

🛠️ 주요 수정 및 테스트 사항 (Work in Progress)

원본 프로젝트를 바탕으로 다음 항목들을 중점적으로 다룹니다.

  1. Build Optimization: Termux 내에서 CPU 전용, Vulkan 및 OpenCL 백엔드 빌드 시 발생하는 오류 해결.
  2. Performance Tuning: Snapdragon 888의 Adreno GPU를 활용한 추론 속도 최적화.
  3. Model Compatibility: GGUF 형식의 다양한 모델(Gemma, Qwen, Llama 등) 구동 테스트.

🚀 빠른 시작 (Quick Start)

Termux 환경에서의 기본적인 빌드 절차는 다음과 같습니다 (원본 가이드 준수).

manifesto / ggml / ops / maintainer PRs / compile times / lib llama API / llama-server REST API

ggml / ops / maintainer PRs / dev stats / lib llama API / llama-server REST API

Quick start

A few options to get llama.cpp installed on your machine:

Once installed:

# Download and run a model directly from Hugging Face
llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF

# Launch OpenAI-compatible API server
llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF
VLM session with `llama cli` VLM session with llama cli Built-in web UI against `llama serve` running Qwen 3.6 Built-in web UI against llama serve

Description

The main goal of llama.cpp is to enable LLM (and VLM) inference with minimal setup and state-of-the-art performance on a wide range of hardware - locally and in the cloud.

  • Plain C/C++ implementation without any dependencies
  • Apple silicon is a first-class citizen - optimized via ARM NEON, Accelerate and Metal frameworks
  • AVX, AVX2, AVX512 and AMX support for x86 architectures
  • RVV, ZVFH, ZFH, ZICBOP and ZIHINTPAUSE support for RISC-V architectures
  • 1.5-bit, 2-bit, 3-bit, 4-bit, 5-bit, 6-bit, and 8-bit integer quantization for faster inference and reduced memory use
  • Custom CUDA kernels for running LLMs on NVIDIA GPUs (support for AMD GPUs via HIP and Moore Threads GPUs via MUSA)
  • Vulkan and SYCL backend support
  • CPU+GPU hybrid inference to partially accelerate models larger than the total VRAM capacity

The llama.cpp project is build on top of the ggml library.

Supported backends

Backend Target devices
BLAS All
BLIS All
CANN Ascend NPU
CUDA Nvidia GPU
HIP AMD GPU
Hexagon Snapdragon
IBM zDNN IBM Z & LinuxONE
MUSA Moore Threads GPU
Metal Apple Silicon
OpenCL Adreno GPU
OpenVINO [In Progress] Intel CPUs, GPUs, and NPUs
RPC All
SYCL Intel GPU
VirtGPU VirtGPU APIR
Vulkan GPU
WebGPU All
ZenDNN AMD CPU

Documentation

Tools

Development

Contributing

  • Contributors can open PRs
  • Collaborators will be invited based on contributions
  • Maintainers can push to branches in the llama.cpp repo and merge PRs into the master branch
  • Any help with managing issues, PRs and projects is very appreciated!
  • Read the CONTRIBUTING.md for more information

XCFramework

The XCFramework is a precompiled version of the library for iOS, visionOS, tvOS, and macOS. It can be used in Swift projects without the need to compile the library from source. For example:

// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "MyLlamaPackage",
    targets: [
        .executableTarget(
            name: "MyLlamaPackage",
            dependencies: [
                "LlamaFramework"
            ]),
        .binaryTarget(
            name: "LlamaFramework",
            url: "https://github.com/ggml-org/llama.cpp/releases/download/b5046/llama-b5046-xcframework.zip",
            checksum: "c19be78b5f00d8d29a25da41042cb7afa094cbf6280a225abe614b03b20029ab"
        )
    ]
)

The above example is using an intermediate build b5046 of the library. This can be modified to use a different version by changing the URL and checksum.

Completions

Command-line completion is available for some environments.

Bash Completion

Acknowledgements

  • yhirose/cpp-httplib - Single-header HTTP server, used by llama-server - MIT license
  • nothings/stb - Single-header image format decoder, used by multimodal subsystem - Public domain
  • nlohmann/json - Single-header JSON library, used by various tools/examples - MIT License
  • mackron/miniaudio - Single-header audio format decoder, used by multimodal subsystem - Public domain
  • sheredom/subprocess.h - Single-header process launching solution for C and C++ - Public domain

About

LLM inference in C/C++ Custom , Snapdragon 888/adreno 660 (opencl 2.0) 기반 기기 호환 작업

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages