Skip to content

Commit bf5bcd0

Browse files
authored
docs: update s390x documentation + add faq (#14389)
* docs: update s390x documentation + add faq Signed-off-by: Aaron Teo <[email protected]> * docs: add s390x z17 build q&a Signed-off-by: Aaron Teo <[email protected]> --------- Signed-off-by: Aaron Teo <[email protected]>
1 parent 716301d commit bf5bcd0

File tree

1 file changed

+74
-2
lines changed

1 file changed

+74
-2
lines changed

docs/build-s390x.md

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cd llama.cpp
1616

1717
## CPU Build with BLAS
1818

19-
Building llama.cpp with BLAS support is highly recommended as it has shown to provide performance improvements.
19+
Building llama.cpp with BLAS support is highly recommended as it has shown to provide performance improvements. Make sure to have OpenBLAS installed in your environment.
2020

2121
```bash
2222
cmake -S . -B build \
@@ -82,12 +82,18 @@ All models need to be converted to Big-Endian. You can achieve this in three cas
8282

8383
1. **Use pre-converted models verified for use on IBM Z & LinuxONE (easiest)**
8484

85+
![File Type - gguf](https://img.shields.io/badge/File_Type-gguf-fff)
86+
8587
You can find popular models pre-converted and verified at [s390x Ready Models](https://huggingface.co/collections/taronaeo/s390x-ready-models-672765393af438d0ccb72a08).
8688

87-
These models and their respective tokenizers are verified to run correctly on IBM Z & LinuxONE.
89+
These models have already been converted from `safetensors` to `GGUF Big-Endian` and their respective tokenizers verified to run correctly on IBM z15 and later system.
8890

8991
2. **Convert safetensors model to GGUF Big-Endian directly (recommended)**
9092

93+
![File Type - safetensors](https://img.shields.io/badge/File_Type-safetensors-da1e28)
94+
95+
The model you are trying to convert must be in `safetensors` file format (for example [IBM Granite 3.3 2B](https://huggingface.co/ibm-granite/granite-3.3-2b-instruct)). Make sure you have downloaded the model repository for this case.
96+
9197
```bash
9298
python3 convert_hf_to_gguf.py \
9399
--outfile model-name-be.f16.gguf \
@@ -108,6 +114,10 @@ All models need to be converted to Big-Endian. You can achieve this in three cas
108114

109115
3. **Convert existing GGUF Little-Endian model to Big-Endian**
110116

117+
![File Type - gguf](https://img.shields.io/badge/File_Type-gguf-fff)
118+
119+
The model you are trying to convert must be in `gguf` file format (for example [IBM Granite 3.3 2B](https://huggingface.co/ibm-granite/granite-3.3-2b-instruct-GGUF)). Make sure you have downloaded the model file for this case.
120+
111121
```bash
112122
python3 gguf-py/gguf/scripts/gguf_convert_endian.py model-name.f16.gguf BIG
113123
```
@@ -163,6 +173,22 @@ It is strongly recommended to disable SMT via the kernel boot parameters as it n
163173
164174
IBM VXE/VXE2 SIMD acceleration depends on the BLAS implementation. It is strongly recommended to use BLAS.
165175
176+
## Frequently Asked Questions (FAQ)
177+
178+
1. I'm getting the following error message while trying to load a model: `gguf_init_from_file_impl: failed to load model: this GGUF file version 50331648 is extremely large, is there a mismatch between the host and model endianness?`
179+
180+
Answer: Please ensure that the model you have downloaded/converted is GGUFv3 Big-Endian. These models are usually denoted with the `-be` suffix, i.e., `granite-3.3-2b-instruct-be.F16.gguf`.
181+
182+
You may refer to the [Getting GGUF Models](#getting-gguf-models) section to manually convert a `safetensors` model to `GGUF` Big Endian.
183+
184+
2. I'm getting extremely poor performance when running inference on a model
185+
186+
Answer: Please refer to the [Appendix B: SIMD Support Matrix](#appendix-b-simd-support-matrix) to check if your model quantization is supported by SIMD acceleration.
187+
188+
3. I'm building on IBM z17 and getting the following error messages: `invalid switch -march=z17`
189+
190+
Answer: Please ensure that your GCC compiler is of minimum GCC 15.1.0 version, and have `binutils` updated to the latest version. If this does not fix the problem, kindly open an issue.
191+
166192
## Getting Help on IBM Z & LinuxONE
167193

168194
1. **Bugs, Feature Requests**
@@ -172,3 +198,49 @@ IBM VXE/VXE2 SIMD acceleration depends on the BLAS implementation. It is strongl
172198
2. **Other Questions**
173199

174200
Please reach out directly to [[email protected]](mailto:[email protected]).
201+
202+
## Appendix A: Hardware Support Matrix
203+
204+
| | Support | Minimum Compiler Version |
205+
| ------- | ------- | ------------------------ |
206+
| IBM z15 || |
207+
| IBM z16 || |
208+
| IBM z17 || GCC 15.1.0 |
209+
210+
- ✅ - supported and verified to run as intended
211+
- 🚫 - unsupported, we are unlikely able to provide support
212+
213+
## Appendix B: SIMD Support Matrix
214+
215+
| | VX/VXE/VXE2 | NNPA | zDNN | Spyre |
216+
| ---------- | ----------- | ---- | ---- | ----- |
217+
| FP32 |||||
218+
| FP16 |||||
219+
| BF16 | 🚫 | 🚫 |||
220+
| Q4_0 |||||
221+
| Q4_1 |||||
222+
| Q5_0 | 🚫 | 🚫 |||
223+
| Q5_1 | 🚫 | 🚫 |||
224+
| Q8_0 |||||
225+
| Q2_K | 🚫 | 🚫 |||
226+
| Q3_K |||||
227+
| Q4_K |||||
228+
| Q5_K |||||
229+
| Q6_K |||||
230+
| TQ1_0 | 🚫 | 🚫 |||
231+
| TQ2_0 | 🚫 | 🚫 |||
232+
| IQ2_XXS | 🚫 | 🚫 |||
233+
| IQ2_XS | 🚫 | 🚫 |||
234+
| IQ2_S | 🚫 | 🚫 |||
235+
| IQ3_XXS | 🚫 | 🚫 |||
236+
| IQ3_S | 🚫 | 🚫 |||
237+
| IQ1_S | 🚫 | 🚫 |||
238+
| IQ1_M | 🚫 | 🚫 |||
239+
| IQ4_NL |||||
240+
| IQ4_XS |||||
241+
| FP32->FP16 | 🚫 ||||
242+
| FP16->FP32 | 🚫 ||||
243+
244+
- ✅ - acceleration available
245+
- 🚫 - acceleration unavailable, will still run using scalar implementation
246+
- ❓ - acceleration unknown, please contribute if you can test it yourself

0 commit comments

Comments
 (0)