summaryrefslogtreecommitdiff
path: root/llama-cpp-test.spec
blob: 1718924cef42aaeaeac923ef6db60db0e4a1059b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# topdir: llama-cpp-test-1.0.0
#
# llama-CPP 1.0.0 is a *deliverable* that ships the Kunpeng CPU operator
# optimisation patch set for the upstream llama.cpp inference engine together
# with the performance / accuracy evaluation scripts and documentation.
# The upstream repository contains no build system: it is a git-format patch
# series (patch/0001..0011 + baseline-bug-fixed) plus Python benchmark tooling
# meant to be applied on top of upstream llama.cpp (commit 3ac67535c86).
# This package installs those assets as a noarch test suite.

%global debug_package %{nil}

# The shipped Python scripts are benchmark tooling, not an installable Python
# module.  Keep the automatic interpreters / python dist scanners away from
# them so this noarch data package does not pull a heavy runtime dependency
# tree (numpy/pandas/mteb/datasets/...).
%global __requires_exclude_from ^%{_datadir}/llama-cpp-test/.*$
%global __provides_exclude_from ^%{_datadir}/llama-cpp-test/.*$

Name:           llama-cpp-test
Version:        1.0.0
Release:        1%{?dist}
Summary:        Kunpeng CPU optimisation patch set and benchmark/eval test-suite for llama.cpp
License:        Apache-2.0 AND CC-BY-4.0
URL:            https://gitcode.com/boostkit/llama-CPP
Source0:        https://gitcode.com/boostkit/llama-CPP/archive/v%{version}/llama-cpp-test-%{version}.tar.gz
BuildArch:      noarch

%description
llama-CPP 1.0.0 provides a collection of CPU operator optimisation patches
for the upstream llama.cpp inference engine, targeting the Kunpeng 950 / new
Kunpeng 920 processors (ARM NEON / SVE-256 / i8mm).  It adds FP16 / FP32 /
Q8_0 matrix multiplication kernels and a fused SDPA (FlashAttention v2 NEON)
operator, together with several functional fixes.

This package ships the optimisation patch series, the full-system performance
benchmark (bench_bgem3_full.py), the C-MTEB accuracy evaluation script
(eval_llamacpp_cmteb.py) and the accompanying documentation as a noarch test
suite that can be applied on top of upstream llama.cpp (commit 3ac67535c86).

%prep
%autosetup -n llama-cpp-test-%{version}

%build
# Nothing to compile: this is a patch / tooling test-suite.

%install
install -d %{buildroot}%{_datadir}/llama-cpp-test
cp -pr patch %{buildroot}%{_datadir}/llama-cpp-test/
cp -pr docs  %{buildroot}%{_datadir}/llama-cpp-test/
install -m 0644 bench_bgem3_full.py eval_llamacpp_cmteb.py \
    %{buildroot}%{_datadir}/llama-cpp-test/

%files
%license LICENSE CC-BY
%doc README.md README_en.md
%dir %{_datadir}/llama-cpp-test
%{_datadir}/llama-cpp-test/patch/
%{_datadir}/llama-cpp-test/docs/
%{_datadir}/llama-cpp-test/bench_bgem3_full.py
%{_datadir}/llama-cpp-test/eval_llamacpp_cmteb.py

%changelog
* Sat Nov 28 2026 AI Package Importer <ai-importer@openeuler.org> - 1.0.0-1
- Initial package: llama-CPP 1.0.0 Kunpeng CPU optimisation patch set and test suite