Update README.md
Browse files
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
license:
|
3 |
tags:
|
4 |
- Indonesian
|
5 |
- Chat
|
@@ -16,6 +16,67 @@ pipeline_tag: text-generation
|
|
16 |
|
17 |
![image/jpeg](https://huggingface.co/xMaulana/FinMatcha-3B-Instruct/resolve/main/image.jpg)
|
18 |
|
|
|
19 |
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
license: apache-2.0
|
3 |
tags:
|
4 |
- Indonesian
|
5 |
- Chat
|
|
|
16 |
|
17 |
![image/jpeg](https://huggingface.co/xMaulana/FinMatcha-3B-Instruct/resolve/main/image.jpg)
|
18 |
|
19 |
+
# Finmatcha-3B
|
20 |
|
21 |
+
Finmatcha is a powerful Indonesian-focused large language model (LLM) fine-tuned using the Llama 3.2B base model. The model has been trained to handle a variety of natural language processing tasks such as text generation, summarization, translation, and question-answering, with a special emphasis on understanding and generating Indonesian text.
|
22 |
+
|
23 |
+
This model has been fine-tuned on a wide array of Indonesian datasets, making it adept at handling the nuances of the Indonesian language, from formal to colloquial speech. It also supports English for bilingual applications.
|
24 |
+
|
25 |
+
## Model Details
|
26 |
+
|
27 |
+
- **Finetuned from model**: [Llama3.2-3B-Instruct](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct)
|
28 |
+
- **Dataset**: [NekoFi/alpaca-gpt4-indonesia-cleaned](https://huggingface.co/datasets/NekoFi/alpaca-gpt4-indonesia-cleaned)
|
29 |
+
- **Model Size**: 3B
|
30 |
+
- **License**: [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
31 |
+
- **Languages**: Indonesian, English
|
32 |
+
|
33 |
+
## How to use
|
34 |
+
|
35 |
+
### Installation
|
36 |
+
|
37 |
+
To use the Finmatcha model, install the required dependencies:
|
38 |
+
|
39 |
+
```bash
|
40 |
+
pip install transformers>=4.45
|
41 |
+
```
|
42 |
+
|
43 |
+
### Usage
|
44 |
+
|
45 |
+
```python
|
46 |
+
import torch
|
47 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
48 |
+
|
49 |
+
model_id = "xMaulana/FinMatcha-3B-Instruct"
|
50 |
+
model = AutoModelForCausalLM.from_pretrained(
|
51 |
+
model_id,
|
52 |
+
torch_dtype=torch.float16,
|
53 |
+
device_map="auto"
|
54 |
+
)
|
55 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
56 |
+
|
57 |
+
inputs = tokenizer("berikan aku resep nasi goreng super lezat", return_tensors="pt").to("cuda")
|
58 |
+
outputs = model.generate(inputs.input_ids,
|
59 |
+
max_new_tokens = 1024,
|
60 |
+
pad_token_id=tokenizer.pad_token_id,
|
61 |
+
eos_token_id=tokenizer.eos_token_id,
|
62 |
+
temperature=0.7,
|
63 |
+
do_sample=True,
|
64 |
+
top_k=5,
|
65 |
+
top_p=0.9,
|
66 |
+
repetition_penalty=1.1
|
67 |
+
)
|
68 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
69 |
+
```
|
70 |
+
|
71 |
+
## Limitations
|
72 |
+
|
73 |
+
- The model is primarily focused on the Indonesian language and may not perform as well on non-Indonesian tasks.
|
74 |
+
- As with all LLMs, cultural and contextual biases can be present.
|
75 |
+
|
76 |
+
## License
|
77 |
+
|
78 |
+
The model is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0).
|
79 |
+
|
80 |
+
## Contributing
|
81 |
+
|
82 |
+
We welcome contributions to enhance and improve Finmatcha. Feel free to open issues or submit pull requests for improvements.
|