haryra-7B-gguf / README.md
Haary's picture
Update README.md
198c98b verified
|
raw
history blame
1.8 kB
# Haary/haryra-7B-gguf
<!-- markdownlint-disable MD041 -->
<!-- header start -->
<!-- 200823 -->
<div style="margin-left: auto; margin-right: auto">
<img src="https://cdn.pixabay.com/photo/2023/08/12/13/22/peacock-8185593_960_720.png" alt="merak" style="width: 300px; margin:auto">
</div>
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
<!-- header end -->
Haary/haryra-7B-gguf adalah Model LLM Bahasa Indonesia
Model [Haary/haryra-7b-id](https://huggingface.co/Haary/haryra-7b-id) adalah Model terkuantisasi dari Model Dasar [Open-Orca/Mistral-7B-OpenOrca](https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca) ke format GGUF.
## Cara menjalankan dengan kode Python
Anda dapat menggunakan model GGUF dari Python menggunakan [ctransformers](https://github.com/marella/ctransformers) library.
### Cara memuat model ini dalam kode Python, menggunakan ctransformers
#### Pertama instal package ctransformers
Jalankan salah satu perintah berikut, sesuai dengan sistem Anda:
```shell
# Base ctransformers with no GPU acceleration
pip install ctransformers
# Or with CUDA GPU acceleration
pip install ctransformers[cuda]
# Or with AMD ROCm GPU acceleration (Linux only)
CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers
# Or with Metal GPU acceleration for macOS systems only
CT_METAL=1 pip install ctransformers --no-binary ctransformers
```
#### Contoh kode sederhana untuk menjalankan ctransformers
```python
from ctransformers import AutoModelForCausalLM
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
llm = AutoModelForCausalLM.from_pretrained("Ichsan2895/Merak-7B-v4-GGUF", model_file="Merak-7B-v4-model-q5_k_m.gguf", model_type="mistral", gpu_layers=50)
print(llm("AI is going to"))
```