rththr commited on
Commit
96abf03
·
verified ·
1 Parent(s): a25d5be

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +41 -78
README.md CHANGED
@@ -1,94 +1,57 @@
1
- ---
2
- language:
3
- - en
4
- tags:
5
- - llama.cpp
6
- - llama-cpp
7
- - cuda
8
- - nvidia
9
- - k2horizon
10
- - gguf
11
- - inference
12
- license: mit
13
- ---
14
 
15
- # K2Horizon llama.cpp CUDA Binary
16
 
17
- Prebuilt Linux x86_64 CUDA binaries for the model/K2Horizon branch of MBZUAI-IFM llama.cpp.
18
 
19
- This package is already built. You do not need to compile llama.cpp again.
 
 
 
 
 
 
20
 
21
- ## Build Information
22
 
23
- - Repository: https://github.com/MBZUAI-IFM/llama.cpp
24
- - Branch: model/K2Horizon
25
- - Platform: Linux x86_64
26
- - CUDA: Enabled
27
- - Version: 0.3.0-dev
28
- - Build: 10671
29
- - Commit: 35999d101
30
 
31
- ## Important
32
 
33
- The package includes its own shared libraries inside bin/.
 
 
 
34
 
35
- Before running llama-server or llama-cli, set:
36
 
37
- `export LD_LIBRARY_PATH="$PWD/bin:$LD_LIBRARY_PATH"`
 
 
38
 
39
- You can also add the binaries to PATH:
 
40
 
41
- `export PATH="$PWD/bin:$PATH"`
 
 
 
 
 
 
42
 
43
- ## Quick Start
44
 
45
- Extract the archive:
46
-
47
- `tar -xzf llama-k2horizon-cuda-linux-x64.tar.gz`
48
-
49
- Enter the directory:
50
-
51
- `cd llama-k2horizon-cuda-linux-x64`
52
-
53
- Set the runtime library path:
54
-
55
- `export LD_LIBRARY_PATH="$PWD/bin:$LD_LIBRARY_PATH"`
56
-
57
- Optional PATH:
58
-
59
- `export PATH="$PWD/bin:$PATH"`
60
-
61
- Check the binary:
62
-
63
- `llama-server --version`
64
-
65
- Check CUDA devices:
66
-
67
- `llama-server --list-devices`
68
-
69
- ## Run a GGUF Model
70
-
71
- `llama-server -m /path/to/model.gguf -ngl 999`
72
-
73
- ## Run CLI
74
-
75
- `llama-cli -m /path/to/model.gguf -ngl 999 -p "Hello"`
76
-
77
- ## Included
78
-
79
- The bin directory contains llama-server, llama-cli, CUDA GGML libraries, CPU GGML libraries, libllama shared libraries, and other utilities from the existing build.
80
-
81
- ## Requirements
82
-
83
- - Linux x86_64
84
- - NVIDIA GPU
85
- - NVIDIA driver
86
- - Compatible CUDA driver support
87
-
88
- Check GPU availability with:
89
-
90
- `nvidia-smi`
91
 
92
  ## Notes
93
 
94
- This package contains prebuilt binaries and runtime libraries. The source code and CMake build directory are not required for normal inference.
 
 
 
 
1
+ # SageAttention 2.2.0 — Pre-built Wheel
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ Pre-compiled SageAttention 2.2.0 wheel for **Linux x86_64** with CUDA 13 and C++20.
4
 
5
+ ## Compatibility
6
 
7
+ | Component | Version |
8
+ |-----------|---------|
9
+ | Python | 3.12 |
10
+ | PyTorch | 2.15.0 nightly (cu132) |
11
+ | CUDA Toolkit | 13.3 |
12
+ | GPU | Ada Lovelace (sm_89) — RTX 4050/4060/4070/4080/4090 |
13
+ | SageAttention | 2.2.0 |
14
 
15
+ ## Install
16
 
17
+ ```bash
18
+ pip install sageattention-2.2.0-cp312-cp312-linux_x86_64.whl --no-deps
19
+ ```
 
 
 
 
20
 
21
+ ## Build from Source (if needed)
22
 
23
+ ### Requirements
24
+ - CUDA Toolkit (nvcc)
25
+ - PyTorch with CUDA support
26
+ - 16GB+ RAM or adequate swap
27
 
28
+ ### Steps
29
 
30
+ ```bash
31
+ git clone --depth 1 https://github.com/thu-ml/SageAttention.git /tmp/SageAttention
32
+ cd /tmp/SageAttention
33
 
34
+ # Patch: PyTorch 2.15 nightly requires C++20
35
+ sed -i 's/-std=c++17/-std=c++20/g' setup.py
36
 
37
+ # Build
38
+ CUDA_HOME=/usr/local/cuda-13.3 \
39
+ TORCH_CUDA_ARCH_LIST="8.9" \
40
+ MAX_JOBS=1 \
41
+ NVCC_APPEND_FLAGS="--threads 8" \
42
+ python setup.py install
43
+ ```
44
 
45
+ ### Create Wheel
46
 
47
+ ```bash
48
+ python setup.py bdist_wheel
49
+ cp dist/*.whl /path/to/wheels/
50
+ ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
  ## Notes
53
 
54
+ - Built on Ubuntu 24.04 with 14GB RAM + 19GB swap
55
+ - `MAX_JOBS=1` used to avoid OOM during CUDA kernel compilation
56
+ - PyTorch 2.15 nightly requires C++20; upstream SageAttention ships with C++17 which must be patched
57
+ - Wheel includes sm_80 (Ampere) and sm_89 (Ada) kernels