2023-08-23 13:13:44 +08:00
|
|
|
%define debug_package %{nil}
|
|
|
|
|
|
|
|
|
|
Name: chatglm-cpp
|
|
|
|
|
Version: 0.2.4
|
2023-09-16 17:33:00 +08:00
|
|
|
Release: 3
|
2023-08-23 13:13:44 +08:00
|
|
|
License: MIT
|
|
|
|
|
Summary: Port of Chinese lagre model ChatGLM-6B & ChatGLM2-6B implemented based on C/C++
|
|
|
|
|
|
|
|
|
|
URL: https://github.com/li-plus/chatglm.cpp
|
|
|
|
|
Source0: https://github.com/li-plus/chatglm.cpp/releases/download/0.2.4/chatglm-cpp-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
BuildRequires: gcc,gcc-c++,cmake
|
2023-09-06 23:31:20 +08:00
|
|
|
Requires: sentencepiece
|
2023-08-23 13:13:44 +08:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Port of Chinese lagre model ChatGLM-6B & ChatGLM2-6B implemented based on C/C++,
|
|
|
|
|
it can be used for model dialogue based on local laptops.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -b 0 -n %{name}-%{version} -p1
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
mkdir chatglm_builddir
|
|
|
|
|
pushd chatglm_builddir
|
|
|
|
|
cmake ..
|
|
|
|
|
%make_build
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
pushd chatglm_builddir
|
|
|
|
|
%make_install
|
|
|
|
|
install bin/main %{buildroot}%{_prefix}/local/bin/chatglm_cpp_main
|
|
|
|
|
install lib/libchatglm.a %{buildroot}%{_prefix}/local/bin/libchatglm.a
|
|
|
|
|
mv %{buildroot}%{_prefix}/local/* %{buildroot}%{_prefix}
|
2023-09-06 23:31:20 +08:00
|
|
|
|
|
|
|
|
#Remove files from package sentencepiece.
|
|
|
|
|
find %{buildroot}%{_prefix} -type f -name "*sentencepiece*" -exec rm -f {} +
|
|
|
|
|
rm %{buildroot}%{_bindir}/spm_* -f
|
2023-08-23 13:13:44 +08:00
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{_bindir}/*
|
|
|
|
|
%{_libdir}/*
|
|
|
|
|
%{_includedir}/*
|
|
|
|
|
%{_datadir}/pkgconfig/ggml.pc
|
|
|
|
|
/usr/lib/static/libggml.a
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-09-16 17:33:00 +08:00
|
|
|
* Tue Sep 19 2023 zhoupengcheng <zhoupengcheng11@huawei.com> - 0.2.4-3
|
|
|
|
|
- add dokerfile
|
|
|
|
|
|
2023-09-06 23:31:20 +08:00
|
|
|
* Wed Sep 6 2023 zhoupengcheng <zhoupengcheng11@huawei.com> - 0.2.4-2
|
|
|
|
|
- Fix the conflict with the installation of package sentencepiece.
|
|
|
|
|
|
2023-08-23 13:13:44 +08:00
|
|
|
* Tue Aug 22 2023 zhoupengcheng <zhoupengcheng11@huawei.com> - 0.2.4-1
|
|
|
|
|
- Init package
|