laurentiubp commited on
Commit
f7ca61f
1 Parent(s): 710d1ee

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +82 -35
README.md CHANGED
@@ -1,65 +1,112 @@
1
  ---
2
- license: other
3
- base_model: laurentiubp/CataLLaMA-v0.1.2
4
  tags:
5
- - generated_from_trainer
 
 
6
  model-index:
7
- - name: CataLLaMA-v0.2.0
8
  results: []
 
 
 
 
 
 
9
  ---
10
 
11
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
12
- should probably proofread and complete it, then remove this comment. -->
13
 
14
- # CataLLaMA-v0.2.0
15
 
16
- This model is a fine-tuned version of [laurentiubp/CataLLaMA-v0.1.2](https://huggingface.co/laurentiubp/CataLLaMA-v0.1.2) on the Catalan-Instruct dataset.
17
- It achieves the following results on the evaluation set:
18
- - Loss: 0.8528
19
 
20
- ## Model description
 
 
 
 
 
 
21
 
22
- More information needed
23
 
24
- ## Intended uses & limitations
25
 
26
- More information needed
27
 
28
- ## Training and evaluation data
29
 
30
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  ## Training procedure
33
 
 
 
 
 
34
  ### Training hyperparameters
35
 
36
  The following hyperparameters were used during training:
37
  - learning_rate: 1e-05
38
- - train_batch_size: 10
39
- - eval_batch_size: 10
40
- - seed: 42
41
  - distributed_type: multi-GPU
42
  - num_devices: 6
43
- - total_train_batch_size: 60
44
- - total_eval_batch_size: 60
45
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
46
  - lr_scheduler_type: linear
47
  - lr_scheduler_warmup_steps: 100
48
- - num_epochs: 1
49
 
50
  ### Training results
51
 
52
- | Training Loss | Epoch | Step | Validation Loss |
53
- |:-------------:|:-----:|:----:|:---------------:|
54
- | 0.8002 | 0.22 | 200 | 0.8989 |
55
- | 0.8068 | 0.43 | 400 | 0.8835 |
56
- | 0.7722 | 0.65 | 600 | 0.8654 |
57
- | 0.7805 | 0.86 | 800 | 0.8528 |
58
-
59
-
60
- ### Framework versions
 
61
 
62
- - Transformers 4.38.1
63
- - Pytorch 2.1.0+cu118
64
- - Datasets 2.16.1
65
- - Tokenizers 0.15.2
 
1
  ---
2
+ license: llama3
3
+ base_model: catallama/CataLlama-v0.1-Base
4
  tags:
5
+ - llama
6
+ - llama-3
7
+ - Catalan
8
  model-index:
9
+ - name: CataLlama-v0.1-Instruct-SFT
10
  results: []
11
+ datasets:
12
+ - catallama/Catalan-Instruct
13
+ language:
14
+ - ca
15
+ - en
16
+ pipeline_tag: text-generation
17
  ---
18
 
19
+ **CataLlama-v0.1-Instruct-SFT** is an instruct fine-tune of [catallama/CataLlama-v0.1-Base](https://huggingface.co/catallama/CataLlama-v0.1-Base) on the [catallama/Catalan-Instruct](https://huggingface.co/datasets/catallama/Catalan-Instruct) dataset.
 
20
 
21
+ The model shows improved proficiency with the Catalan language.
22
 
23
+ **This is an instruction fine-tuned model proficient on the following tasks in Catalan**
 
 
24
 
25
+ - Information extraction (suitable for RAG)
26
+ - Named Entity Recognition (NER)
27
+ - Translation from English to Catalan and Catalan to English
28
+ - Summarization - both short form and long form
29
+ - Chat
30
+ - Sentiment analysis
31
+ - Open question answering
32
 
33
+ The model achieves a loss rate of 0.8528 on the validation dataset after two epochs.
34
 
 
35
 
36
+ **Model developers** [Laurentiu Petrea](https://www.linkedin.com/in/laurentiupetrea/) based on Llama-3 from Meta.
37
 
38
+ **Model Architecture** CataLlama is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and direct preference optimisation (DPO) to align with human preferences for helpfulness and safety.
39
 
40
+ **License** The model uses the llama-3 license available at: [https://llama.meta.com/llama3/license](https://llama.meta.com/llama3/license)
41
+
42
+
43
+ ### Use with transformers
44
+
45
+ See the snippet below for usage with Transformers:
46
+
47
+ **The model follows the same prompt template as Llama-3 Instruct**
48
+
49
+ ```python
50
+ import transformers
51
+ import torch
52
+
53
+ model_id = "catallama/CataLlama-v0.1-Base"
54
+
55
+ pipeline = transformers.pipeline(
56
+ "text-generation",
57
+ model=model_id,
58
+ model_kwargs={"torch_dtype": torch.bfloat16},
59
+ device_map="auto",
60
+ )
61
+
62
+ messages = [
63
+ {"role": "user", "content": "Ei com estàs avui?"},
64
+ ]
65
+
66
+ prompt = pipeline.tokenizer.apply_chat_template(
67
+ messages,
68
+ tokenize=False,
69
+ add_generation_prompt=True
70
+ )
71
+
72
+ outputs = pipeline(
73
+ prompt,
74
+ max_new_tokens=1024,
75
+ do_sample=True,
76
+ temperature=0.6,
77
+ top_p=0.9,
78
+ )
79
+
80
+ print(outputs[0]["generated_text"][len(prompt):])
81
+ ```
82
 
83
  ## Training procedure
84
 
85
+ The model was trained **with the same prompt template of Llama-3 Instruct**.
86
+
87
+ The model was trained for two epochs on 6x A100 80GB GPUs using DeepSpeed ZeRO State-3 without CPU offloading.
88
+
89
  ### Training hyperparameters
90
 
91
  The following hyperparameters were used during training:
92
  - learning_rate: 1e-05
 
 
 
93
  - distributed_type: multi-GPU
94
  - num_devices: 6
 
 
95
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
96
  - lr_scheduler_type: linear
97
  - lr_scheduler_warmup_steps: 100
98
+ - num_epochs: 2
99
 
100
  ### Training results
101
 
102
+ | Training Loss | Epoch | Step | Validation Loss |
103
+ |:-------------:|:-----:|:----:|:----------------:|
104
+ | 1.0186 | 0.22 | 200 | 1.0209 |
105
+ | 0.9588 | 0.43 | 400 | 0.9489 |
106
+ | 0.9111 | 0.65 | 600 | 0.9086 |
107
+ | 0.8971 | 0.86 | 800 | 0.8886 |
108
+ | 0.8002 | 1.22 | 1000 | 0.8989 |
109
+ | 0.8068 | 1.43 | 1200 | 0.8835 |
110
+ | 0.7722 | 1.65 | 1400 | 0.8654 |
111
+ | 0.7805 | 1.86 | 1600 | 0.8528 |
112