szymonrucinski
commited on
Commit
•
cefe22b
1
Parent(s):
0b815fa
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- pl
|
5 |
+
library_name: transformers
|
6 |
+
tags:
|
7 |
+
- polish
|
8 |
+
- nlp
|
9 |
+
---
|
10 |
+
# Curie-7B-v1 Model
|
11 |
+
|
12 |
+
## Introduction
|
13 |
+
This research demonstrates the potential of fine-tuning English Large Language Models (LLMs) for Polish text generation. By employing Language Adaptive Pre-training (LAPT) on a high-quality dataset of 3.11 GB (276 million Polish tokens) and subsequent fine-tuning on the [KLEJ challenges](https://klejbenchmark.com), the `Curie-7B-v1` model achieves remarkable performance. It not only generates Polish text with the lowest perplexity of 3.02 among decoder-based models but also rivals the best Polish encoder-decoder models closely, with a minimal performance gap on 8 out of 9 tasks. This was accomplished using about 2-3% of the dataset size typically required, showcasing the method's efficiency. The model is now open-source, contributing to the community's collaborative progress.
|
14 |
+
### Language Adaptive Pre-training Dataset
|
15 |
+
The LAPT phase utilized the [SpeakLeash dataset](http://speakleash.org/en/), a comprehensive collection of Polish texts, focusing on the highest quality extract of approximately 2 GB from the original 1TB.
|
16 |
+
## Hardware and Software Stack
|
17 |
+
Experiments were conducted on a server featuring an [NVIDIA RTX A6000 ADA GPU](https://www.nvidia.com/content/dam/en-zz/Solutions/design-visualization/rtx-6000/proviz-print-rtx6000-datasheet-web-2504660.pdf) with 48GB of VRAM, AMD Epyc 7742 processor, and running Ubuntu with Pytorch 2.0 and CUDA 12.2.
|
18 |
+
## The Adaptive Pre-training
|
19 |
+
The model was trained using AdamW optimizer, with specific hyperparameters aimed at optimizing performance. Training completed in one epoch, taking a total of 106 hours, demonstrating the onset of overfitting beyond this point.
|
20 |
+
### Hyperparameters
|
21 |
+
- **lora_rank:** 32
|
22 |
+
- **lora_dropout:** 0.05
|
23 |
+
- **lora_alpha:** 16
|
24 |
+
- **warmup_steps:** 0.1
|
25 |
+
- **learning_rate:** 2.5 x 10^-5
|
26 |
+
- **neftune_noise_alpha:** 2
|
27 |
+
- **batch_size:** 128
|
28 |
+
- **max_seq_len:** 128
|
29 |
+
|
30 |
+
## Fine-tuning for KLEJ Downstream Tasks
|
31 |
+
`Curie-7B-v1` was exceptionally close to the best baseline models on 8 of 9 KLEJ tasks by using significantly less data, showcasing its efficiency and capability in handling a variety of NLP tasks in Polish.
|
32 |
+
|
33 |
+
### Performance Highlights
|
34 |
+
- **NKJP-NER:** 93.4
|
35 |
+
- **CDSC-E:** 92.2
|
36 |
+
- **CDSC-R:** 94.9
|
37 |
+
- **CBD:** 49.0 (Demonstrating room for improvement)
|
38 |
+
- **PolEmo2.0-IN:** 92.7
|
39 |
+
- **PolEmo2.0-OUT:** 80.0
|
40 |
+
- **DYK:** 76.2
|
41 |
+
- **PSC:** 98.6
|
42 |
+
- **AR:** 86.8
|
43 |
+
|
44 |
+
## Conclusions
|
45 |
+
The `Curie-7B-v1` model, through LAPT, matches foundational models on eight downstream tasks with significantly less data. Its versatility in generating Polish text and the ability to be transformed into classifiers, regressors, and AI assistants highlights the method's effectiveness. This open-source Polish LLM provides a foundation for developing efficient business solutions.
|
46 |
+
|
47 |
+
## Citation
|
48 |
+
If you use `Curie-7B-v1` in your research, please cite:
|