robinsyihab commited on
Commit
b2225a1
1 Parent(s): 40f4abb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +47 -0
README.md CHANGED
@@ -1,3 +1,50 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+
5
+ # Sidrap-7B-v2-GPTQ
6
+
7
+ Sidrap-7B-v2-GPTQ is an 8-bit quantized language model of Sidrap-7B-v2, which is one of the best open model LLM bahasa Indonesia available today. This model has been quantized using the [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) to get smaller model that allows us to run in low resource computer and faster inference. The quantization uses random subset of original training data to "calibrate" the weights resulting in an optimally compact model with minimall loss in accuracy.
8
+
9
+ ## Usage
10
+
11
+ Here is an example code snippet for using Sidrap-7B-v2-GPTQ:
12
+
13
+ ```python
14
+ from transformers import AutoTokenizer, pipeline
15
+ from auto_gptq import AutoGPTQForCausalLM
16
+
17
+ model_id = "robinsyihab/Sidrap-7B-v2-GPTQ"
18
+
19
+ tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=True)
20
+
21
+ model = AutoGPTQForCausalLM.from_quantized(model_id,
22
+ device="cuda:0",
23
+ inject_fused_mlp=True,
24
+ inject_fused_attention=True,
25
+ trust_remote_code=True)
26
+
27
+ chat = pipeline("text-generation",
28
+ model=model,
29
+ tokenizer=tokenizer,
30
+ device_map="auto")
31
+
32
+ prompt = ("<s>[INST] <<SYS>>\nAnda adalah asisten yang suka membantu, penuh hormat, dan jujur. Selalu jawab semaksimal mungkin, sambil tetap aman. Jawaban Anda tidak boleh berisi konten berbahaya, tidak etis, rasis, seksis, beracun, atau ilegal. Harap pastikan bahwa tanggapan Anda tidak memihak secara sosial dan bersifat positif.\n\
33
+ Jika sebuah pertanyaan tidak masuk akal, atau tidak koheren secara faktual, jelaskan alasannya daripada menjawab sesuatu yang tidak benar. Jika Anda tidak mengetahui jawaban atas sebuah pertanyaan, mohon jangan membagikan informasi palsu.\n"
34
+ "<</SYS>>\n\n"
35
+ "Siapa penulis kitab alfiyah? [/INST]\n"
36
+ )
37
+
38
+ sequences = chat(prompt, num_beams=2, max_length=max_size, top_k=10, num_return_sequences=1)
39
+ print(sequences[0]['generated_text'])
40
+ ```
41
+
42
+ ## License
43
+
44
+ Sidrap-7B-v2-GPTQ is licensed under the Apache 2.0 License.
45
+
46
+ ## Author
47
+
48
+ [] Robin Syihab ([@anvie](https://x.com/anvie))
49
+
50
+