Instructions to use zai-org/chatglm-6b-int4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/chatglm-6b-int4 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zai-org/chatglm-6b-int4", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Fix bugs when compiling cpu kernels
Browse files- quantization.py +1 -0
quantization.py
CHANGED
|
@@ -144,6 +144,7 @@ class CPUKernel:
|
|
| 144 |
kernel_file = source_code[:-2] + ".so"
|
| 145 |
compile_command = "gcc -O3 -fPIC -std=c99 {} -shared -o {}".format(source_code, kernel_file)
|
| 146 |
print("Compiling", compile_command)
|
|
|
|
| 147 |
else:
|
| 148 |
compile_command = "gcc -O3 -fPIC -std=c99 {} -shared -o {}".format(source_code, kernel_file)
|
| 149 |
print("Compiling", compile_command)
|
|
|
|
| 144 |
kernel_file = source_code[:-2] + ".so"
|
| 145 |
compile_command = "gcc -O3 -fPIC -std=c99 {} -shared -o {}".format(source_code, kernel_file)
|
| 146 |
print("Compiling", compile_command)
|
| 147 |
+
exit_state = os.system(compile_command)
|
| 148 |
else:
|
| 149 |
compile_command = "gcc -O3 -fPIC -std=c99 {} -shared -o {}".format(source_code, kernel_file)
|
| 150 |
print("Compiling", compile_command)
|