Update README.md
Browse files
README.md
CHANGED
|
@@ -1,32 +1,42 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
datasets
|
| 4 |
-
|
| 5 |
-
language:
|
| 6 |
-
- lo
|
| 7 |
-
metrics:
|
| 8 |
-
- bleu
|
| 9 |
-
base_model:
|
| 10 |
-
- google/gemma-3-4b-it
|
| 11 |
-
library_name: adapter-transformers
|
| 12 |
-
pipeline_tag: summarization
|
| 13 |
---
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
- lora
|
| 23 |
-
- sft
|
| 24 |
-
- transformers
|
| 25 |
-
- trl
|
| 26 |
-
- unsloth
|
| 27 |
---
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
-
|
|
|
|
| 1 |
+
# 🧠 Lao Summarization Model - Fine-tuned Gemma 3 4B IT
|
| 2 |
+
|
| 3 |
+
This is a **Lao language summarization model** fine-tuned on the [`Phonepadith/laos_word_dataset`](https://huggingface.co/datasets/Phonepadith/laos_word_dataset), using the base model [`google/gemma-3-4b-it`](https://huggingface.co/google/gemma-3-4b-it). The model is designed to generate concise summaries from Lao language text.
|
| 4 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
---
|
| 6 |
|
| 7 |
+
## 📌 Model Details
|
| 8 |
+
|
| 9 |
+
- **Base Model**: [`google/gemma-3-4b-it`](https://huggingface.co/google/gemma-3-4b-it)
|
| 10 |
+
- **Fine-tuned by**: [Phonepadith](https://huggingface.co/Phonepadith)
|
| 11 |
+
- **Language**: Lao (`lo`)
|
| 12 |
+
- **Task**: Summarization
|
| 13 |
+
- **Dataset**: [`Phonepadith/laos_word_dataset`](https://huggingface.co/datasets/Phonepadith/laos_word_dataset)
|
| 14 |
+
- **Library**: `adapter-transformers`
|
| 15 |
+
- **License**: Apache 2.0
|
| 16 |
+
|
| 17 |
---
|
| 18 |
+
|
| 19 |
+
## 📊 Metrics
|
| 20 |
+
|
| 21 |
+
- **Evaluation Metric**: BLEU score
|
| 22 |
+
BLEU is used to evaluate the quality of generated summaries against reference summaries in the dataset.
|
| 23 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
---
|
| 25 |
|
| 26 |
+
## 🛠️ How to Use
|
| 27 |
+
|
| 28 |
+
You can load and use the model with Hugging Face Transformers and `adapter-transformers`:
|
| 29 |
+
|
| 30 |
+
```python
|
| 31 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 32 |
+
|
| 33 |
+
model_id = "Phonepadith/lao-gemma-summarizer" # change to your actual model name
|
| 34 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 35 |
+
model = AutoModelForCausalLM.from_pretrained(model_id)
|
| 36 |
|
| 37 |
+
input_text = "ຂໍ້ຄວາມຕົ້ນສະບັບທີ່ຈະໃຫ້ສະຫຼຸບ"
|
| 38 |
+
inputs = tokenizer(input_text, return_tensors="pt")
|
| 39 |
+
summary_ids = model.generate(**inputs, max_new_tokens=100)
|
| 40 |
+
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
|
| 41 |
|
| 42 |
+
print(summary)
|